plot_ODT_depth {ODRF} | R Documentation |
plot oblique decision tree depth
Description
Draw the error graph of class ODT
at different depths.
Usage
plot_ODT_depth(
formula,
data = NULL,
newdata = NULL,
split = "gini",
NodeRotateFun = "RotMatPPO",
paramList = NULL,
digits = NULL,
main = NULL,
...
)
Arguments
formula |
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 |
split |
The criterion used for splitting the variable. 'gini': gini impurity index (classification, default), 'entropy': information gain (classification) or 'mse': mean square error (regression). |
NodeRotateFun |
Name of the function of class
|
paramList |
List of parameters used by the functions |
digits |
Integer indicating the number of decimal places (round) or significant digits (signif) to be used. |
main |
main title |
... |
Arguments to be passed to methods. |
Value
OOB error and test error of newdata
, misclassification rate (MR) for classification or mean square error (MSE) for regression.
See Also
Examples
data(body_fat)
set.seed(221212)
train <- sample(1:252, 100)
train_data <- data.frame(body_fat[train, ])
test_data <- data.frame(body_fat[-train, ])
plot_ODT_depth(Density ~ ., train_data, test_data, split = "mse")