arviz_stats.ELPDData#
- class arviz_stats.ELPDData(*, elpd, se, p, n_samples, n_data_points, scale, warning, good_k, elpd_i=None, pareto_k=None)[source]#
Base container for expected log pointwise predictive density (ELPD) results.
Every cross-validation function returns a subclass of this class.
ELPDDataLOOholds PSIS-LOO-CV results,ELPDDataLOOSubsampleholds subsampled PSIS-LOO-CV results,ELPDDataLOOKFoldholds k-fold cross-validation results andELPDDataLFOholds leave-future-out cross-validation results. The class fixes thekindattribute that names the estimator and determines which additional attributes are available.- Attributes:
kindstrorNoneName of the estimator that produced the result.
- elpd
float Expected log pointwise predictive density.
- se
float Standard error of
elpd.- p
float Effective number of parameters.
- n_samples
int Number of posterior samples.
- n_data_points
int Number of observations.
- scale
str Scale of the estimate,
"log","negative_log"or"deviance".- warningbool
True when a warning was raised during the computation.
- good_k
float Threshold on the Pareto k diagnostic above which estimates are unreliable.
- elpd_i
xarray.DataArray, optional Pointwise ELPD values, only when
pointwise=Truewas requested.- pareto_k
xarray.DataArray, optional Pointwise Pareto k diagnostics, only when
pointwise=Truewas requested.
- __init__(*, elpd, se, p, n_samples, n_data_points, scale, warning, good_k, elpd_i=None, pareto_k=None)#
Methods
__init__(*, elpd, se, p, n_samples, ...[, ...])Attributes
elpd_ikindName of the estimator that produced the result.
pareto_kelpdsepn_samplesn_data_pointsscalewarninggood_k