Code covered by the BSD License  

Highlights from
Rankings

5.0

5.0 | 1 rating Rate this file 21 Downloads (last 30 days) File Size: 10.9 KB File ID: #19496

Rankings

by

 

08 Apr 2008 (Updated )

Calculate Rankings with five different methodologies

| Watch this File

File Information
Description

There exist many different ranking methodologies.
For more details, check here: http://en.wikipedia.org/wiki/Ranking .

*****************************************

The archive contains the following files:

Rankings.m
FractionalRankings.m
FractionalRankings2.m
DenseRankings.m
StandardCompetitionRankings.m
ModifiedCompetitionRankings.m
OrdinalRankings.m
OrdinalRankings2.m

*****************************************

The principal function is Rankings.m which can be used to calculate five different kinds of rankings (in ascending order):

FRACTIONAL RANKINGS (1 2.5 2.5 4)
DENSE RANKINGS (1 2 2 3)
STANDARD COMPETITION RANKINGS (1 2 2 4)
MODIFIED COMPETITION RANKINGS (1 3 3 4)
ORDINAL RANKINGS (1 2 3 4) OR (1 3 2 4)

If you need to use the rankings for statistical purposes, the most useful methodology is probably the Fractional Ranking because it is such that the sum of N ranks is equal to sum([1:N]), so that the average rank of N items is always the same.

Due to its special statistical properties, the default method is the Fractional Ranking.

*****************************************

The file FractionalRankings2.m contains an alternative function for the computation of Fractional Rankings but it's extremely slow and inefficient and, actually, it is not supposed to be used but for general consultation.

I chose to keep it because it is the most intuitive code, though it cannot be implemented efficiently in Matlab.

The file OrdinalRankings2 contains an alternative function for the computation of Ordinal Rankings that seems to be slightly less efficient than the one contained in the file OrdinalRankings.m, and also much more complicated and less readable.

I chose to leave it in the archive for general consultation.

*****************************************

This package is not a professional one.
Use it at your own risk.
You can freely redistribute it and/or modify it.

Please let me know if there are bugs or if you find better solutions. Thank you.

Acknowledgements

Freqtable inspired this file.

MATLAB release MATLAB 7 (R14)
Tags for This File   Please login to tag files.
Please login to add a comment or rating.
Comments and Ratings (3)
31 Jan 2012 Daniel

You might like my tiedrank_(X,dim) function: http://www.mathworks.com/matlabcentral/fileexchange/34560-tiedrankxdim
The code is fully vectorised and runs pretty fast.

14 Feb 2011 Jaroslaw Tuszynski  
23 Apr 2010 Francesco Pozzi

Apparently, Matlab function "tiedrank" does the same as my FractionalRankings.

This function ("tiedrank") is not described in the Help Files, but you can visualize its description on the Command Window:

help tiedrank

or by directly opening file "tiedrank.m"

Updates
09 Apr 2008

I've tried to fix some errors.
Two more general examples are added to the file Rankings.m

10 Apr 2008

I've changed the function OrdinalRanking: hope it is more clear, intuitive and efficient.

Contact us