Learn R Programming

RobustEM (version 1.0)

errorRate: This function calculates the error rates for the different EM algorithms

Description

This function uses different criteria to measure the accuracy of predicted labels with respect to the true labels.

Usage

errorRate(actual, predicted, beta=1)

Arguments

actual
This is a vector that represents the actual true class labels.
predicted
This is the predicted cluster returned by the EM algorithm
beta
This is a parameter of beta used for the F-measure. The default is 1 which correpondes to the balanced F-measure.

Value

FPR
Represents the computed False Positive Rate
FNR
Represents the computed False Negative Rate
RI
Represents the computed Rand Index
F
Represents the computed F-Measure

Warning

This function is dependent on the true and predicted clusters having the same levels.

See Also

matchCluster

Examples

Run this code
## Not run: 
#   true<-c("a","b","a","a","a")
#    predicted<-c("a","b","b","a","a")
#    errorRate(true,predicted)
# ## End(Not run)

Run the code above in your browser using DataLab