CalibrationRecord#

class causalpy.historical_validation.CalibrationRecord[source]#

Typed inputs for the existing operating-characteristics engine.

applicable is true only when finite learned-null samples exist and the evidence level is model-conditional. curve_validated is always false. Windows and MCMC draws are not independent experiments, so those flags cannot be set true and independent_experiment_count stays unset.

Direct construction is the downstream contract. conditional_curve() refuses unless the record is applicable, and it calls causalpy.checks.operating_characteristics.operating_characteristics_from_calibration() rather than a second curve.

evidence_level#

Whether the learned-null inputs may be fed to the conditional engine. model-conditional is not a validated launch.

Type:

{‘historical-descriptive’, ‘model-conditional’, ‘inconclusive’, ‘insufficient-history’, ‘fit-failed’}

reasons#

Why the record has this evidence level, including dependence.

Type:

tuple of str

applicable#

True only when null_samples may be fed to the engine.

Type:

bool

curve_validated#

Always false. A true value is rejected.

Type:

bool

null_samples#

Learned-null draws. Present only when applicable is true.

Type:

numpy.ndarray or None

fold_sds#

Raw posterior standard deviations of the scored selection windows. Not floored. The engine rejects non-positive values itself.

Type:

numpy.ndarray or None

fold_means#

Posterior cumulative means of the scored selection windows.

Type:

numpy.ndarray or None

rope_half_width#

ROPE half-width stored for the engine. This is not the decision rule’s effect threshold.

Type:

float or None

threshold#

Decision probability stored for the engine, defaulting to 0.95. This is not causalpy.design.DecisionRule.threshold.

Type:

float or None

scored_window_count#

Selection windows that scored and could enter the null model.

Type:

int

overlapping_pair_count#

Scored selection windows whose analysis indexes intersect.

Type:

int

shared_training_pair_count#

Scored selection windows whose training indexes intersect.

Type:

int

windows_independent#

Always false.

Type:

bool

mcmc_draws_independent#

Always false.

Type:

bool

independent_experiment_count#

Always None. Dependence is disclosed, not counted as independence.

Type:

int or None

model#

learned-null-normal when samples exist, otherwise not-applicable.

Type:

str

Methods

CalibrationRecord.conditional_curve(*[, ...])

Feed this record to the existing operating-characteristics engine.

Attributes

__init__(evidence_level, reasons, applicable, curve_validated=False, null_samples=None, fold_sds=None, fold_means=None, rope_half_width=None, threshold=None, scored_window_count=0, overlapping_pair_count=0, shared_training_pair_count=0, windows_independent=False, mcmc_draws_independent=False, independent_experiment_count=None, model='not-applicable')#
Parameters:
  • evidence_level (Literal['historical-descriptive', 'model-conditional', 'inconclusive', 'insufficient-history', 'fit-failed'])

  • reasons (tuple[str, ...])

  • applicable (bool)

  • curve_validated (bool)

  • null_samples (ndarray | None)

  • fold_sds (ndarray | None)

  • fold_means (ndarray | None)

  • rope_half_width (float | None)

  • threshold (float | None)

  • scored_window_count (int)

  • overlapping_pair_count (int)

  • shared_training_pair_count (int)

  • windows_independent (bool)

  • mcmc_draws_independent (bool)

  • independent_experiment_count (int | None)

  • model (str)

Return type:

None

classmethod __new__(*args, **kwargs)#