StrctTerm.factor_scale()

StrctTerm.factor_scale()#

StrctTerm.factor_scale(atol=1e-05)[source]#

Turn this term into a partially standardized form.

This means the prior for the coefficient will be turned from coef ~ N(0, scale^2 * inv(penalty)) into latent_coef ~ N(0, inv(penalty)); coef = scale * latent_coef.

Return type:

Self

Examples

>>> x = jnp.linspace(0.0, 1.0, 4)
>>> basis = Basis(
...     jnp.column_stack([jnp.ones_like(x), x]),
...     xname="x",
...     penalty=jnp.eye(2),
... )
>>> term = StrctTerm.f(basis, scale=1.0)
>>> term.factor_scale().scale_is_factored
True