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: column and row sums in plot_confusion_matrix #15

Closed
MaraAlexeev opened this issue Oct 18, 2020 · 4 comments
Closed

Feature request: column and row sums in plot_confusion_matrix #15

MaraAlexeev opened this issue Oct 18, 2020 · 4 comments

Comments

@MaraAlexeev
Copy link

For plot_confusion_matrix() it would be useful to have additional sums/% feature available in the plot function as below.

image

@LudvigOlsen
Copy link
Owner

I did actually consider this previously but never got around to it.
It would probably be a horizontal bar underneath and a vertical bar to the right with the counts and percentages.

Something similar to this:

image
from https://github.com/wcipriano/pretty-print-confusion-matrix

I would probably just have a single percentage though, as the row/col percentages already give the information that the two percentages in this plot gives.

@LudvigOlsen
Copy link
Owner

LudvigOlsen commented Oct 18, 2020

@MaraAlexeev
I've been playing around with this for a couple of hours now and this is what I've got so far:

Screen Shot 2020-10-18 at 22 45 56

Still have a lot of work to do on it, but this is the kind of design I'm thinking. What do you think?

@MaraAlexeev
Copy link
Author

This looks great.

@LudvigOlsen
Copy link
Owner

I merged the functionality to the master branch, so you can try it out.
There's a new add_sums argument to enable. The appearance of the sum tiles can be changed in the sums_settings argument, using the sum_tile_settings() function.

Install with:
devtools::install_github("LudvigOlsen/cvms")

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

No branches or pull requests

2 participants