View source: R/ranger_crossRF_util.R
rf_clf.comps | R Documentation |
It runs standard random forests with oob estimation for classification of one level VS all other levels of one category in the datasets. The output includes a list of rf models for the sub datasets and all important statistics for each of features.
rf_clf.comps( df, f, comp_group, verbose = FALSE, clr_transform = TRUE, rf_imp_values = FALSE, ntree = 500, p.adj.method = "bonferroni", q_cutoff = 0.05 )
df |
Training data: a data.frame. |
f |
A factor in the metadata with at least two levels (groups). |
comp_group |
A string indicates the group in the f |
verbose |
A boolean value indicating if show computation status and estimated runtime. |
clr_transform |
A boolean value indicating if the clr-transformation applied. |
rf_imp_values |
A boolean value indicating if compute both importance score and pvalue for each feature. |
ntree |
The number of trees. |
p.adj.method |
The p-value correction method, default is "bonferroni". |
q_cutoff |
The cutoff of q values for features, the default value is 0.05. |
...
Shi Huang
ranger
df0 <- data.frame(t(rmultinom(60, 300,c(.001,.6,.2,.3,.299)))) df <- data.frame(rbind(t(rmultinom(7, 75, c(.21,.6,.12,.38,.099))), t(rmultinom(8, 75, c(.001,.6,.42,.58,.299))), t(rmultinom(15, 75, c(.011,.6,.22,.28,.289))), t(rmultinom(15, 75, c(.091,.6,.32,.18,.209))), t(rmultinom(15, 75, c(.001,.6,.42,.58,.299))))) f=factor(c(rep("A", 15), rep("B", 15), rep("C", 15), rep("D", 15))) comp_group="A" comps_res<-rf_clf.comps(df, f, comp_group, verbose=FALSE, ntree=500, p.adj.method = "bonferroni", q_cutoff=0.05) comps_res
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.