[1c0e03]: / man / plot_roc.Rd

Download this file

32 lines (27 with data), 816 Bytes

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/evaluation.R
\name{plot_roc}
\alias{plot_roc}
\title{Plot ROC}
\usage{
plot_roc(y_true, y_conf, path_roc_plot = NULL, return_plot = TRUE)
}
\arguments{
\item{y_true}{Matrix of true labels.}
\item{y_conf}{Matrix of predictions.}
\item{path_roc_plot}{Where to store ROC plot.}
\item{return_plot}{Whether to return plot.}
}
\value{
A ggplot of ROC curve.
}
\description{
Compute ROC and AUC from target and prediction matrix and plot ROC. Target/prediction matrix should
have one column if output of layer with sigmoid activation and two columns for softmax activation.
}
\examples{
y_true <- matrix(c(1, 0, 0, 0, 1, 1), ncol = 1)
y_conf <- matrix(runif(n = nrow(y_true)), ncol = 1)
p <- plot_roc(y_true, y_conf, return_plot = TRUE)
p
}