arviz_stats.ELPDData

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. ELPDDataLOO holds PSIS-LOO-CV results, ELPDDataLOOSubsample holds subsampled PSIS-LOO-CV results, ELPDDataLOOKFold holds k-fold cross-validation results and ELPDDataLFO holds leave-future-out cross-validation results. The class fixes the kind attribute that names the estimator and determines which additional attributes are available.

Attributes:
kindstr or None

Name of the estimator that produced the result.

elpdfloat

Expected log pointwise predictive density.

sefloat

Standard error of elpd.

pfloat

Effective number of parameters.

n_samplesint

Number of posterior samples.

n_data_pointsint

Number of observations.

scalestr

Scale of the estimate, "log", "negative_log" or "deviance".

warningbool

True when a warning was raised during the computation.

good_kfloat

Threshold on the Pareto k diagnostic above which estimates are unreliable.

elpd_ixarray.DataArray, optional

Pointwise ELPD values, only when pointwise=True was requested.

pareto_kxarray.DataArray, optional

Pointwise Pareto k diagnostics, only when pointwise=True was 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_i

kind

Name of the estimator that produced the result.

pareto_k

elpd

se

p

n_samples

n_data_points

scale

warning

good_k