powered by
Calculate the Error Rate of a partition
error.rate(clust1,clust2) rand.index(LabelA,LabelB)
An integer vector of cluster label 1
An integer vector of cluster label 2
An integer vector of the true membership labels
An integer vector of the predicted labels
error.rate gives Error Rate
clust1 and clust 2 must match, i.e, same number of clusters
# NOT RUN { clu1<-c(1,2,3,1,1,2,2,3,3) clu2<-c(2,2,2,1,1,1,3,3,3) error.rate(clu1, clu2) rand.index(clu1, clu2) # }
Run the code above in your browser using DataLab