multiroc {MultiClassROC} | R Documentation |
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)
[Package MultiClassROC version 0.1.0 Index]