arviz.PyMCSamplingWrapper.log_likelihood__i#
- PyMCSamplingWrapper.log_likelihood__i(excluded_obs, idata__i)#
Get the log likelilhood samples \(\log p_{post(-i)}(y_i)\).
Calculate the log likelihood of the data contained in excluded_obs using the model fitted with this data excluded, the results of which are stored in
idata__i.- Parameters:
- excluded_obs
Observations for which to calculate their log likelihood. The second item from the tuple returned by
sel_observationsis passed as this argument.- idata__i: InferenceData
Inference results of refitting the data excluding some observations. The result of
get_inference_datais used as this argument.
- Returns:
- log_likelihood:
xr.Dataarray Log likelihood of
excluded_obsevaluated at each of the posterior samples stored inidata__i.
- log_likelihood: