cleverly.validation.RefutationResult#
- class cleverly.validation.RefutationResult(tests: tuple[RefutationTest, ...], estimand: str, backend: str | None = None, random_state: int | None = None)[source]#
All refutation tests run on a fit.
- Parameters:
- tests
tupleofRefutationTest One record per refutation run.
- estimand
str Alias the tests were run for.
- backend
strorNone Dataframe backend
to_frame()returns whendatais omitted.- random_state
intorNone Seed this report ran under. Pass it back to
refute()to obtain the report again, whether or not the fit carries a seed of its own.Noneonly on a report built by hand.
- tests
Methods#
- RefutationResult.draws_frame(name: str, data: Any = None) Any[source]#
Return successful and failed draws for one empirical refit test.
- Parameters:
- name
str Name of a generated-outcome or measurement-error refutation in this report.
- data
Any Dataframe or fitted container whose backend to match.
Noneuses the backend recorded by the report.
- name
- Returns:
dataframeOne row per requested empirical draw.
Attributes#
- RefutationResult.backend: str | None = None#
Name of the dataframe backend the fit’s data arrived in, so that
to_frame()honours “results come back in the backend you passed in” without a caller having to thread the container back in by hand.
- RefutationResult.passed#
Return whether every required check passed.
- RefutationResult.random_state: int | None = None#
Seed this report ran under, resolved rather than requested: an explicit seed, else the fit’s own, else one drawn here. It pins the perturbations and the refits they feed, so the report is enough to obtain the report again.
- RefutationResult.tests: tuple[RefutationTest, ...]#