This class represents a parameter, either scalar or a matrix.
Parameter(
rows = NULL,
cols = NULL,
name = NA_character_,
value = NA_real_,
...
)
# S4 method for class 'Parameter'
get_data(object)
# S4 method for class 'Parameter'
name(x)
# S4 method for class 'Parameter'
value(object)
# S4 method for class 'Parameter'
value(object) <- value
# S4 method for class 'Parameter'
grad(object)
# S4 method for class 'Parameter'
parameters(object)
# S4 method for class 'Parameter'
canonicalize(object)
The number of rows in the parameter.
The number of columns in the parameter.
(Optional) A character string representing the name of the parameter.
(Optional) A numeric element, vector, matrix, or data.frame. Defaults to NA
and may be changed with value<-
later.
Additional attribute arguments. See Leaf for details.
A Parameter object.
get_data(Parameter)
: Returns list(dim, name, value, attributes)
.
name(Parameter)
: The name of the parameter.
value(Parameter)
: The value of the parameter.
value(Parameter) <- value
: Set the value of the parameter.
grad(Parameter)
: An empty list since the gradient of a parameter is zero.
parameters(Parameter)
: Returns itself as a parameter.
canonicalize(Parameter)
: The canonical form of the parameter.
rows
The number of rows in the parameter.
cols
The number of columns in the parameter.
name
(Optional) A character string representing the name of the parameter.
value
(Optional) A numeric element, vector, matrix, or data.frame. Defaults to NA
and may be changed with value<-
later.