ClusterAUCC: Area under the ROC Curve for Clustering

View source: R/ClusterAUCC.R

ClusterAUCCR Documentation

Area under the ROC Curve for Clustering

Description

Area under the ROC Curve for Clustering [Jaskowiak et al., 2022] evaluates a hard partition without a reference classification. Area under the clustering ROC curve in [0,1]; larger is better.

Usage

ClusterAUCC(Cls, DataOrDistances, DistanceMethod = "euclidean",
                       Silent = TRUE, ...)

Arguments

Cls

Vector of length n containing arbitrary numeric, character, or factor cluster labels. Missing labels and non-finite numeric labels are not allowed. Rows and labels are matched by position. Zero is an ordinary cluster label; remove noise observations explicitly if they should not be evaluated.

DataOrDistances

Finite numeric data matrix or data frame with n rows, a symmetric n by n dissimilarity matrix with non-negative entries and a zero diagonal, or a dist object. Matrices are recognized as dissimilarities by IsDissimilarity. A square raw-data matrix satisfying that test is therefore interpreted as distances. Each unordered pair is counted once, without self-pairs.

DistanceMethod

Distance method for feature data, passed to parallelDist::parDist() or stats::dist() if parallelDist is unavailable. Ignored for precomputed dissimilarities. Default: "euclidean".

Silent

Logical scalar. Suppresses the progress message for distance calculation when TRUE; warnings and missing-package messages remain.

...

Further arguments for parallelDist::parDist() or its stats::dist() fallback. Ignored for precomputed dissimilarities.

Details

ClusterAUCC calculates the probability that a within-cluster distance is smaller than a between-cluster distance, giving half credit to ties. It uses average ranks, equivalent to trapezoidal ROC integration with smaller distances predicting membership of the same cluster. Normalization of distances is unnecessary because the score depends only on their ordering. The range is [0,1]; 0.5 is the expectation under the random-partition model of [Jaskowiak et al., 2022]. Both within- and between-cluster pairs are required.

Malformed inputs cause an error. Absence of either within-cluster or between-cluster pairs produces a warning and returns NaN.

Pairwise distance storage is quadratic in the number of observations. No observations are subsampled.

Value

List of

AUCC

Area under the clustering ROC curve in [0,1]; larger is better.

Object

List of WithinPairCount and BetweenPairCount. Invalid partitions return NULL.

Author(s)

Michael Thrun

References

[Jaskowiak et al., 2022] Jaskowiak, P. A., Costa, I. G., & Campello, R. J. G. B.: The area under the ROC curve as a measure of clustering quality, Data Mining and Knowledge Discovery, Vol. 36, pp. 1219-1245, \Sexpr[results=rd]{tools:::Rd_expr_doi("10.1007/s10618-022-00829-0")}, 2022.

See Also

ClusterNoEstimation, ClusterDunnIndex, ClusterDaviesBouldinIndex

Examples

Data = matrix(c(0, 1, 2, 10, 11, 12), ncol = 1)
Cls = rep(c(10, 20), each = 3)
V = ClusterAUCC(Cls, Data)
V$AUCC

FCPS documentation built on Nov. 28, 2026, 9:08 a.m.