Closed ashtou closed 1 year ago
I have also bumped into this error. This seems to be a proper fix. Any ideas? @WillKoehrsen
Today have faced the same error. Could you please fix the current behavior with regression? @WillKoehrsen
Any news on this fix? @WillKoehrsen
Hey Will!
The current code results in the following error for regression tasks:
ValueError: The least populated class in y has only 1 member, which is too few. The minimum number of groups for any class cannot be less than 2.
It's becausestratify
works based on class labels, hence only for classification. This would not affect your Jupyter notebooks, as it leaves your classification example untouched.I'd also set the
random_state
parameter to get the same train/test split every time, but that's up to you.