Skip to content
Quantoros

A validation fold contains no positives and ROC-AUC is undefined. Which split change helps, and what limitation remains?

Classic MLLevel: IntermediateMissing class in a fold

A validation fold contains no positives and ROC-AUC is undefined. Which split change helps, and what limitation remains?

Hints
  • Count minority samples before choosing folds.
  • A splitter cannot create evidence.

Answer

Stratification helps retain class representation when enough examples exist. It cannot manufacture minority examples; too many folds or grouped data may still make the metric unestimable.

Source and licence: scikit-learn 1.7.2 — cross validation · BSD-3-Clause · answer: Quantoros editorial

Related questions