Diff of /man/evaluate_softmax.Rd [000000] .. [409433]

Switch to unified view

a b/man/evaluate_softmax.Rd
1
% Generated by roxygen2: do not edit by hand
2
% Please edit documentation in R/evaluation.R
3
\name{evaluate_softmax}
4
\alias{evaluate_softmax}
5
\title{Evaluate matrices of true targets and predictions from layer with softmax activation.}
6
\usage{
7
evaluate_softmax(y, y_conf, auc = FALSE, auprc = FALSE, label_names = NULL)
8
}
9
\arguments{
10
\item{y}{Matrix of true target.}
11
12
\item{y_conf}{Matrix of predictions.}
13
14
\item{auc}{Whether to include AUC metric. Only possible for 2 targets.}
15
16
\item{auprc}{Whether to include AUPRC metric. Only possible for 2 targets.}
17
18
\item{label_names}{Names of corresponding labels. Length must be equal to number of columns of \code{y}.}
19
}
20
\value{
21
A list of evaluation results.
22
}
23
\description{
24
Compute confusion matrix, accuracy, categorical crossentropy and (optionally) AUC or AUPRC, given predictions and
25
true targets. AUC and AUPRC only possible for 2 targets.
26
}
27
\examples{
28
\dontshow{if (reticulate::py_module_available("tensorflow")) (if (getRversion() >= "3.4") withAutoprint else force)(\{ # examplesIf}
29
y <- matrix(c(1, 0, 0, 0, 1, 1), ncol = 2)
30
y_conf <- matrix(c(0.3, 0.5, 0.1, 0.7, 0.5, 0.9), ncol = 2)
31
evaluate_softmax(y, y_conf, auc = TRUE, auprc = TRUE, label_names = c("A", "B")) 
32
\dontshow{\}) # examplesIf}
33
}