PyMallows 0.1
Jonathan Huang
jhuang11@stanford.edu
Computer Science Department
Stanford University
Run testmallows.py to see how things work.
Output should look something like:
Drawing from model
Model parameters:
sigma0: [3, 2, 0, 1]
phi: [0.44932896411722156, 0.6065306597126334, 0.4965853037914095]
Fit parameters
estimated sigma0: [3, 2, 0, 1]
estimated phi: [0.44458771466944785, 0.603392134114344, 0.52117345619458044]
Run testprank.py to learn a mallows model from partial ranking data.
Permutations in the mallows.py file
are always written in `inverse notation'
and represented as tuples (or lists).
For example [6,4,8,7,2,1,0,3,5] means
that item 6 is ranked first, item 4 is ranked second
and so on.
Notation is based on that from `Consensus
ranking under the exponential model' by Meila et al.