rf_clf.comps.summ: rf_clf.comps.summ

View source: R/ranger_crossRF_plot_util.R

rf_clf.comps.summR Documentation

rf_clf.comps.summ

Description

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.

Usage

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
)

Arguments

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 "./".

Value

A list includes a summary of rf models in the sub datasets, all important statistics for each of features, and plots.

See Also

ranger

Examples

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)

shihuang047/crossRanger documentation built on Feb. 7, 2023, 10:03 p.m.