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.

uniform(lower, upper, *[, constraint, ...])

Create a random parameter with a uniform prior in declared space.

normal(loc, sigma, *[, constraint, value, ...])

Create a random parameter with a normal prior in declared space.

lognormal(loc, sigma, *[, constraint, ...])

Create a random parameter with a log-normal prior in declared space.

truncated_normal(loc, sigma, low, high, *[, ...])

Create a random parameter with a truncated normal prior in declared space.

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.