scores {relations} | R Documentation |
Compute scores for the tuples of an endorelation.
relation_scores(x, method = c("ranks", "Barthelemy/Monjardet", "Borda", "Kendall", "Wei", "differential"), normalize = FALSE, ...)
x |
an object inheriting from class relation ,
representing an endorelation. |
method |
character string indicating the method (see details). |
normalize |
logical indicating whether the score vector should be normalized to sum up to 1. |
... |
further arguments to be passed to methods. |
In the following, consider an endorelation R on n objects. Let the in-degree I(a) and out-degree O(a) of an object a be defined as the numbers of objects b such that b R a and, respectively, a R b, and let D(a) = I(a) - O(a) be the differential of a (see Regenwetter and Rykhlevskaia (2004)). Note that I and O are given by the column sums and row sums of the incidence matrix of R. If R is a preference relation with a <= intepretation, D(a) is the difference between the numbers of objects dominated by a (i.e., < a) and dominating a (i.e., > a), as ``ties'' cancel out.
Available built-in score methods are as follows:
"ranks"
decreasing
can be used to specify the
order of the ranks. By default, or if decreasing
is true,
objects are ranked according to decreasing differential (``from
the largest to the smallest in the <= preference context)
using (n + 1 - D(a)) / 2. Otherwise, if decreasing
is false, objects are ranked via (n + 1 + D(a)) / 2 (``from
the smallest to the largest). See Regenwetter and Rykhlevskaia
(2004) for more details on generalized ranks.
"Barthelemy/Monjardet"
"Borda"
, "Kendall"
"Wei"
"differential"
Definitions of scores for “preference relations” R are somewhat ambiguous because R can encode <= or >= (or strict variants thereof) relationships (and all such variants are used in the literature). Package relations generally assumes a <= encoding, and that scores in the strict sense should increase with preference (the most preferred get the highest scores) whereas ranks decrease with preference (the most preferred get the lowest ranks).
A vector of scores, with names taken from the relation domain labels.
J.-P. Barthélemy and B. Monjardet (1981), The median procedure in cluster analysis and social choice theory. Mathematical Social Sciences, 1:235–267.
J. C. Borda (1781), Mémoire sur les élections au scrutin. Histoire de l'Académie Royale des Sciences.
D. Bouyssou (1992), Ranking methods based on valued preference relations: A characterization of the net flow network. European Journal of Operational Research, 60:61–67.
M. Kendall (1955), Further contributions to the theory of paired comparisons. Biometrics, 11:43–62.
M. Regenwetter and E. Rykhlevskaia (2004), On the (numerical) ranking associated with any finite binary relation. Journal of Mathematical Psychology, 48:239–246.
T. H. Wei (1952). The algebraic foundation of ranking theory. Unpublished thesis, Cambridge University.
## Example taken from Cook and Cress (1992, p.74) I <- matrix(c(0, 0, 1, 1, 1, 1, 0, 0, 0, 1, 0, 1, 0, 0, 1, 0, 1, 1, 0, 0, 0, 0, 0, 1, 0), ncol = 5, byrow = TRUE) R <- relation(domain = letters[1:5], incidence = I) ## Note that this is a "preference matrix", so take complement: R <- !R ## Compare Kendall and Wei scores cbind( Kendall = relation_scores(R, method = "Kendall", normalize = TRUE), Wei = relation_scores(R, method = "Wei", normalize = TRUE) )