Skip to content
ML Academy

Introduced on day 9

Cross-fitting

Computing a learned transformation for each training row from the other folds only, so no row is encoded with information from its own label.

In detail

scikit-learn's TargetEncoder.fit_transform uses it by default (cv=5); calling fit then transform on the same rows does not. For time-ordered data, an expanding-window version (only earlier outcomes) is the point-in-time variant.