0
$\begingroup$

I am trying to create a ROC plot based on response variable with three classes. I believe that is possible based on the answer to this question Here. In the answer provide in this question though, they are getting the pred using NaiveBayes to get the model, but I've already created my model and predictions. Does anyone know how I can apply the code to create a ROC for my model and my predictions?

Just to clarify: I see in the code that he does Naive Bayes for each class. I created my model different for the three classes using rpart() then pruning based on the calculation for the best CP. I'm worried that I have create a model for three of the classes using a naive bayes. It's not really going to give me an ROC chart based on the model that I created previously. I guess my question is would the ROC created in the way I linked actually reflect the model I created previously. If it won't reflect model, which I believe that it won't, is there way for me to do a similar thing done in the question I linked using the model I created in rpart? I hope this clarifies my question a bit more.

$\endgroup$
6
  • $\begingroup$ Let me know if you need anymore information would like to see my code. Thanks! $\endgroup$
    – Kliocontar
    Commented Jul 24, 2020 at 22:16
  • $\begingroup$ To my understanding of the link you posted, Mr. Grigorev talks about creating AUC scores for each of the three classes, in the iris dataset it is then for each species. Looks like, you need to create a model for each class and find the average AUC score of them if you want to evaluate the models with AUC. $\endgroup$
    – Thomas
    Commented Jul 24, 2020 at 22:59
  • $\begingroup$ Can you be more specific about what you're asking? To me it sounds like you're asking the exact same question that the one you linked. Can you highlight what differs in yours? $\endgroup$
    – Calimo
    Commented Jul 25, 2020 at 5:47
  • $\begingroup$ Does this answer your question? How to draw ROC curve with three response variable? $\endgroup$
    – Calimo
    Commented Jul 25, 2020 at 5:48
  • $\begingroup$ I see in the code that he does Naive Bayes for each class. I created my model different for the three classes using rpart() then pruning based on the calculation for the best CP. I'm worried that I have create a model for three of the classes using a naive bayes. It's not really going to give me an ROC chart based on the model that I created previously. I guess my question is would the ROC created in the way I linked actually reflect the model I created previously. $\endgroup$
    – Kliocontar
    Commented Jul 25, 2020 at 14:25

0

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Browse other questions tagged or ask your own question.