Public methods
Method new()
The initialisation method sets the weights (W), the bais (B) matrices,
the objective function (obj), as well as the name of the module.
The calculation performed is the following
ans = sigmoid(W.op(X) + B)
Usage
module.logistic$new(tx, nin, b = TRUE)
Arguments
txif TRUE it traspose the input matrix
ninnumber of column of the input matrix
bif TRUE the intercept term is included
Returns
Returns the total number of parameters
Method op()
Performs: ans = sigmoid(W.op(X) + B)
Usage
module.logistic$op(X)
Arguments
Xinput matrix, reference object of class 'number'
Returns
Returns a reference object of class 'number'
Examples
\donttest{
modello.init(10, 10, 10, 10)
X = number(as.matrix(rnorm(10)), dx=FALSE)
mdl = module.logistic$new(1, 1, b=FALSE)
print(X$v)
Yh = mdl$op(X)
print(Yh)
print(Yh$v)
modello.close()
}
Method clone()
The objects of this class are cloneable with this method.
Usage
module.logistic$clone(deep = FALSE)
Arguments
deepWhether to make a deep clone.