pymc.Model.register_rv#

Model.register_rv(rv_var, name, data=None, total_size=None, dims=None, transform=UNSET, initval=None)[source]#

Register an (un)observed random variable with the model.

Parameters
rv_var: TensorVariable
name: str

Intended name for the model variable.

data: array_like (optional)

If data is provided, the variable is observed. If None, the variable is unobserved.

total_size: scalar

upscales logp of variable with coef = total_size/var.shape[0]

dims: tuple

Dimension names for the variable.

transform

A transform for the random variable in log-likelihood space.

initval

The initial value of the random variable.

Returns
TensorVariable