-
Notifications
You must be signed in to change notification settings - Fork 281
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
scikit-plot should decorate object instead of add new methods #23
Comments
Hi @leiserfg ! This is an interesting suggestion. Could you expound with an example of what you want to see? |
that's what i expected from sklearn.datasets import load_digits as load_data
from sklearn.naive_bayes import GaussianNB
import matplotlib.pyplot as plt
from scikitplot import classifier_factory
X, y = load_data(return_X_y=True)
nb = GaussianNB()
#canvas can be a subplot instead a plot (imagine that you wanna compare classifiers)
plotter = classifier_factory(nb, canvas=plot)
plotter.plot_roc_curve(X, y, random_state=1)
plt.show() |
Hi @leiserfg , sorry for the long time it took to answer this. Anyway, all In the case of having a particular subplot to use as a canvas, you would do this. from sklearn.datasets import load_digits as load_data
from sklearn.naive_bayes import GaussianNB
import matplotlib.pyplot as plt
from scikitplot import classifier_factory
X, y = load_data(return_X_y=True)
nb = GaussianNB()
#canvas can be a subplot instead a plot (imagine that you wanna compare classifiers)
plotter = classifier_factory(nb)
plotter.plot_roc_curve(X, y, random_state=1, ax=plot)
plt.show() |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
No description provided.
The text was updated successfully, but these errors were encountered: