bayespecon.diagnostics.SpatialMCMCReport

class bayespecon.diagnostics.SpatialMCMCReport(parameters, ess_bulk, ess_tail, r_hat, mcse_mean, nominal_size, yield_pct, hpdi_drift_pct, warnings_triggered=<factory>, adequate=True, adequate_by_param=<factory>)[source]

Summary of MCMC sampling-efficiency checks for a spatial model.

parameters[source]

Parameter names actually checked (subset of those present in the posterior, in the order they were inspected).

Type:

list of str

ess_bulk[source]

Bulk effective sample size per parameter (ArviZ ess_bulk).

Type:

dict[str, float]

ess_tail[source]

Tail effective sample size per parameter (ArviZ ess_tail).

Type:

dict[str, float]

r_hat[source]

Gelman–Rubin \(\hat{R}\) per parameter.

Type:

dict[str, float]

mcse_mean[source]

Monte-Carlo standard error of the posterior mean per parameter.

Type:

dict[str, float]

nominal_size[source]

Total post-warmup draws aggregated across chains.

Type:

int

yield_pct[source]

ESS-bulk / nominal × 100, the yield statistic from Wolf et al.

Type:

dict[str, float]

hpdi_drift_pct[source]

Relative change in 95 % HPDI width between the last third and the full post-warmup chain, in percent. Large drift indicates the chain has not yet visited the tails enough times for the interval estimate to stabilise.

Type:

dict[str, float]

warnings_triggered[source]

Human-readable description of each adequacy check that failed.

Type:

list of str

adequate[source]

True when no warnings were triggered for the spatial dependence parameter(s).

Type:

bool

adequate_by_param[source]

Per-parameter adequacy flag. True for a parameter when none of the adequacy checks (ESS, yield, HPDI drift, R-hat) failed for it. Only populated for the auto-detected spatial dependence parameters; extra_params are not gated.

Type:

dict[str, bool]

__init__(parameters, ess_bulk, ess_tail, r_hat, mcse_mean, nominal_size, yield_pct, hpdi_drift_pct, warnings_triggered=<factory>, adequate=True, adequate_by_param=<factory>)[source]

Methods

__init__(parameters, ess_bulk, ess_tail, ...)

to_frame()

Return per-parameter diagnostics as a pandas.DataFrame.

Attributes

adequate

parameters

ess_bulk

ess_tail

r_hat

mcse_mean

nominal_size

yield_pct

hpdi_drift_pct

warnings_triggered

adequate_by_param

adequate = True[source]
adequate_by_param[source]
ess_bulk[source]
ess_tail[source]
hpdi_drift_pct[source]
mcse_mean[source]
nominal_size[source]
parameters[source]
r_hat[source]
to_frame()[source]

Return per-parameter diagnostics as a pandas.DataFrame.

One row per spatial dependence parameter (self.parameters), with columns for each per-parameter metric plus an adequate column derived from adequate_by_param. Global scalars (nominal_size) and warnings_triggered are not included; access them on the dataclass directly.

Returns:

Index name "parameter"; columns ordered per _FRAME_COLUMNS.

Return type:

pandas.DataFrame

warnings_triggered[source]
yield_pct[source]