[409433]: / man / evaluate_softmax.Rd

Download this file

34 lines (29 with data), 1.2 kB

 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
32
33
% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/evaluation.R
\name{evaluate_softmax}
\alias{evaluate_softmax}
\title{Evaluate matrices of true targets and predictions from layer with softmax activation.}
\usage{
evaluate_softmax(y, y_conf, auc = FALSE, auprc = FALSE, label_names = NULL)
}
\arguments{
\item{y}{Matrix of true target.}
\item{y_conf}{Matrix of predictions.}
\item{auc}{Whether to include AUC metric. Only possible for 2 targets.}
\item{auprc}{Whether to include AUPRC metric. Only possible for 2 targets.}
\item{label_names}{Names of corresponding labels. Length must be equal to number of columns of \code{y}.}
}
\value{
A list of evaluation results.
}
\description{
Compute confusion matrix, accuracy, categorical crossentropy and (optionally) AUC or AUPRC, given predictions and
true targets. AUC and AUPRC only possible for 2 targets.
}
\examples{
\dontshow{if (reticulate::py_module_available("tensorflow")) (if (getRversion() >= "3.4") withAutoprint else force)(\{ # examplesIf}
y <- matrix(c(1, 0, 0, 0, 1, 1), ncol = 2)
y_conf <- matrix(c(0.3, 0.5, 0.1, 0.7, 0.5, 0.9), ncol = 2)
evaluate_softmax(y, y_conf, auc = TRUE, auprc = TRUE, label_names = c("A", "B"))
\dontshow{\}) # examplesIf}
}