geossm.stmodel.Param¶
- class geossm.stmodel.Param(name, value, fixed=False, bse=None)[source]¶
Bases:
objectA single named model parameter, with its value, fixed/free status, and (once available) standard error.
Registered as a JAX pytree: when fixed is False, value is the single differentiable leaf (so Param instances can be passed directly through
jax.grad); name, fixed and bse are static (non-differentiable) auxiliary data. A fixed parameter (or one with value=None) has no leaves at all, so it is excluded from gradient-based updates duringfit().- Parameters:
name (
str) – Parameter name (e.g."beta","s2e").value (
jax.numpy.ndarrayorNone) – Current parameter value. None before an initial value has been set.fixed (
bool, defaultFalse) – If True, the parameter is held at value and excluded from estimation in fit; if False, it is estimated.bse (
jax.numpy.ndarrayorNone, defaultNone) – Standard error(s) of value, filled in bycompute_cov_params(). None until then.
Methods
Return a copy of this parameter with fixed=True.
Return a copy of this parameter with value replaced.
Return a copy of this parameter with fixed=False.
Attributes
Shape of value, or None if value is None.
Number of elements in value (0 if value is None).
- name: str¶
- value: Array | None¶
- fixed: bool = False¶
- bse: Array | None = None¶
- set(new_value)[source]¶
Return a copy of this parameter with value replaced.
No-op (returns self unchanged) if the parameter is fixed.
- Parameters:
new_value (
array_like) – Replacement value.- Returns:
Param– A new Param with the updated value (or self, if fixed).
- property shape¶
Shape of value, or None if value is None.
- Type:
tuple or None
- property size¶
Number of elements in value (0 if value is None).
- Type:
int