Var.new_value()#
- classmethod Var.new_value(value, name='', inference=None, convert='default')[source]#
Initializes a strong variable without a distribution.
- Parameters:
value (
Any) – The value of the variable.distribution – The probability distribution of the variable.
name (
str, default:'') – The name of the variable. If you do not specify a name, a unique name will be automatically generated upon initialization of aModel.inference (
TypeAliasType, default:None) – Additional information that can be used to set up inference algorithms.convert (
Callable[[Any],Any] |Literal['default'], default:'default') – A function used to process the value of this variable. The default uses the function stored inconvert_value, which isjax.numpy.asarray.
See also
Var.new_paramInitializes a strong variable that acts as a model parameter.
Var.new_obsInitializes a strong variable that acts as an observed variable.
Var.new_calcInitializes a weak variable that is a function of other variables.
- Return type:
Examples
A simple value variable without a name:
>>> x = lsl.Var.new_value(1.0) >>> x Var(name="")