parameters (pmrf.parameters)

Parameter factories, converters, and field specifiers.

Most of these are re-exported at root.

Builds on top of Parax.

Classes

Param(*[, value, distribution, constraint, ...])

The canonical parameter container for ParamRF.

Functions

is_param(x)

Returns if x is an instance of pmrf.Param.

as_param([value, constraint, scale, ...])

Coerces a value into a parameter.

param(*, default, as_free, as_fixed, ...)

A field specifier for registering parameters within a model.

Fixed(value, *[, name, scale, metadata])

Create a fixed parameter.

Unconstrained(value, *[, fixed, scale, ...])

Create an unconstrained free parameter.

Bounded(lower, upper, *[, value, fixed, ...])

Create a free parameter constrained within a specific interval.

Constrained(constraint, value, *[, fixed, ...])

Create a free parameter constrained to a specific domain.

Random(distribution, *[, constraint, value, ...])

Create a free parameter with an associated probability distribution.

params(tree[, where, free_only])

Returns the parameters of a model, or any collection of models, by name.

values(tree[, where, free_only, space])

Returns the values of a model's parameters by name, in one space.

log_prior(tree, *[, space])

Returns the log prior density of a model's parameters, in one space.

update(tree, selection, node, /, *, value, ...)

Returns a copy of a model with the parts a selector picks replaced.

tie(tree, target, ~typing.Any], source, ...)

Returns a copy of a model in which one part is derived from another.

resolve(tree)

Returns a copy of a tree with its ties applied and its parameters left intact.

prior(tree, names, distribution[, space, ...])

Returns a copy of a model with a prior attached to the parameters names selects.