values
- pmrf.parameters.values(tree, where: str | Sequence[str] | Callable[[Any], Any] = '*', *, free_only: bool = False, space: Literal['raw', 'declared', 'physical'] = 'declared') dict[str, Array]
Returns the values of a model’s parameters by name, in one space.
This is what
update()accepts, soprf.update(m, prf.values(m, space=s), space=s)gives back m, with the same structure and jit cache key.The raw value of a parameter under a joint prior (see
prior()) is its slice of the prior’s whitened vector, in its own shape, so it depends on the other parameters under the prior, and is the same whichever parameters where selects.- Parameters:
tree (PyTree) – A model, or any collection of models and parameters.
where (str, Sequence[str] or Callable, default='*') – The parameters to read, as for
params().free_only (bool, default=False) – Only return free parameters.
space ({'declared', 'physical', 'raw'}, default='declared') – The space of the values. See
Param.
- Returns:
Names, as from
params(), mapped to values.- Return type:
dict[str, jax.Array]
Examples
c = Capacitor(prf.Unconstrained(2.0, scale=1e-12)) prf.values(c) # {'C': 2.0} prf.values(c, space='physical') # {'C': 2e-12}