consensus {relations}R Documentation

Consensus Relations

Description

Compute the consensus relation of a relation ensemble.

Usage

relation_consensus(x, method = NULL, weights = 1, control = list(), ...)

Arguments

x an ensemble of relations, or something which can be coerced to such (see relation_ensemble).
method a character string specifying one of the built-in methods for computing consensus relations, or a function to be taken as a user-defined method, or NULL (default value). If a character string, its lower-cased version is matched against the lower-cased names of the available built-in methods using pmatch. See Details for available built-in methods and defaults.
weights a numeric vector with non-negative case weights. Recycled to the number of elements in the ensemble given by x if necessary.
control a list of control parameters. See Details.
... a list of control parameters (overruling those specified in control).

Details

Consensus relations “synthesize” the information in the elements of a relation ensemble into a single relation, often by minimizing a criterion function measuring how dissimilar consensus candidates are from the (elements of) the ensemble (the so-called “optimization approach”), typically of the form L(R) = sum w_b d(R_b, R), where d is a suitable dissimilarity measure (see relation_dissimilarity) and w_b is the case weight given to element R_b of the ensemble (such consensus relations are called “central relations” in Régnier (1965)).

Available built-in methods are as follows. Apart from Condorcet's, these are applicable to ensembles of endorelations only.

"Borda"
the consensus method proposed by Borda (1781). For each relation R_b and object x, one determines the Borda/Kendall scores, i.e., the number of objects y such that y R_b x. These are then aggregated across relations by weighted averaging. Finally, objects are ordered according to their aggregated scores.
"Copeland"
the consensus method proposed by Copeland (1951). For each relation R_b and object x, one determines the Copeland scores, i.e., the number of objects y such that y R_b x, minus the number of objects y such that x R_b y. Like the Borda method, these are then aggregated across relations by weighted averaging. Finally, objects are ordered according to their aggregated scores.
"Condorcet"
the consensus method proposed by Condorcet (1785), in fact minimizing the criterion function L with d as symmetric difference distance over all possible relations. In the case of endorelations, consensus is obtained by weighting voting, such that x R y if the weighted number of times that x R_b y is no less than the weighted number of times that this is not the case. Even when aggregating linear orders, this can lead to intransitive consensus solutions (“effet Condorcet”).
"SD/F"
an exact solver for determining the consensus relation by minimizing the criterion function L with d as symmetric difference distance (“SD”) over a suitable class (“Family”) of endorelations as indicated by F, with values:
E
equivalence relations: reflexive, symmetric, and transitive.
L
linear orders: complete (hence reflexive), antisymmetric, and transitive.
O
partial orders: reflexive, antisymmetric and transitive.
P
complete preorders (preference relations, “orderings”): complete (hence reflexive) and transitive.
T
tournaments: complete (hence reflexive) and antisymmetric.
C
complete relations.
A
antisymmetric relations.
S
symmetric relations.

Consensus relations are determined by reformulating the consensus problem as an integer program (for the relation incidences), which is solved via package lpSolve. See Hornik and Meyer (2007) for details.

For fitting equivalences and preferences (cases E and P) it is possible to specify a maximal number of classes k using the control parameter k.

Additional constraints on the incidences of the consensus solution can be given via the control parameter constraints, in the form of a 3-column matrix whose rows give row and column indices i and j and the corresponding incidence I_{ij}. (I.e., incidences can be constrained to be zero or one on an object by object basis.)

One can obtain a relation ensemble with all consensus relations by setting the control parameter all to TRUE. (See the examples.)

Value

The consensus relation(s).

References

J. C. Borda (1781), Mémoire sur les élections au scrutin. Histoire de l'Académie Royale des Sciences.

W. D. Cook and M. Kress (1992), Ordinal information and preference structures: decision models and applications. Prentice-Hall: New York. ISBN: 0-13-630120-7.

M. J. A. de Condorcet (1785), Essai sur l'application de l'analyse à la probabilité des décisions rendues à la pluralité des voix. Paris.

A. H. Copeland (1951), A Reasonable Social Welfare Function. mimeo, University of Michigan.

K. Hornik and D. Meyer (2007), Deriving consensus rankings from benchmarking experiments. In R. Decker and H.-J. Lenz, Advances in Data Analysis. Studies in Classification, Data Analysis, and Knowledge Organization. Springer-Verlag: Heidelberg, 163–170.

F. Marcotorchino and P. Michaud (1982). Agrégation de similarités en classification automatique. Revue de Statistique Appliquée, 30(2):21–44. http://www.numdam.org/item?id=RSA_1982__30_2_21_0.

S. Régnier (1965), Sur quelques aspects mathématiques des problèmes de classification automatique. ICC Bulletin, 4:175–191.

Examples

## Consensus equivalence.
## (I.e., in fact, consensus partition.)
## Classification of 30 felines, see Marcotorchino and Michaud (1982).
data("Felines")
## Consider each variable an equivalence relation on the objects.
relations <- as.relation_ensemble(Felines)
## This gives a relation ensemble of length 14 (number of variables in
## the data set).
## Now fit an equivalence relation to this:
E <- relation_consensus(relations, "SD/E")
## And look at the equivalence classes:
ids <- relation_class_ids(E)
## Or, more nicely:
split(rownames(Felines), ids)
## Which is the same as in the paper ...

## Consensus linear order.
## Example from Cook and Kress, pages 48ff.
## Relation from paired comparisons.
pm <- matrix(c(0, 1, 0, 1, 1,
               0, 0, 0, 1, 1,
               1, 1, 0, 0, 0,
               0, 0, 1, 0, 0,
               0, 0, 1, 1, 0),
             nr = 5,
             byrow = TRUE,
             dimnames = list(letters[1:5], letters[1:5]))
## Note that this is a Cook and Kress "preference" matrix.
R <- as.relation(1 - pm)
relation_incidence(R)
relation_is_tournament(R)
## Closest linear order:
L <- relation_consensus(R, "SD/L")
relation_incidence(L)
## Visualize provided that Rgraphviz is available.
if(require("Rgraphviz")) plot(L)
## But note that this linear order is not unique.
L <- relation_consensus(R, "SD/L", control = list(all = TRUE))
print(L)
if(require("Rgraphviz")) plot(L)
## (Oh no.)
## Closest preference relation with at most 3 indifference classes:
P3 <- relation_consensus(R, "SD/P", control = list(k = 3))
relation_incidence(P3)

[Package relations version 0.2-0 Index]