Learn R Programming

cwm (version 0.0.3)

bestPermutation: Function to obtain the best permutation for a classification problem

Description

When a classificator is run on a set of 1,2,..., k groups it returns a possibile classification schemes, but it does not know the correspondence of original gruoups and given groups. This function return the permutation of original group versus output group that maximizes the trace of the confusion matrix.

Usage

bestPermutation(origClass, inizOutput)

Arguments

origClass
original group identification vector
inizOutput
classified group identification vector

Value

An object of class bestPermutation containing:
permutation
Best permutation
groups
Classification with respect to best permutation

Details

Program fails if number of original groups differs from identified groups as in inizOutput.

References

Giorgio Spedicato

See Also

cwrEm

Examples

Run this code
#non sense example
x=c(1,2,3)
y=c(1,2,3)
bestPermutation(x,y)


Run the code above in your browser using DataLab