View source: R/ranger_crossRF_plot_util.R
rf_clf.comps.summ | R Documentation |
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 summary of rf models in the sub datasets, all important statistics for each of features, and plots.
rf_clf.comps.summ(
df,
f,
comp_group,
clr_transform = TRUE,
nfolds = 3,
verbose = FALSE,
ntree = 5000,
p_cutoff = 0.05,
p.adj.method = "bonferroni",
q_cutoff = 0.05,
outdir = NULL
)
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 |
clr_transform |
A string indicates one class in the 'c_category' column of metadata. |
nfolds |
The number of folds in the cross validation. |
verbose |
A boolean value indicates if showing computation status and estimated runtime. |
ntree |
The number of trees. |
p_cutoff |
The cutoff of p values for features, the default value is 0.05. |
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. |
outdir |
The outputh directory, default is "./". |
A list includes a summary of rf models in the sub datasets, all important statistics for each of features, and plots.
ranger
df <- data.frame(t(rmultinom(60, 300,c(.001,.6,.2,.3,.299))))
f=factor(c(rep("A", 15), rep("B", 15), rep("C", 15), rep("D", 15)))
comp_group="A"
rf_clf.comps.summ(df, f, comp_group, verbose=FALSE, ntree=500, p_cutoff=0.05,
p.adj.method = "bonferroni", q_cutoff=0.05, outdir=NULL)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.