AI engineering glossary · ML fundamentals
What is stratified k-fold?
Stratified k-fold (also called Stratified cross-validation): A version of k-fold cross-validation that keeps the proportion of each class roughly the same in every fold as in the full data. It prevents a fold from having too few or no examples of a rare class, which would make scores misleading.
Stratified k-fold: an example
If 5% of 2,000 transactions are fraud, every fold has about 20 fraud cases out of 400 instead of some folds getting almost none.
Related terms
More ML fundamentals terms
- Structural risk minimisation
- Supervised learning
- Target leakage
- Temporal leakage
- Test set
- Time-series split
- Train-test contamination
- Training
Where you learn it
Stratified k-fold is part of the AI Engineering Program, which teaches it with notes, a hands-on lab and an exam. The first lesson is free.