cleverly.validation.planned_refits#
- cleverly.validation.planned_refits(result: Any, **kwargs: Any) PlannedRefits[source]#
Count the refits and learner fits
refute()would make.Takes exactly
refute’s keywords and runs every checkrefuteruns before its first draw, so a requestrefuterefuses raises the same record here. It fits nothing.- Parameters:
- result
TMLEResultoranotherfittedresultthatrefuteaccepts The fit.
- **kwargs
Any refute’s keywords:estimand,tests,n_replicates,seed_spreadand the rest. Onlyrandom_stateand the arguments that decide what runs change the counts.
- result
- Returns:
PlannedRefitsOne record per requested test.
- Raises:
TypeErrorIf a keyword is not one
refutetakes.ValueErrorIf an argument is malformed, as
refuteraises it.CapabilityErrorIf
refuterefuses the request, with the same record, or if the fit’s estimator has no refit preview.
Notes
With
checkpoint=, the preview reads the directory without writing to it, refuses a requestrefutewould refuse there, and counts only the draws a resume would refit (PlannedRefitTest.storedholds the rest).progressis ignored.The noise refits, the negative control and the future-treatment fit read data and seeds known before any draw, so they are counted exactly. Every other test refits drawn data and is counted at the learners’ nominal counts, as an upper bound with a floor that holds when no draw fails. A draw that a check refuses part way through (a subset draw, a band-rank placebo draw on a fit whose seed is drawn at the call) can still stop
refute.