Documentation

24.27 Cross-validation, tuning, and selection rules

Learners tune penalty strength within each resampling unit using --cv-folds (default 5). The minimum rule chooses the best mean validation score; the one-SE rule chooses a simpler model within one standard error of the minimum. Different default rules are intentional across learners.

Cross-validation occurs inside already perturbed subject samples. Folds must remain subject-level and respect available design structure. With small half-samples, five folds may contain few subjects or lose category levels, increasing failures and tuning noise.

Record grids, fold construction, selection rules, convergence tolerances, and maximum iterations. Probability changes after tuning changes are method changes, not mere implementation detail.

Common mistakes

  • Leakage between training and validation records of one subject.
  • Comparing minimum-rule and one-SE probabilities as the same method.
  • Using too many folds for small resamples.
  • Ignoring learner nonconvergence.
  • Tuning hyperparameters after viewing final classifications.

Checklist

  • Keep subjects intact within folds.
  • Match fold count to resample size.
  • Prespecify grids and selection rules.
  • Review failure and selected-set size by learner.
  • Qualify tuning on synthetic reference data.

Further reading

Continue to stability metrics and failed-fit gates.