scikit-learn/scikit-learn — pull request #664 by conradlee (2012-03-01 13:30:51+00:00)
Title: cross_validation.py: fixed bug in text of error message

This branch solves issue 663. I make a small change to correct an error message.

In the initialization method of StratifiedKFold (in cross_validation.py), there is some code that makes sure that k is smaller than the number of entries in the least-populated class. I guess the idea is that each fold should contain at least one example from every class.

In the case that the least populated class has fewer entires than k, the error message says k should be smaller than the number of labels of the least populated class. In fact, k should be larger.