InstrumentalVariableRegression.score_from_prediction#
- InstrumentalVariableRegression.score_from_prediction(pp, y)#
Compute the Bayesian \(R^2\) from an already-sampled posterior predictive.
Reuses a prediction that has already been drawn (e.g. via
predict()) instead of resampling the posterior predictive distribution, whichscore()would otherwise trigger internally.