as_param (pmrf.as_param)
- pmrf.as_param(value: Any = None, *, distribution: AbstractDistribution | None = None, constraint: AbstractConstraint | None = None, scale: float = 1.0, fixed: bool = False) Param
Coerces a value into a parameter.
The incoming value can be an existing parameter or any parameter-like object (float, array etc.).
- Parameters:
value (Any, optional) – The value of the parameter.
distribution (Optional[AbstractDistribution], optional) – The probability distribution for the parameter. See
pmrf.distributions.constraint (Optional[AbstractConstraint], optional) – The constraint to apply to the parameter. See
pmrf.constraints.scale (float, optional) – The scaling factor to apply, by default 1.0.
fixed (bool, optional) – Whether to freeze the parameter, by default False.
- Returns:
An equinox field with a built-in converter for parameter rules.
- Return type: