rfPermute (version 2.1.81)

confusionMatrix: Confusion Matrix

Description

Generate a confusion matrix for Random Forest analyses with error rates translated into percent correctly classified, and columns for confidence intervals and expected classification rates (priors) added.

Usage

confusionMatrix(rf, conf.level = 0.95, threshold = 0.8)

Arguments

rf

a randomForest object.

conf.level

confidence level for the binom.test confidence interval

threshold

threshold to test observed classification probability against.

See Also

classConfInt, exptdErrRate

Examples

Run this code
# NOT RUN {
data(mtcars)

rf <- randomForest(factor(am) ~ ., mtcars, importance = TRUE)
confusionMatrix(rf)

# }

Run the code above in your browser using DataCamp Workspace