View source: R/random_forest.R
random_forest | R Documentation |
Fits a random forest from a matrix or features X and a vector y.
random_forest(X, y, W = NULL, k = 10, n = 500)
X |
n x m numerical matrix of features (missing values will be removed by sample). |
y |
Length n vector of numerical values (missing values will be removed by column). |
W |
n row numerical matrix of confounders to be included in each model (after selection). |
k |
Integer number of cross validation cycles to perform. |
n |
Number of features to be considered in the model (after correlation filter). |
A list with components:
A table with the following columns:
feature: the column names of X.
RF.imp.mean: an estimate of the importance of that feature for model accuracy.
RF.imp.sd: the standard deviation of the importance estimate.
RF.imp.stability: the proportion of models that used this feature.
rank: the rank of the feature in terms of importance for the model.
MSE: the mean-squared error of the model.
MSE.se: the standard error of the MSE.
R2: the R^2 of the model.
PearsonScore: the Pearson correlation of predicted and observed responses.
A vector of the responses predicted by the random forest.
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.