healthcareai-r icon indicating copy to clipboard operation
healthcareai-r copied to clipboard

function for confusion matrix

Open mmastand opened this issue 6 years ago • 1 comments

Create an evaluate method multiclass so that a confusion matrix is printed as a tibble. I think most of the code to do this is already in plot.multiclass_multiclass_df

mmastand avatar Sep 25 '18 22:09 mmastand

I had originally thought this might work well under evaluate.multiclass, but now I don't think so. That function is for returning performance stats of best or all models. I think the correct way to implement this would be as a separate user-facing function that would get a confusion matrix for both binary and multiclass. I'm not sure where this would go in the package or how a user would know to use it.

  • caret::confusionMatrix has a nice print method but doesn't return a helpful table.
  • The code in plot.multiclass_predicted_df makes a nice tibble but would need its own print method.

Improvement from writing our own might be marginal.

mmastand avatar Sep 28 '18 18:09 mmastand