Stratify - Stratify - 5.3 English - 68552

AOCL API Guide (68552)

Document_ID
68552
Release_Date
2026-05-13
Version
5.3 English

If stratification is enabled, train_test_split will try to ensure that the relative proportions of classes in the training and test sets are the same as in the original dataset. This is particularly useful for classification tasks where you want to ensure that both sets have a representative distribution of classes.