Skip to content
Quantoros

One group contains almost all minority examples. Can StratifiedGroupKFold guarantee both perfect stratification and…

Classic MLLevel: AdvancedStratification feasibility

One group contains almost all minority examples. Can StratifiedGroupKFold guarantee both perfect stratification and group separation?

Hints
  • Check whether the requested split is mathematically feasible.
  • Leakage prevention outranks cosmetic balance.

Answer

This answer is part of mentoring

Advanced questions come with a full breakdown and a mock interview with a working quant researcher. The first call is free.

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

Related questions