-
Notifications
You must be signed in to change notification settings - Fork 42
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
"_estimator_type" Definition #260
Comments
yes the problem is that the KerasClassifier class returns False to the
sklearn is_classifier function
you should report this issue on the Keras issue tracker
… |
Thanks you for your response, I thought their should be a problem with the keras classifier, but it works fine in ramps. But in our case I tried with another trees classifiers and put it as an estimator in my classifier class below and arise same error. So I think the issue in this case is with the class that I built, which works fine in jupyter.
Thank you again for this amazing tool |
I asked @BadrAlpha07 to open this issue because several students had issues understanding what was the problem with there submissions for classifiers that where not detected as such. I think having a more comprehensible error (for instance a warning with the error to suggest to check for |
While developing a new classifier class which has
fit
,predict
andpredict_proba
methods, it worked fine locally on jupyter but unfortunately it did not work with ramp tests. You can find the error in the attached image. In fact, I checked the source code of ramp and I understood that it usespredict_proba
for the CV that's why it asks for a 2D array, although my classifier'spredict_proba
works well and gives a 2D array.Prof. @tomMoral suggested to add an
estimator._estimator_type = 'classifier'
which solved the problem. As an enhancement, the problem can be solved by automatically adding this estimator type to the estimator by ramp, or check the._estimator_type
attribute before running the predictions and arise the error thatexpected ._estimator_type = 'classifier' but found...
as done by sklean library.The text was updated successfully, but these errors were encountered: