Skip to content

Human judgment, preference, and annotation measurement · Human judgment, annotation, and latent measurement · HME003 · Model

Plackett–Luce ranking model

Estimate item worth from complete or appropriately defined partial rankings by representing a ranking as sequential selections from the remaining choice set.

Runs in CodeSplash Complete calculation CodeSplash's run and the reference's record

In CodeSplash

A CodeSplash method runs this entry in Python and R. Set it up from the method's page.

Do it in CodeSplash Run it on your own data, in Python or R.

Availability
Runs in CodeSplash
Code example
Complete calculation
Who ran it
CodeSplash's run and the reference's record
CodeSplash's run
Verified in Python and R through measurement.plackett_luce. The reference's example ran in Python and R here, and they agree.
The reference's record
Python: Ran in the reference's review, on this exact code. R: Reviewed but not run: R wasn't available to the reference's authors.

Purpose

Estimate item worth from complete or appropriately defined partial rankings by representing a ranking as sequential selections from the remaining choice set.

Question / hypotheses

What probability does the model assign to an observed ranking? A partial top-k ranking of a known candidate set differs from a complete ranking of a selected subset.

Architecture / computational structure

A positive worth is assigned to each item. At each rank position the selected item is normalized against the remaining eligible items. Maximum likelihood or penalized estimation aggregates contributions from rankings; generalized implementations can handle ties.

Assumptions

The basic model assumes worth-based choice and an independence-of-irrelevant-alternatives structure. The available set at every step must be known. Choices within one ranking are part of one likelihood, not independent ratings to bootstrap separately. Exposure or selective inclusion can bias inferred worth.

Formula / computational definition

P(r1,…,rK∣A)=∏t=1Kwrt∑j∈A∖{r1,…,rt−1}wj.P(r_1,\ldots,r_K\mid A)=\prod_{t=1}^{K}\frac{w_{r_t}}{\sum_{j\in A\setminus\{r_1,\ldots,r_{t-1}\}}w_j}.

Parameters and notation

Estimated: worths, constrained up to a common multiplicative scale. Choices: candidate-set encoding, partial-ranking semantics, tie extension, priors/pseudo-comparisons, optimization and stopping. Pseudo-rankings can ensure finite estimates while shrinking worths; they are substantive regularization, not actual observed judgments.

Fitting, fine-tuning, and adaptation

Link new items through overlapping choice sets. Refit or use a hierarchical/time-varying extension when judge populations or item qualities change. Preserve ranked sets, order, unranked eligible items, and exposure decisions in data rather than flattening them into an ambiguous pair table.

How to use and calibrate

Check connectedness, compare held-out ranking likelihood, and inspect whether context changes preferences among the same items. Report worth contrasts or comparison intervals, not only an ordered list. R route: PlackettLuce; Python requires a documented ranking implementation or explicit likelihood.

Example application

Model judges’ ordered preferences among five video summaries, where each judge sees a randomized subset and the shown subset is recorded.

Interpretation / pitfalls

Watch out

A list missing an item does not reveal whether it was judged worse or never shown. Ties require the generalized likelihood. A good fit to pooled ranks can hide systematic preference subgroups.

Python and R code examples

Scope: Complete probability of one full three-item ranking; no fitting or tie handling. Python NumPy; R base.

Validation: Python executed successfully; native R reviewed but not executed.

Python and R

The reference's own programs, shown as written. A component demo shows one central piece of the method; it doesn't train a full model.

Python

Complete calculation — Complete probability of one full three-item ranking; no fitting or tie handling. Python NumPy; R base. · needs numpy

import numpy as np
w=np.array([3.,2.,1.]); order=[0,2,1]; remaining=list(range(3)); p=1.
for item in order:
    p*=w[item]/w[remaining].sum(); remaining.remove(item)
assert np.isclose(p,.5/3)
print(p)
R

Complete calculation — Complete probability of one full three-item ranking; no fitting or tie handling. Python NumPy; R base.

w <- c(3,2,1); ranking <- c(1,3,2); remaining <- 1:3; p <- 1
for (item in ranking) {p <- p*w[item]/sum(w[remaining]); remaining <- setdiff(remaining,item)}
stopifnot(abs(p-.5/3)<1e-12); print(p)

Sources

From the CodeSplash reference, entry HME003.