Skip to content
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

Need a monkey patch when generate a dashboard for SVM with hinge loss #11

Open
qchiujunhao opened this issue Jul 9, 2024 · 0 comments
Assignees
Labels
enhancement Improvement

Comments

@qchiujunhao
Copy link
Contributor

pycaret_classification.py", line 15, in save_dashboard dashboard = generate_classifier_explainer_dashboard(self.exp, self.best_model) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/*/Galaxy-pycaret/Galaxy-Pycaret/tools/dashboard.py", line 74, in generate_classifier_explainer_dashboard explainer = ClassifierExplainer( ^^^^^^^^^^^^^^^^^^^^ File "/*/python3.11/site-packages/explainerdashboard/explainers.py", line 2462, in __init__ assert hasattr(model, "predict_proba"), ( ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ AssertionError: for ClassifierExplainer, model should be a scikit-learn compatible *classifier* model that has a predict_proba(...) method, so not a <class 'sklearn.linear_model._ridge.RidgeClassifier'>! If you are using e.g an SVM with hinge loss (which does not support predict_proba), you can try the following monkey patch:

@qchiujunhao qchiujunhao added the enhancement Improvement label Jul 9, 2024
@qchiujunhao qchiujunhao self-assigned this Jul 22, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement Improvement
Projects
None yet
Development

No branches or pull requests

1 participant