Package 'MultiClassROC'

Title: ROC Curves for Multi-Class Analysis
Description: Function multiroc() can be used for computing and visualizing Receiver Operating Characteristics (ROC) and Area Under the Curve (AUC) for multi-class classification problems. It supports both One-vs-One approach by M.Bishop, C. (2006, ISBN:978-0-387-31073-2) and One-vs-All approach by Murphy P., K. (2012, ISBN:9780262018029).
Authors: Marton Varga [cre, aut]
Maintainer: Marton Varga <[email protected]>
License: GPL-3
Version: 0.1.0
Built: 2024-11-12 06:29:55 UTC
Source: CRAN

Help Index


ROC Curves for Multi-Class Analysis

Description

Function 'multiroc' can be used for computing and visualizing Receiver Operating Characteristics (ROC) and Area Under the Curve (AUC) for multi-class classification problems. It supports both one-vs-one and one-vs-all approaches.

Usage

multiroc(y, x, k, type = c("OvO", "OvA"), plot = TRUE, data)

Arguments

y

A string, dependent variable

x

A vector of strings, independent variables

k

The number of categories

type

A string, "OvO" for one-vs-one, "OvA" for one-vs-all approach

plot

A logical, TRUE for the plot of the curves, FALSE for the average AUC

data

A data frame, the dataset to use

Value

plot with ROC curves using ggroc, pROC (if plot=TRUE) or the average AUC (if plot=FALSE)

Examples

multiroc(y="Species",
             x=c("Petal.Width","Petal.Length","Sepal.Width","Sepal.Length"),
             k=3, type=("OvA"),
             plot=TRUE,
             data=iris)
multiroc(y="Species",
             x=c("Petal.Width","Petal.Length","Sepal.Width","Sepal.Length"),
             k=3,
             type=("OvO"),
             plot=FALSE,
             data=iris)