View source: R/plot_Accuracy.R
plot.Accuracy | R Documentation |
Accuracy
objectsDraw the error graph of class ODRF
at different tree sizes.
## S3 method for class 'Accuracy'
plot(x, lty = 1, digits = NULL, main = NULL, ...)
x |
Object of class |
lty |
A vector of line types, see |
digits |
Integer indicating the number of decimal places (round) or significant digits (signif) to be used. |
main |
main title of the plot. |
... |
Arguments to be passed to methods. |
OOB error and test error, misclassification rate (MR) for classification or mean square error (MSE) for regression.
ODRF
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 = 30)
(error <- Accuracy(forest, train_data, test_data))
plot(error)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.