Learn R Programming

relations (version 0.2-0)

dissimilarity: Dissimilarity Between Relations

Description

Compute the dissimilarity between (ensembles of) relations.

Usage

relation_dissimilarity(x, y = NULL, method = "symdiff", ...)

Arguments

x
an ensemble of relations, or something which can be coerced to such (see relation_ensemble).
y
NULL (default), or as for x.
method
a character string specifying one of the built-in methods for computing dissimilarity, or a function to be taken as a user-defined method. If a character string, its lower-cased version is matched against the lower-cased names of the availabl
...
further arguments to be passed to methods.

Value

  • If y is NULL, an object of class dist containing the dissimilarities between all pairs of elements of x. Otherwise, a matrix with the dissimilarities between the elements of x and the elements of y.

Details

Currently, "symdiff" is the only built-in method available. This computes the cardinality of the symmetric difference of two relations, i.e., the number of tuples contained in exactly one of two relations. For complete endorelations, this coincides with the Kemeny-Snell metric.

References

J. G. Kemeny and J. L. Snell (1962), Mathematical Models in the Social Sciences, chapter Preference Rankings: An Axiomatic Approach. MIT Press: Cambridge.