plotPerf: Line plot of classification statistics

Description Usage Arguments Value

View source: R/plotPerf.R

Description

Plots the classification statistics (e.g. true positive rate, true negative rate) as a line plot.

Usage

1
2
3
4
5
6
7
8
9
plotPerf(
  confusion,
  metrics = c("tpr", "tnr"),
  avg.method = NULL,
  title = NULL,
  show.intersection = F,
  intersection.only = F,
  legend.in.plot = T
)

Arguments

metrics

A character vector of the desired statistics. Multiple metrics can be specified.

title

User specified plot title. If unspecified, the plot title defaults to the names of the statistics chosen.

show.intersection

Show the intersection of 2 performance metrics.

intersection.only

Only return the intersection value (cutoff value)

legend.in.plot

Put legend within plot area?

m

A matrix or data frame with each row being a confusion matrix. The output of confusionMatrix(probs.predicted, logicals.expected, cutoff = 'all')

Value

Returns a ggplot2 line plot


luannnguyen/mltoolkit documentation built on Aug. 29, 2020, 8:31 a.m.