plot_sl_roc: ROC curve of microbiome marker from supervised learning...

View source: R/plot-sl-roc.R

plot_sl_rocR Documentation

ROC curve of microbiome marker from supervised learning methods

Description

Show the ROC curve of the microbiome marker calculated by run_sl.

Usage

plot_sl_roc(mm, group, nfolds = 3, nrepeats = 3, tune_length = 5, ...)

Arguments

mm

a microbiomeMarker object.

group, nfolds, nrepeats, tune_length, ...

same with the run_sl().

Value

a ggplot2::ggplot object.

See Also

run_sl()

Examples

data(enterotypes_arumugam)
# small example phyloseq object for test
ps_s <- phyloseq::subset_taxa(
    enterotypes_arumugam,
    Phylum %in% c("Firmicutes", "Bacteroidetes")
)

set.seed(2021)
mm <- run_sl(
    ps_s,
    group = "Gender",
    taxa_rank = "Genus",
    nfolds = 2,
    nrepeats = 1,
    top_n = 15,
    norm = "TSS",
    method = "LR",
)
plot_sl_roc(mm, group = "Gender")

yiluheihei/microbiomeMarker documentation built on Nov. 5, 2023, 7:19 a.m.