mcframework.validation.ConvergenceReport#
- class mcframework.validation.ConvergenceReport[source]#
Bases:
objectOutcome of a convergence check against a simulation’s analytic reference.
- Attributes:
- status{“pass”, “fail”, “no-oracle”}
"no-oracle"if the simulation does not declare ananalytic_reference(); otherwise"pass"/"fail"fromwithin_tol.- n
int Number of simulation draws used.
- oracle
floatorNone The known reference value (
Nonewhen no oracle exists).- estimate
floatorNone The Monte Carlo estimate of the mean.
- abs_error
floatorNone |estimate - oracle|.- rel_error
floatorNone abs_error / |oracle|(Nonewhenoracleis0or missing).- se
floatorNone Standard error of the mean.
- ci_low, ci_high
floatorNone Confidence-interval endpoints for the mean.
- within_ci
bool Whether
oraclelies within[ci_low, ci_high].- within_tol
bool Whether
abs_error <= sigma_tol * se.- sigma_tol
float Standard-error multiplier used for
within_tol.- confidence
float Confidence level used for the interval.
- reference_source
str Citation for the oracle, copied from the simulation.
- reference_kind
str Kind of reference:
"closed-form","benchmark","limit", or"".
Methods
- classmethod __new__(*args, **kwargs)#
- __init__(status: str, n: int, oracle: float | None = None, estimate: float | None = None, abs_error: float | None = None, rel_error: float | None = None, se: float | None = None, ci_low: float | None = None, ci_high: float | None = None, within_ci: bool = False, within_tol: bool = False, sigma_tol: float = 5.0, confidence: float = 0.99, reference_source: str = '', reference_kind: str = '') None#