reiinakano / scikit-plot

An intuitive library to add plotting functionality to scikit-learn objects.
MIT License
2.43k stars 285 forks source link

Adding a parameter to plot_confusion_matrix() to hide overlaid counts #89

Closed echan5 closed 6 years ago

echan5 commented 6 years ago

Hi @reiinakano,

Thank you for this great repo! I am using plot_confusion_matrix() but my counts are quite large so the overlaid counts end up overlapping each other and result in a cluttered plot. I was wondering if I could submit a pull request to update this function to add a hide_counts parameter to give the option to not plot the counts? I've already forked and created a branch with the changes. Thank you!

reiinakano commented 6 years ago

That sounds good to me. Could you also provide an example image before and after?

echan5 commented 6 years ago

Great, and sure, an example image of before vs after would be:

screen shot 2018-08-14 at 8 10 59 pm
echan5 commented 6 years ago

pull request is now here: https://github.com/reiinakano/scikit-plot/pull/90

echan5 commented 6 years ago

I tried pip install scikit-plot (after pip uninstall scikit-plot) but it seems like it's not installing the updated version with the new parameter (tried the function but it's not recognizing hide_counts). It however did work if I installed via pip install git+https://github.com/reiinakano/scikit-plot. What needs to be done to make it work the first way? I realized I forgot to increase the version in setup.py and I'm not sure if that's related. Thanks!

reiinakano commented 6 years ago

Hi @echan5, I haven't released a new version of scikit plot yet so you won't get it on pypi. I'll probably do a release over the weekend. For now, please stick with the solution you found, which is installing directly from master

echan5 commented 6 years ago

Got it, thank you!

reiinakano commented 6 years ago

New version with your patch is now out. Thanks!