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

Feature Request: Confusion Matrix #113

Closed
3h4 opened this issue Aug 18, 2022 · 9 comments
Closed

Feature Request: Confusion Matrix #113

3h4 opened this issue Aug 18, 2022 · 9 comments

Comments

@3h4
Copy link

3h4 commented Aug 18, 2022

Amazing library! Would it be possible to plot a confusion matrix? Perhaps I can do it with the matrix_plot and then put text on top of that?

@piccolomo
Copy link
Owner

Thanks for the appreciation:-)

Would that be the confusion matrix connected to machine learning?

@3h4
Copy link
Author

3h4 commented Aug 18, 2022

Yes indeed, that is the case :)

@piccolomo
Copy link
Owner

Thanks, will answer relatively soon!

@piccolomo
Copy link
Owner

Hi @3h4, finally working on your idea. Here is a partial result:

image

I will upload new code soon. Any feedback for now is welcomed.

Thanks

@3h4
Copy link
Author

3h4 commented Sep 1, 2022

@piccolomo Wow looks perfect! Would it be possible to have more classes than 2, for example 15 different animals or something like that? So you can put a percentage or number in the square and class on the axes. Perhaps there will be not enough room so only numbers can be used? Or single letters. Great work so far!

@piccolomo piccolomo changed the title Plot confusion matrx? Feature Request: Confusion Matrix Sep 2, 2022
@piccolomo
Copy link
Owner

Hi @3h4 , I finally updated plotext including the changes you asked for.

I introduced the function confusion_matrix(), but haven't tested properly so any feedback is welcomed.

The new version is available on GitHib for now and soon also on PyPi. To install follow the indications here.

Your changes are documented here and you have been credited here.

Any feedback is welcomed.

Thanks a lot for your inputs and all the best,
Savino

@3h4
Copy link
Author

3h4 commented Sep 2, 2022

@piccolomo Omg, Perfect! Is it possible to put it in a subplot as well? What happens if the space becomes too small?

@piccolomo
Copy link
Owner

piccolomo commented Sep 2, 2022

I think you can, if the space diminishes the plot tries its best to adapt, if too small some features disappear. Try it if you want and can and see if there are any issues. No worries otherwise, I really haven't played around it much. Thanks :-)

@piccolomo
Copy link
Owner

I was trying to get some nice blue shaded rectangles, as gray is a bit dull, but could not find a way around it. If anyone can please send some code. Thanks :-)

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

No branches or pull requests

2 participants