-
-
Notifications
You must be signed in to change notification settings - Fork 26.2k
Closed
Description
Via #9741.
from sklearn.model_selection import GridSearchCV
from sklearn.linear_model import LogisticRegression
from sklearn.datasets import make_blobs
X, y = make_blobs()
grid = GridSearchCV(LogisticRegression(), {'C': [.1, 1]})
grid.fit(X, y.reshape(-1, 1))
IndexError: too many indices for array
While
from sklearn.model_selection import KFold
grid = GridSearchCV(LogisticRegression(), {'C': [.1, 1]}, cv=KFold(3))
grid.fit(X, y.reshape(-1, 1))
works and raises DataConversionWarning
.
I'm pretty sure using multi-label y will also crash.
Metadata
Metadata
Assignees
Labels
No labels