cleverly.longitudinal.LongitudinalRepeat#
- class cleverly.longitudinal.LongitudinalRepeat(folds: Folds, seed: int | None, fits: dict[str, RegimenFit], mechanism: Mechanism, estimates: dict[str, ParameterEstimate], replay_recipe: _LongitudinalReplayRecipe, msm_fits: tuple[MSMRegimenFit, ...] = (), fold_mechanisms: tuple[FoldMechanism, ...] = (), isotonic_moves: tuple[tuple[str, str | None, int, float, float], ...] = (), initial_hazards: InitialHazards | None = None, learned_regimen: LearnedRegimenRecord | None = None)[source]#
One draw of the cross-fitting split of a longitudinal fit, and what it produced.
A fit with
repeats=RholdsRof these inLongitudinalResult.repeats. Each is the complete single-draw fit at its own fold assignment and seed, so drawrequals a fit withrepeats=1atrandom_state=seed.- Parameters:
- folds
Folds The realized outer-fold assignment of the draw.
- seed
intorNone The seed of the draw’s split. On a fit with
repeats > 1every learner of the draw receives it too.Noneonly on an in-sample fit.- fits
dictofstrtoRegimenFit The draw’s sequential fits by regimen, cause and horizon.
- mechanism
Mechanism The draw’s fitted treatment and observation mechanisms.
- estimates
dictofstrtoParameterEstimate Every estimate the draw reports, with its influence curve and its own status.
- replay_recipe
object The draw’s unfitted learner templates and resolved plans, for a truncation replay.
- msm_fits
tupleofMSMRegimenFit The draw’s projection fits by cause, empty without a working model.
- fold_mechanisms
tupleofFoldMechanism The draw’s per-fold mechanisms on a cross-fitted SDR or IPSI fit, empty otherwise.
- isotonic_moves
tupleoftuple The levels an
isotonic=Trueprojection moved, as(regimen, cause, horizon, before, after).- initial_hazards
InitialHazardsorNone The initial cause-specific hazards of a
survival_model="hazard"fit.- learned_regimen
LearnedRegimenRecordorNone The fold rules of a
LearnedRegimenfit, andNoneon every other fit.
- folds
Methods#
Attributes#
- LongitudinalRepeat.learned_regimen: LearnedRegimenRecord | None = None#
- LongitudinalRepeat.mechanism: Mechanism#
- LongitudinalRepeat.estimates: dict[str, ParameterEstimate]#
- LongitudinalRepeat.replay_recipe: _LongitudinalReplayRecipe#