View source: R/BSkyRandomForest.r
BSkyMultiRandomForest | R Documentation |
Starting with the default value of mtry, search for the optimal value (with respect to Out-of-Bag error estimate) of ntree (no of trees to grow) for randomForest. The function BSkyMultiRandomForest calls the function randomForest with the arguments defined below
BSkyMultiRandomForest(x, y = NULL, startval, endval, stepval, mtry)
x |
a data frame or a matrix of predictors, or a formula describing the model to be fitted (for the print method, an randomForest object). |
y |
A response vector. If a factor, classification is assumed, otherwise regression is assumed. If omitted, randomForest will run in unsupervised mode. |
startval |
starting value for ntree argument in randomForest(). |
endval |
ending value for ntree argument in randomForest(). |
stepval |
count by which startval should be incremented in every iteration till it reaches endval value. |
mtry |
Number of variables randomly sampled as candidates at each split. Note that the default values are different for classification (sqrt(p) where p is number of variables in x) and regression (p/3) |
Prints the optimal number of trees. Also displays a table with ntree and the corresponding Out-of-Bag error
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.