We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
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.
DataConversionWarning
The text was updated successfully, but these errors were encountered:
ah, multi-label y will actually default to KFold, but because
KFold
from sklearn.utils.multiclass import type_of_target type_of_target(y.reshape(-1, 1))
'multiclass'
we're using StratifiedKFold here but don't convert y.
StratifiedKFold
Sorry, something went wrong.
No branches or pull requests
Via #9741.
While
works and raises
DataConversionWarning
.I'm pretty sure using multi-label y will also crash.
The text was updated successfully, but these errors were encountered: