DistrictDataLabs / yellowbrick

Visual analysis and diagnostic tools to facilitate machine learning model selection.
http://www.scikit-yb.org/
Apache License 2.0
4.3k stars 559 forks source link

Unable to Use Keras Model for Visualizations #1240

Closed raghavgurbaxani closed 2 years ago

raghavgurbaxani commented 2 years ago

Hi all Great work. I am trying to use a keras trained model (with 30~ classes) with the classification visualizers ?

But I get the following error. -

yellowbrick.exceptions.YellowbrickTypeError: This estimator is not a classifier; try a regression or clustering score visualizer instead!

Is there a way to make keras / tensorflow models work. ?

bbengfort commented 2 years ago

Hi @raghavgurbaxani thank you for using Yellowbrick! Sorry, no one has responded to you in such a long time, I think the issue got buried in our GitHub notifications.

Yellowbrick is designed specifically for use with scikit-learn models, however, third-party packages that implement the scikit-learn API like Keras may be compatible with some Yellowbrick visualizers. We've created a wrapper library to deal with the issue that you noted and add the metadata that Yellowbrick requires. You can read the wrapper documentation here:

https://www.scikit-yb.org/en/latest/api/contrib/wrapper.html

Hope that helps, and thanks again for using Yellowbrick and sending us a note!