question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Wrong error message in StratifiedKFold

See original GitHub issue

All the n_groups for individual classes are less than n_splits=%d. That seem confusing / wrong

Issue Analytics

  • State:closed
  • Created 6 years ago
  • Comments:9 (9 by maintainers)

github_iconTop GitHub Comments

1reaction
amuellercommented, Jul 16, 2017

I’m not blaming @raghavrv

0reactions
balakmrancommented, Jul 18, 2017

Few more suggestions, n_splits=%d cannot be greater than the number of members in each class. n_splits=%d cannot be greater than the number of instances in each and every class.

Read more comments on GitHub >

github_iconTop Results From Across the Web

XG Boost with Kfold Stratified - Kaggle
Explore and run machine learning code with Kaggle Notebooks | Using data from multiple data sources. ... ps_ind_02_cat, Categorical, False, 1.000000.
Read more >
Error with scikit learn CV - python - Stack Overflow
Here is the syntax for defining kfold - from sklearn.model_selection import KFold kf = KFold(n_splits=3, shuffle=False, random_state=None).
Read more >
sklearn.model_selection.StratifiedKFold
StratifiedKFold : Recursive feature elimination with cross-validation ... Preserve order dependencies in the dataset ordering, when shuffle=False : all ...
Read more >
6 Sklearn Mistakes That Silently Tell You Are Rookie
Often, Sklearn throws big red error messages and warnings when you make a mistake. These messages suggest something is seriously wrong with your...
Read more >
Cross Validation done wrong - Alfredo Motta
The first fold is treated as a validation set, and the machine learning algorithm is trained on the remaining k-1 folds. The mean...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found