plot_clf_pROC: plot_clf_pROC

View source: R/ranger_clf_plot.R

plot_clf_pROCR Documentation

plot_clf_pROC

Description

plot_clf_pROC

Usage

plot_clf_pROC(
  y,
  rf_clf_model,
  positive_class = NA,
  prefix = "train",
  outdir = NULL
)

Arguments

y

A factor of classes to be used as the true results

rf_clf_model

A list object of a random forest model.

positive_class

an optional character string for the factor level that corresponds to a "positive" result (if that makes sense for your data). If there are only two factor levels, the first level will be used as the "positive" result.

prefix

The prefix of data set.

outdir

The output directory.

Author(s)

Shi Huang

Examples

set.seed(123)
x <- data.frame(rbind(t(rmultinom(7, 75, c(.201,.5,.02,.18,.099))),
            t(rmultinom(8, 75, c(.201,.4,.12,.18,.099))),
            t(rmultinom(15, 75, c(.011,.3,.22,.18,.289))),
            t(rmultinom(15, 75, c(.091,.2,.32,.18,.209))),
            t(rmultinom(15, 75, c(.001,.1,.42,.18,.299)))))
y<-factor(c(rep("A", 30), rep("C", 30)))
rf_clf_model<-rf.out.of.bag(x, y)
positive_class="A"
plot_clf_pROC(y, rf_clf_model, outdir='./')

shihuang047/crossRanger documentation built on Sept. 18, 2024, 2:56 a.m.