Become an expert in R — Interactive courses, Cheat Sheets, certificates and more!
Get Started for Free

classmatch

Classification Matching and Differencing


Description

Compares two classifications by cross-tabulating the assignment of objects to classes, and (optionally) produces a new classification to reflect the congruences and differences

Usage

classmatch(x,y,type='full')

Arguments

x

an object of class ‘clustering’, ‘partana’, ‘partition’ or a vector identifying membership of objects in classes

y

an object of class ‘clustering’, ‘partana’, ‘partition’ or a vector identifying membership of objects in classes

type

a switch, either ‘full’ or ‘direct’, to control the parameters of the algorithm

Details

classmatch first calculates a cross-tabulation of the two classifications. Then, if ‘type=="full"’, the default, it finds all cases of agreement in order of number of objects. Objects are assigned to new clusters to reflect that order. It's important to note that a single class may be partitioned into several new classes, and the the number of new classes produced may be higher than either of the classifications considered.

If ‘type=="direct"’ classmatch assumes a one-to-one relation between the two classifications compared. Classmatch finds the largest case of agreement, and assigns that match to class 1. It then zeros out the rows and columns corresponding to those classes, and iterates.

Value

A list with components:

tab

the cross-tabulation analyzed

pairs

the x and y values considered matched in order of solution

partial

a cumulative fraction of agreement as a function of number of clusters

ord

a table showing the order of new clusters

combo

a new vector of assignment of objects to clusters, only produced if ‘type=="full"’

Author(s)

David W. Roberts droberts@montana.edu

References

See Also

Examples

data(shoshveg)
dis.bc <- dsvdis(shoshveg,'bray/curtis')
opt.5 <- optpart(5,dis.bc)
pam.5 <- pam(dis.bc,5)
classmatch(opt.5,pam.5)

optpart

Optimal Partitioning of Similarity Relations

v3.0-3
GPL (>= 2)
Authors
David W. Roberts <droberts@montana.edu>
Initial release

We don't support your browser anymore

Please choose more modern alternatives, such as Google Chrome or Mozilla Firefox.