--- a +++ b/man/evaluate_sigmoid.Rd @@ -0,0 +1,33 @@ +% Generated by roxygen2: do not edit by hand +% Please edit documentation in R/evaluation.R +\name{evaluate_sigmoid} +\alias{evaluate_sigmoid} +\title{Evaluate matrices of true targets and predictions from layer with sigmoid activation.} +\usage{ +evaluate_sigmoid(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.} + +\item{auprc}{Whether to include AUPRC metric.} + +\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 accuracy, binary crossentropy and (optionally) AUC or AUPRC, given predictions and +true targets. Outputs columnwise average. +} +\examples{ +\dontshow{if (reticulate::py_module_available("tensorflow")) (if (getRversion() >= "3.4") withAutoprint else force)(\{ # examplesIf} +y <- matrix(sample(c(0, 1), 30, replace = TRUE), ncol = 3) +y_conf <- matrix(runif(n = 30), ncol = 3) +evaluate_sigmoid(y, y_conf, auc = TRUE, auprc = TRUE) +\dontshow{\}) # examplesIf} +}