View source: R/variable_selection.R
wrapper.rf | R Documentation |
Provides an interface to different parallel implementations of the random
forest algorithm. Currently, only the ranger
package is
supported.
wrapper.rf( x, y, ntree = 500, mtry.prop = 0.2, nodesize.prop = 0.1, no.threads = 1, method = "ranger", type = "regression", importance = "impurity_corrected", case.weights = NULL, ... )
x |
matrix or data.frame of predictor variables with variables in columns and samples in rows (Note: missing values are not allowed). |
y |
vector with values of phenotype variable (Note: will be converted to factor if classification mode is used). |
ntree |
number of trees. |
mtry.prop |
proportion of variables that should be used at each split. |
nodesize.prop |
proportion of minimal number of samples in terminal nodes. |
no.threads |
number of threads used for parallel execution. |
method |
implementation to be used ("ranger"). |
type |
mode of prediction ("regression", "classification" or "probability"). |
importance |
Variable importance mode ('none', 'impurity', 'impurity_corrected' or 'permutation'). Default is 'impurity_corrected'. |
case.weights |
Weights for sampling of training observations. Observations with larger weights will be selected with higher probability in the bootstrap (or subsampled) samples for the trees. |
... |
further arguments needed for |
An object of class ranger
.
# simulate toy data set data = simulation.data.cor(no.samples = 100, group.size = rep(10, 6), no.var.total = 200) # regression wrapper.rf(x = data[, -1], y = data[, 1], type = "regression", method = "ranger")
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.