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
AttributeError: module 'sklearn.metrics' has no attribute 'jaccard_similarity_score' #131
Comments
Same here. Thanks |
I'm also getting this error... It looks like jaccard_similarity_score was deprecated since sckiti-learn 0.21 in favor of newer implementation, jaccard_score, and was removed in 0.23: |
Same here, there's also a stack overflow for a different error that suggests this is an sklearn version issue. https://stackoverflow.com/questions/61819628/is-pandas-ml-broken |
Looks like they changed the sklearn function to 'jaccard_score' |
Agree with @benlevitas if you want the library to function correctly, make the following change: The _classification_methods list has the list of accuracy metrics. Changing it leads to the proper functioning of the library. I hope they update this in the file as well. |
In addition to what @hawk-praxs mentioned, then another dependency change will appear related to Imputer, and then another.. an so [. . .]
|
Fixing the Imputer class in the library makes it work. No further errors after this. |
I changed on file: pp.imputer >> pp.SimpleImputer [Bear in Mind that SimpleImputer is no longer in preprocessing, is in "Imputer" class]
From the SkLearn docs |
SimpleImputer is now in sklearn.impute (https://scikit-learn.org/stable/modules/generated/sklearn.impute.SimpleImputer.html). My solution was to change preprocessing.py as followins: I still get "AttributeError: type object 'NDFrame' has no attribute 'groupby'" after these changes though. |
How has this not been fixed in the pandas ml library yet? |
Sorry, I've no idea. I'm not using it anymore.
пн, 19 дек. 2022 г. в 07:54, Michael Robertson ***@***.***>:
… How has this not been fixed in the pandas ml library yet?
—
Reply to this email directly, view it on GitHub
<#131 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AQU33YI4R6IBOZ6EIEQNAZTWN7Z7XANCNFSM4ORT4PUQ>
.
You are receiving this because you commented.Message ID:
***@***.***>
|
I got a new one concerning seaborn.factorplot, so I changed ~/opt/anaconda3/lib/python3.9/site-packages/pandas_ml/snsaccessors/base.py replace "factorplot" with "catplot" in line 223 |
I am using scikit-learn version 0.23.1 and I get the following error:
AttributeError: module 'sklearn.metrics' has no attribute 'jaccard_similarity_score'
when calling the function ConfusionMatrix.
The text was updated successfully, but these errors were encountered: