RSKC (version 2.4.2)

CER: Classification Error Rate (CER)

Description

Compute the classification error rate of two partitions.

Usage

CER(ind, true.ind,nob=length(ind))

Arguments

ind
Vector, containing the cluster labels of each case of a partition 1.
true.ind
Vector, containing the cluster labels of each case of a partition 2.
nob
The number of cases (the length of the vector ind and true ind)

Value

Return a CER value. CER = 0 means perfect agreement between two partitions and CER = 1 means complete disagreement of two partitions. Note: 0 <= CER <= 1="" <="" dl="">

References

H. Chipman and R. Tibshirani. Hybrid hierarchical clustering with applications to microarray data. Biostatistics, 7(2):286-301, 2005.

Examples

Run this code
vec1<-c(1,1,1,2,3,3,3,2,2)
vec2<-c(3,3,3,1,1,2,2,1,1)
CER(vec1,vec2)

Run the code above in your browser using DataLab