Joint distribution#
The joint distribution of the target data and the model parameters given the input data. Please find its reference below.
- class fortuna.prob_model.joint.base.Joint(prior, likelihood)[source]#
Joint distribution class. This is the joint distribution of target variables and random model parameters given input variables and calibration parameters. It is given by
\[p(y, w|x, \phi),\]- where:
\(x\) is an observed input variable;
\(y\) is an observed target variable;
\(w\) denotes the random model parameters;
\(\phi\) denotes the calibration parameters.
- Parameters:
prior (Prior) – A prior distribution.
likelihood (Likelihood) – A likelihood function.
- init(input_shape, **kwargs)[source]#
Initialize the state of the joint distribution.
- Parameters:
input_shape (Shape) – The shape of the input variable.
- Return type:
A state of the joint distribution.
- property rng: RandomNumberGenerator#
Invoke the random number generator object.
- Return type:
The random number generator object.
- class fortuna.prob_model.joint.state.JointState(params, mutable=None, calib_params=None, calib_mutable=None)[source]#
Bases:
ModelManagerState
A joint distribution state. This includes all the parameters and mutable objects of the joint distribution.
- Parameters:
params (Params) – The random parameters of the probabilistic model.
mutable (Optional[Mutable]) – The mutable objects used to evaluate the models.
calib_params (Optional[CalibParams]) – The calibration parameters of the probabilistic model.
calib_mutable (Optional[CalibMutable]) – The calibration mutable objects used to evaluate the calibrators.
- classmethod init_from_states(model_manager_state, output_calib_manager_state=None)[source]#
Initialize a probabilistic model state from an model manager state and a calibration state.
- Parameters:
model_manager_state (ModelManagerState) – An model manager state.
output_calib_manager_state (OutputCalibManagerState) – An output calibration manager state.
- Returns:
A joint distribution state.
- Return type: