Learn R Programming

ORKM (version 1.0.0)

INDEX: Caculate the indication on the functions

Description

This function contains the calculation of five clustering effect evaluation metrics, specifically, Purity, NMI, F-score, RI, Precision and Recall, which are used to evaluate the clustering effect of the above functions, method=0 purity;method=1,precision; method=2,recall; method=3, F-score; method=4, RI.

Usage

INDEX(vec1, vec2, method = 0, mybeta = 0)

Value

accuracy

Arguments

vec1

algorithm cluster result

vec2

true cluster result

method

Calculate the selection of indicators.

mybeta

caculate the index

Examples

Run this code
P1<-c(1,1,1,2,3,2,1);truelabel<-c(1,1,1,2,2,2,3)
INDEX(P1,truelabel,method=0);INDEX(P1,truelabel,method=2)

Run the code above in your browser using DataLab