roc_auc_embed: Average Area Under the ROC Curve

View source: R/auc.R

roc_auc_embedR Documentation

Average Area Under the ROC Curve

Description

Embedding quality measure.

Usage

roc_auc_embed(dm, labels)

Arguments

dm

Distance matrix of an embedding.

labels

Vector of labels for each observation in the dataset in the same order as the observations in the distance matrix.

Details

The ROC curve plots the true positive rate vs false positive rate. This function calculates the curve N times, where N is the number of the observations. The label of the Nth observation is set as the positive class and then the other observations are ranked according to their distance from the Nth observation in the output coordinates (lower distances being better). Observations with the same label as the Nth observation count as positive observations. The final reported result is the average over all observations.

Perfect retrieval results in an AUC of 1. For random retrieval gives a value of 0.5.

Value

Area Under the ROC curve, averaged over each observation.

Note

Use of this function requires that the PRROC package be installed.


jlmelville/sneer documentation built on Nov. 15, 2022, 8:13 a.m.