Accuracy {ODRF} | R Documentation |
accuracy of oblique decision random forest
Description
Prediction accuracy of ODRF at different tree sizes.
Usage
Accuracy(obj, data, newdata = NULL)
Arguments
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 |
Value
OOB error and test error, misclassification rate (MR) for classification or mean square error (MSE) for regression.
See Also
Examples
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))
[Package ODRF version 0.0.4 Index]