View source: R/MultiClassROC.R
multiroc | R Documentation |
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.
multiroc(y, x, k, type = c("OvO", "OvA"), plot = TRUE, data)
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 |
plot with ROC curves using ggroc, pROC (if plot=TRUE) or the average AUC (if plot=FALSE)
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)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.