Checking Rare Class Counts After a Split
A split can leave too few examples of an important class to evaluate it reliably. Record counts and choose a method aligning with intended use.
- Source
- Anbloq
- Language
- English
- Created
- Updated
- Chapters
- 4
- Reading time
- 1 min
In this article4 chapters
Trace six special cases
A data set may include only six positive examples. A random holdout can receive just one or none. Sampling without replacement describes why the outcome varies.
Respect group and time boundaries
Maintaining class proportions can help a suitable random split, while group or future-time separation may matter more. Report class counts in the chosen split. Whole-group holdouts give an example.[1][2]
Inspect actual positive counts after grouping
A dataset has one thousand rows and twelve positives. A held-out set of two hundred rows may contain few positives, especially if they cluster within one group. A recall estimate based on two positives changes by fifty percentage points per outcome. See small-sample metric resolution.
Test set has 2 actual positives
Detect one → recall .5
Detect both → recall 1.0
Detect none → recall 0
Split according to the deployment goal first
Stratification can preserve proportions in some settings, but it must respect group and time restrictions where required. Report counts and avoid drawing precise conclusions from a handful of cases.