mpcrl.LearnableParameter#
- class mpcrl.LearnableParameter(name, shape, value, lb=-inf, ub=inf)[source]#
Bases:
objectA parameter that is learnable, that is, it can be adjusted via RL or any other learning strategy. This class is useful for managing bounds and value of the learnable parameter.
- Parameters:
- namestr
Name of the learnable parameter.
- shapeint or tuple of ints
Shape of the parameter.
- valuearray_like
Starting value of the parameter.
- lbarray_like, optional
Lower bound of the parameter values. If not specified, it is unbounded.
- ubarray_like, optional
Upper bound of the parameter values. If not specified, it is unbounded.
- Raises:
- ValueError
Raises if
value,lborubcannot be broadcasted to a 1D vector with shape equal toshape.
Methods
Attributes
Gets the number of elements in the parameter.