BasisDot

Contents

BasisDot#

class liesel_gam.BasisDot(basis, prior=None, name='', inference=None, coef_name=None, _update_on_init=True)[source]#

Bases: UserVar

Basic term variable for a dot-product basis @ coef.

In comparison to StrctTerm, this class makes fewer assumptions, since it does not assume any prior distribution, or structure of the prior distribution, for the coefficients. Instead, a prior for the coefficients of this term (if desired) is defined manually as a liesel.model.Dist in the prior argument.

Examples

>>> x = jnp.linspace(0.0, 1.0, 4)
>>> basis = Basis(jnp.column_stack([jnp.ones_like(x), x]), xname="x")
>>> term = BasisDot(basis)
>>> term.coef.value.shape, term.value.shape
((2,), (4,))