library(randomForest)
data(mtcars)
rf <- randomForest(factor(am) ~ ., mtcars)
confusionMatrix(rf)
confusionMatrix(rf, conf.level = 0.75)
confusionMatrix(rf, threshold = 0.7)
confusionMatrix(rf, threshold = 0.8)
confusionMatrix(rf, threshold = 0.95)
Run the code above in your browser using DataLab