Python Idle
Not all cross-validation is created equal. A simple KFold split can accidentally put all examples of one class into the same fold, giving you wildly unstable scores. StratifiedKFold preserves class proportions in every fold — but when does that actually matter? Time to run the experiment and find out.
~15 minscenario150 rows
Loading Python runtime...
Goals: 3 tests
should produce 5 KFold scores
should produce 5 StratifiedKFold scores
both methods should achieve >90% mean accuracy on iris
Python loading...