View source: R/PomaRandForest.R
PomaRandForest | R Documentation |
PomaRandForest
performs classification random forest. This method can be used both for prediction and variable selection.
PomaRandForest(
data,
ntest = NULL,
ntree = 500,
mtry = floor(sqrt(ncol(t(SummarizedExperiment::assay(data))))),
nodesize = 1,
nvar = 20
)
data |
A |
ntest |
Numeric. Indicates the percentage of observations that will be used as test set. Default is NULL (no test set). |
ntree |
Numeric. Indicates the number of trees to grow. |
mtry |
Numeric. Indicates the number of variables randomly sampled as candidates at each split. This value is set sqrt(p) (where p is number of variables in data) by default. |
nodesize |
Numeric. Indicates the minimum size of terminal nodes. Default is 1. |
nvar |
Numeric. Indicates the number of variables to show in the Gini Index plot. |
A list
with results including plots and tables.
Pol Castellano-Escuder
A. Liaw and M. Wiener (2002). Classification and Regression by randomForest. R News 2(3), 18–22.
data <- POMA::st000336 %>% # Example SummarizedExperiment object included in POMA
PomaImpute() %>%
PomaNorm()
## Output is a list with objects `MeanDecreaseGini` (tibble), `MeanDecreaseGini_plot` (ggplot2 object), `oob_error` (tibble), `error_tree` (ggplot2 object), and `model` (randomForest object)
data %>%
PomaRandForest(ntree = 500,
mtry = floor(sqrt(ncol(t(SummarizedExperiment::assay(data))))),
nodesize = 1,
nvar = 20)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.