Accuracy | R Documentation |
Prediction accuracy of ODRF at different tree sizes.
Accuracy(obj, data, newdata = NULL)
obj |
An object of class |
data |
Training data of class |
newdata |
A data frame or matrix containing new data is used to calculate the test error. If it is missing, then it is replaced by |
OOB error and test error, misclassification rate (MR) for classification or mean square error (MSE) for regression.
ODRF
VarImp
plot.Accuracy
data(breast_cancer)
set.seed(221212)
train <- sample(1:569, 80)
train_data <- data.frame(breast_cancer[train, -1])
test_data <- data.frame(breast_cancer[-train, -1])
forest <- ODRF(diagnosis ~ ., train_data, split = "gini",
parallel = FALSE, ntrees = 50)
(error <- Accuracy(forest, train_data, test_data))
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.