cluster_eval: Calculate the rand-index of two label assignments

matchLabelR Documentation

Calculate the rand-index of two label assignments

Description

'matchLabel( )' calculate the rand-index and adjusted rand-index of estimated label assignment compared to true label assignment, which can be used to evaluate the performance of the estimated label. The metric takes value between 0 and 1, and higher value indicates better performance.

'calRand( )' calculates the rand-index from a confusion matrix.

'rSpecc( )' a customized spectral clustering model.

Usage

matchLabel(reference, label)

calRand(confmat)

rSpecc(x, centers, iter.max = 100, nstart = 10)

Arguments

reference

true label assignment.

label

estimated label assignment.

confmat

a 2-dimensional confusion matrix.

x

numeric matrix of data.

centers

the number of clusters.

iter.max

the maximum number of iterations allowed.

nstart

how many random sets in the kmeans step should be chosen? default is 10.

Value

Rand

rand-index

adjRand

adjusted rand-index

.Data

A vector of integers indicating the cluster to which each point is allocated.

size

The number of points in each cluster.

totss

The total sum of squares.

withinss

Vector of within-cluster sum of squares, one component per cluster.

tot.withinss

Total within-cluster sum of squares, i.e. 'sum(withinss)'.

betweenss

The between-cluster sum of squares, i.e. 'totss-tot.withinss'.


xiangli2pro/hbcm documentation built on Nov. 15, 2024, 9:15 a.m.