A small dataset may produce folds with very different category support. Stratification can help preserve label proportions, but it does not solve every sampling problem.
Scikit-learn describes stratified splitting approaches that preserve class proportions across subsets. Scikit-learn — cross validation.
Check competing constraints
Related images may still need grouping, and time ordering may still matter. Do not break those boundaries merely to obtain visually balanced class counts. Choose an evaluation design around the real dependence structure.

Report what remains small
A proportionally preserved rare class can still contain too few examples for a strong conclusion. Retain counts and limitations with the score. Balanced-looking folds do not make the source dataset representative of every future product.

Source reviewed 25 October 2026. Interpretation and original diagrams: PLUSHIP / Qunhe. Examples are illustrative.
Related reading
A Decision Tree Learns Splits From Data Rather Than Writing a Specification
A Missing-Data Indicator Can Carry Information of Its Own
A Learning Curve Can Inform the Next AI Data-Collection Decision
