Create an explicit pupil predictive-validation plan
Source:R/pupil-validation.R
create_pupil_validation_plan.RdDefines the prediction target before choosing a partition. The plan distinguishes observation-level known-trial prediction, new trials for known participants, new participants, and finite future time segments. Only non-missing model-outcome rows enter validation partitions.
Usage
create_pupil_validation_plan(
x,
target = c("new_trial_known_participant", "new_participant", "future_segment",
"new_sample_known_trial"),
K = 5L,
future_fraction = 0.2,
seed = 2026
)Arguments
- x
A prepared pupil object, pupil specification, or pupil fit.
- target
One of
"new_sample_known_trial","new_trial_known_participant","new_participant", or"future_segment".- K
Number of folds for K-fold targets.
- future_fraction
Fraction at the end of each trial series held out for the future-segment target.
- seed
Reproducibility seed.