Learn R Programming

FisherEM (version 1.2)

evalEM: The evalEM function

Description

evalEM provides a contingency table and a correct classification rate from the clustering results of the Fisher-EM algorithm and true labels.

Usage

evalEM(cls, obj, disp = 1)

Arguments

cls
is a numerical vector containing the true labels for each individual
obj
the object obtained by the fem() function
disp
if disp=1 then the contingency table is displayed.

Value

  • lblthe permuted groups
  • txthe correct classification rate

See Also

fem, plot.fem

Examples

Run this code
## The function is currently defined as

data(iris)
cls = as.numeric(iris[,5]); # the true numerical labels
res = fem(iris[,-5],3,model='AkB');
evalEM(cls,res)

Run the code above in your browser using DataLab