Optim.CART: Tune CART for the optimal complexity parameter
Description
The complexity parameter aims to save computing time by pruning off splits that are obviously not worthwhile. This function starting with null value of cp and ranks the different possibles levels of pruning trees find best CART for different levels of cost complexity.
The main role of this parameter is to save computing time by pruning off splits that are obviously not worthwhile.
Data frame from which variables specified in formula are preferentially to be taken.
p
A percentage of training elements
includedata
logicals. If TRUE the training and testing datasets are returned.
seed
a single value, interpreted as an integer, or NULL. The default value is NULL, but for future checks of the model or models generated it is advisable to set a random seed to be able to reproduce it.
Classification And Regression Tree (CART) are a decision tree learning technique that produces either classification or regression trees, first introduced by
Breiman et al.(1984). Trees used for regression and trees used for classification have some similarities -
but also some differences, such as the procedure used to determine where to split.
References
Breiman L., Friedman J. H., Olshen R. A., and Stone, C. J. (1984) Classification and Regression Trees. Wadsworth.
# NOT RUN {if(interactive()){
## Load a Datasetdata(AustralianCredit)
## Generate a modelmodelFit <- Optim.CART(Y~., AustralianCredit, p = 0.7, seed=2018)
modelFit
}
# }