compareTreecalcs | R Documentation |
Compare error rates, between different functions and different selection rules, for an approximately equal random division of the data into a training and test set.
compareTreecalcs(x = yesno ~ ., data = DAAG::spam7, cp = 0.00025, fun = c("rpart",
"randomForest"))
x |
model formula |
data |
an data frame in which to interpret the variables named in the formula |
cp |
setting for the cost complexity parameter |
fun |
one or both of "rpart" and "randomForest" |
Data are randomly divided into two subsets, I and II. The function(s) are used in the standard way for calculations on subset I, and error rates returined that come from the calculations carried out by the function(s). Predictions are made for subset II, allowing the calculation of a completely independent set of error rates.
If rpart
is specified in fun
, the following:
rpSEcvI |
the estimated cross-validation error rate
when |
rpcvI |
the estimated cross-validation error rate when
|
rpSEtest |
the error rate when the model that leads to |
rptest |
the error rate when the model that leads to |
nSErule |
number of splits required by the one standard error rule |
nREmin |
number of splits to give the minimum error |
If rpart
is specified in fun
, the following:
rfcvI |
the out-of-bag (OOB) error rate when
|
rftest |
the error rate when the model that leads to |
John Maindonald
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.