rxmc.model_comparison.heldout_log_predictive#

rxmc.model_comparison.heldout_log_predictive(heldout_constraint, model_samples, cov_samples=None)[source]#

log p(y_held | theta_i) for each posterior row.

heldout_constraint is typically fit_constraint.complement(): the same observations, terms and parameters, with the held-out points active. The score is that constraint’s log likelihood at each sample (a 1-D model_samples is one sample).

Returns:

np.ndarray, shape (n,)