calcRocStats: Calculate ROC Statistics

View source: R/calcRocStats.R

calcRocStatsR Documentation

Calculate ROC Statistics

Description

Calculates ROC statistics for a set of classes and their probabilities data. ROC statistics include: ROC, area under ROC curve (AUC), precision, accuracy.

Usage

calcRocStats(classes = NULL, probs = NULL, posClass = NULL, negClass = NULL)

Arguments

classes

A character vector of classifications.

probs

A numeric vector of probability values corresponding to the elements of classes.

posClass

Name of the positive class.

negClass

Name of the negative class.

Value

A list of ROC statistic objects and values.

Examples


library(TerrainWorksUtils)

# Generate test data with a bit of class probability overlap
classes <- c(rep("POS", 40), rep("NEG", 60))
probs <- c(runif(40, 0.4, 1.0), runif(60, 0.0, 0.6))

rocStats <- calcRocStats(classes, probs, "POS", "NEG")


tabrasel/WetlandTools documentation built on Dec. 20, 2024, 8:50 a.m.