StanModel

class viabel.StanModel(fit)[source]

Class that encapsulates a PyStan model.

Attributes:
supports_tempering

Whether the model supports tempering.

Methods

__call__(model_param)

Compute (unnormalized) log density of the model.

constrain(model_param)

Construct dictionary of constrained parameters.

set_inverse_temperature(inverse_temp)

If tempering supported, set inverse temperature.

__init__(fit)[source]
Parameters:
fitStanFit4model object
constrain(model_param)[source]

Construct dictionary of constrained parameters.

Parameters:
model_paramnumpy.ndarray, shape (dim,)

Model parameter value

Returns:
constrained_paramsdict
Raises:
NotImplementedError

If constrained parameterization is not supported.