R multiclass/multinomial classification ROC using multiclass.roc (Package ‘pROC’) -


I'm having difficulty understanding how multiclass.roc parameter should look like. Here's a snapshot of my data:

  & gt; Head (test.logist $ cut.rank) [1] 3 3 3 3 1 3 Level: 1 2 3 & gt; Head (mnm.predict.test.probs) 1 2 3 9 1.013755e-04 3.713862e-02 0.9 6276001 10 1.904435e -11 3.153587e-02.99, 68,46,413 12 6.445101e-23 1.119782e - 11 1.00000000 13 1.238355e-04 2.882145e-02.29, 71,05,472 22 9.027254e-01 7.259787e-07 0.0 9 72738 9 26 1.365667e-01 4.034372e-01 0.45 999 610 & gt; I tried to call multiclass.roc with:  
  multiclass.roc (feedback = test.logist $ cut.rank, predictor = mnm.predict .test .probs, formula = feedback ~ predictor)  

But naturally I get an error:

  error in roc.default (feedback , Predictor, levels = x  

When this is a binary classification problem, I know that the 'predictor' should have probability (a per overview). But, in my case, I have 3 sections, then there is a list of my predictor (or 3 sublist rows of values) that is 3 columns in each category, according to the prospect for each class, no one like my 'predictor' That should be compared to what should know that it currently looks?

The PRC package really This case is not designed to handle, where you have many predictions You will probably assess your P (class = 1)

  multiclass.roc (feedback = testing.logist $ cut.rank, predictor = mnm. Predict.test.probs [, 1])  

and then repeat it with P (class = 2) and P (class = 3). Or better, set the most likely category:

  predicted.class & lt; - apply (mnm.predict.test.probs, 1, which.max) multiclass.roc (feedback = test.logist $ Cut.rank, predictor = predicted.class)  

Multiclass.roc Think of a toy which can sometimes be useful but may not really fit your needs.


Comments

Popular posts from this blog

python - Overriding the save method in Django ModelForm -

html - CSS autoheight, but fit content to height of div -

qt - How to prevent QAudioInput from automatically boosting the master volume to 100%? -