evaluate_sigmoid: Evaluate matrices of true targets and predictions from layer...

View source: R/evaluation.R

evaluate_sigmoidR Documentation

Evaluate matrices of true targets and predictions from layer with sigmoid activation.

Description

Compute accuracy, binary crossentropy and (optionally) AUC or AUPRC, given predictions and true targets. Outputs columnwise average.

Usage

evaluate_sigmoid(y, y_conf, auc = FALSE, auprc = FALSE, label_names = NULL)

Arguments

y

Matrix of true target.

y_conf

Matrix of predictions.

auc

Whether to include AUC metric.

auprc

Whether to include AUPRC metric.

label_names

Names of corresponding labels. Length must be equal to number of columns of y.

Value

A list of evaluation results.

Examples


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)


GenomeNet/deepG documentation built on Dec. 24, 2024, 12:11 p.m.