Description Usage Arguments Details Value Author(s) Examples
tuneMTRY
tries to identify the 'optimal' value of the mtry parameter which indicates the
number of input variables randomly chosen at each node
1 2 |
data |
the n x p dataframe used to build the models and to tune the parameter mtry. The first two columns must represent respectively the sample names and the class labels related to each sample |
iterations |
the number of different random forest models built for each value of mtry |
maxntree |
the maximum number of trees of each random forest model |
mtry_length |
an integer value representing the number of mtry values to test. |
changeTreeNum |
a logical value indicating whether or not to change |
graph |
a logical value indicating whether to plot the OOB error as a function of the parameter mtry the number of trees during the tuning of mtry |
The function searches for the optimal value of mtry assigning to it a set of values and building different random forests (also with a different
number of trees) for each value of the mtry. The number of models built for each mtry is defined by the iteration
parameter.
The oob errors of each random forest model, computed for each mtry value, are then arranged in a matrix
a list of two elements:
a diagram of the average value of the OOB error as a function of the mtry with its 95% confidence interval
a n x p matrix of n iterations and p mtry values tested
Piergiorgio Palla
1 2 | ## data(cachexiaData)
## res <- tuneMTRY(cachexiaData, iterations = 10, maxntree = 600, mtry_length = 10, graph = FALSE)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.