CalibrationRecord#
- class causalpy.historical_validation.CalibrationRecord[source]#
Typed inputs for the existing operating-characteristics engine.
applicableis true only when finite learned-null samples exist and the evidence level ismodel-conditional.curve_validatedis always false. Windows and MCMC draws are not independent experiments, so those flags cannot be set true andindependent_experiment_countstays unset.Direct construction is the downstream contract.
conditional_curve()refuses unless the record is applicable, and it callscausalpy.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-conditionalis not a validated launch.- Type:
{‘historical-descriptive’, ‘model-conditional’, ‘inconclusive’, ‘insufficient-history’, ‘fit-failed’}
- null_samples#
Learned-null draws. Present only when
applicableis 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 selection windows whose training indexes intersect.
- Type:
- independent_experiment_count#
Always None. Dependence is disclosed, not counted as independence.
- Type:
int or None
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'])
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)#