cleverly.validation.PlannedRefitTest#

class cleverly.validation.PlannedRefitTest(name: str, draws: int, refits_per_draw: int, refits: int, unit: PlannedFits | None, learner_fits: int, candidate_fits: int, min_fits: int, preparation: int = 0, stored: int = 0, bound: Literal['exact', 'upper'] = 'exact', notes: tuple[str, ...] = ())[source]#

The refits one test of a refute() call would make.

Parameters:
namestr

The test, as tests= names it.

drawsint

The draws the test makes: the resolved replicate count, or 1 for a one-off fit.

refits_per_drawint

2 for random_common_cause with seed_spread=True, else 1.

refitsint

The refits the test runs. 0 where it runs none, such as a longitudinal placebo for a regimen its kernel never draws.

unitPlannedFits or None

The preview of one refit; None where no refit runs.

learner_fitsint

Top-level learner fits over every refit, plus preparation. For an upper test, the most the test can make.

candidate_fitsint

Fits of base estimators inside those fits, plus preparation.

min_fitsint

The fewest top-level fits the test makes when no draw fails.

preparationint

Fits made once before the draws, such as the frozen models of a plasmode law.

storedint

Draws a checkpoint= directory already holds. A resume loads them, so refits and the fit counts cover only the other draws - stored.

bound{“exact”, “upper”}

"exact" when the counts are the ones the test makes, assuming no fit raises.

notestuple of str

What the counts of this test assume.

Methods#

Attributes#

PlannedRefitTest.bound: Literal['exact', 'upper'] = 'exact'#
PlannedRefitTest.notes: tuple[str, ...] = ()#
PlannedRefitTest.preparation: int = 0#
PlannedRefitTest.stored: int = 0#
PlannedRefitTest.name: str#
PlannedRefitTest.draws: int#
PlannedRefitTest.refits_per_draw: int#
PlannedRefitTest.refits: int#
PlannedRefitTest.unit: PlannedFits | None#
PlannedRefitTest.learner_fits: int#
PlannedRefitTest.candidate_fits: int#
PlannedRefitTest.min_fits: int#