-
-
Notifications
You must be signed in to change notification settings - Fork 25.8k
GridSearchCV object has no attribute classes_ #6298
New issue
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
Comments
What about |
@TomDLT maybe we could just make a property that returns the best estimator's classes_ attribute. That wouldn't require to make a copy and still make it consistent with the estimator interface. |
the question is whether |
the question is whether classes_ is public classifier API. It kinda is...
I tend to agree. It's just so useful.
|
+1 for exposing |
Came across this thread when searching for the exact application. Would love to see |
Hi, it seems #6449 is a WIP attempt to address this issue. |
#6449 is stalled, I'll add the tag again. |
…ixes #6298 (#7661) * Fix issue #6298 Adds a "classes_" property to BaseSearchCV * Added test to ensure classes_ property is added to gridSearch correctly * Fixed formatting * Added test to ensure gridSearchCV with a regressor does not have a classes_ attribute * Fixed whitespace issues * Combined tests for the new GridSearchSV.classes_ property into a single test. * Removed trailing whitespace * Added what's new for pull request #7661 * Fixed formatting of update in what's new
…ixes scikit-learn#6298 (scikit-learn#7661) * Fix issue scikit-learn#6298 Adds a "classes_" property to BaseSearchCV * Added test to ensure classes_ property is added to gridSearch correctly * Fixed formatting * Added test to ensure gridSearchCV with a regressor does not have a classes_ attribute * Fixed whitespace issues * Combined tests for the new GridSearchSV.classes_ property into a single test. * Removed trailing whitespace * Added what's new for pull request scikit-learn#7661 * Fixed formatting of update in what's new
…ixes scikit-learn#6298 (scikit-learn#7661) * Fix issue scikit-learn#6298 Adds a "classes_" property to BaseSearchCV * Added test to ensure classes_ property is added to gridSearch correctly * Fixed formatting * Added test to ensure gridSearchCV with a regressor does not have a classes_ attribute * Fixed whitespace issues * Combined tests for the new GridSearchSV.classes_ property into a single test. * Removed trailing whitespace * Added what's new for pull request scikit-learn#7661 * Fixed formatting of update in what's new
…ixes scikit-learn#6298 (scikit-learn#7661) * Fix issue scikit-learn#6298 Adds a "classes_" property to BaseSearchCV * Added test to ensure classes_ property is added to gridSearch correctly * Fixed formatting * Added test to ensure gridSearchCV with a regressor does not have a classes_ attribute * Fixed whitespace issues * Combined tests for the new GridSearchSV.classes_ property into a single test. * Removed trailing whitespace * Added what's new for pull request scikit-learn#7661 * Fixed formatting of update in what's new
It would be convenient for me if
GridSearchCV
objects had attributeclasses_
after fitting. Here is a minimal example of something that I would like to do, which does not work currently:I think this could be accomplished by copying the attribute from the
self.best_estimator_
when it is created, and if so, I can make a pull request. But let me know if it is more complicated, or undesired.The text was updated successfully, but these errors were encountered: