Wie gehe ich mit einer ROC-Analyse in mehreren Klassen in R (pROC-Paket) um?

Wenn ich zum Beispiel die multiclass.roc-Funktion in R (pROC-Paket) verwende, habe ich einen Datensatz durch zufällige Gesamtstruktur trainiert. Hier ist mein Code:

# randomForest & pROC packages should be installed:
# install.packages(c('randomForest', 'pROC'))
data(iris)
library(randomForest)
library(pROC)
set.seed(1000)
# 3-class in response variable
rf = randomForest(Species~., data = iris, ntree = 100)
# predict(.., type = 'prob') returns a probability matrix
multiclass.roc(iris$Species, predict(rf, iris, type = 'prob'))

Und das Ergebnis ist:

Call:
multiclass.roc.default(response = iris$Species, predictor = predict(rf,     
iris, type = "prob"))
Data: predict(rf, iris, type = "prob") with 3 levels of iris$Species: setosa,   
versicolor, virginica.
Multi-class area under the curve: 0.5142

Ist das richtig? Vielen Dank!!!

"pROC" -Referenz:http://www.inside-r.org/packages/cran/pROC/docs/multiclass.roc

Antworten auf die Frage(3)

Ihre Antwort auf die Frage