ROC_: [.] Do ROC analysis and plot it's results (ROC_)

View source: R/ROC_.R

ROC_R Documentation

[.] Do ROC analysis and plot it's results (ROC_)

Description

[.] Do ROC analysis and plot it's results (ROC_)

Usage

ROC_(x, labels, label.ordering = NULL, make_plots = TRUE)

ROC_table(prediction.obj)

ROC_plots(prediction.obj)

Arguments

labels

A vector, matrix, list, or data frame containing the true class labels. Must have the same dimensions as predictions.

label.ordering

The default ordering (cf.details) of the classes can be changed by supplying a vector containing the negative and the positive class label.

make_plots

Logical. If TRUE (default) Sensitivity-Specificity plot and plot of sensitivity and specificity at each cot-off point are plotted.

prediction.obj

An object of class prediction.

Value

A) plots as listed in description of make_plots.
B) Table of performance measures a optimal cut of point.

Author(s)

Vilmantas Gegzna

See Also

This function is based on package ROCR.

Examples


library(ROCR)
library(spHelper)

data(ROCR.simple)
ROC_(ROCR.simple$predictions, ROCR.simple$labels)
  ##  Compared groups                      "0 vs. 1"
  ##  Group treated as positive            "1"
  ##  AUC                                  "0.83"
  ##  Cut-off                              "0.5015"
  ##  Sensitivity (True positive rate, Se) "0.85"
  ##  Specificity (True negative rate, Sp) "0.85"
  ##  Mean of Se and Sp                    "0.85"



GegznaV/spHelper documentation built on April 16, 2023, 1:42 p.m.