Skip to content
ML Academy

Introduced on day 15

Cross-validation

Repeatedly fitting on part of the data and scoring on the held-out part, so that every row is scored once by a model that did not train on it.

In detail

k-fold splits rows into k parts; stratified k-fold keeps the class share in each part; group k-fold keeps all rows of one entity in one part; time-ordered variants train on earlier rows and test on later ones. The estimate is honest only if the folds mimic the deployment relationship between training and prediction rows, and only if nothing was selected with the same folds.