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

add hide_counts parameter to plot_confusion_matrix() #90

Merged
merged 2 commits into from
Aug 15, 2018

Conversation

echan5
Copy link
Contributor

@echan5 echan5 commented Aug 15, 2018

This pull request adds a hide_counts parameter to the plot_confusion_matrix() function to allow for disabling of the overlaying of count text on the plot.

Sample code for testing:

import matplotlib.pyplot as plt
import scikitplot as skplt
from sklearn.datasets import load_digits
from sklearn.ensemble import RandomForestClassifier
from sklearn.model_selection import cross_val_predict

X, y = load_digits(return_X_y=True)
random_forest_clf = RandomForestClassifier(n_estimators=5, max_depth=5, random_state=1)
predictions = cross_val_predict(random_forest_clf, X, y)

skplt.metrics.plot_confusion_matrix(y, predictions, hide_counts=True)
plt.show()

Copy link
Owner

@reiinakano reiinakano left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@echan5
Copy link
Contributor Author

echan5 commented Aug 15, 2018

Test added - thanks!

@reiinakano reiinakano merged commit 19af1c9 into reiinakano:master Aug 15, 2018
@reiinakano
Copy link
Owner

Thanks @echan5 !!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants