winning

A generalization of factor multinomial probit models that scales to millions of variables

This package prices the winner of many: N competitors whose performances can follow any noise distribution and can be correlated through common factors. One pass over a shared survival field gives all N win probabilities, and the same pass yields removal counterfactuals and photo-finish tie densities. Calibration runs in the other direction, from observed shares back to abilities. Factor probit, Luce's softmax and the finite-temperature softmin are special cases of one parameterized race.

The model, live

Six runners moved by two common luck factors; whichever draws the smallest performance wins. Drag each runner's ability and its two factor loadings, pick the noise distribution (and its skew), and the win probabilities update live — computed in your browser by the factor lattice algorithm this package ships, at verified parity with the Python. Runners loading the same factor with the same sign are teammates, opposite signs rivals; zero loadings recover the independent race, where Gumbel noise reproduces softmax exactly.

noise:

Calibration at ten thousand alternatives. All shares of a correlated Gaussian race in one O(QNL) pass, matrix-free graph-Laplacian derivatives, and inversion of observed shares to utilities in under a minute at N = 10,000 — every number from a committed, seeded script. The paper (PDF) →
Rating systems live on this engine. Whole-density beliefs, exact full-finish-order updates, benchmarked prequentially on twelve datasets against TrueSkill, OpenSkill, Glicko-2 and Elo. The ratings page →

Quick start

from winning import race_probabilities, calibrate_abilities, removal_shares

p = race_probabilities(mu, V=V, D=D)     # all N shares, one field pass
mu_hat = calibrate_abilities(p, V=V, D=D)  # abilities back from shares
q = removal_shares(mu, V=V, D=D)         # P(j wins | i removed), all pairs

Max-wins semantics for the probit literature live in winning.probit (shares, calibrate_utilities, supplied-covariance fitting); the density-agnostic engine in winning.thurstone; the paper-faithful kernels in winning.factor.

Papers

Demos

Heritage

The fastest time, the best offer and
        the most popular product are the same order statistic: winner of many.
The fastest time, the lowest offer and the most popular choice are the same computation: the distribution of the winner of many.

winning began as the reference implementation of the SIAM paper above and owns the core outright: the lattice machinery once split into the thurstone package is vendored back as winning.thurstone, and thurstone is maintained as a compatibility shim whose imports resolve here. Legacy 1.x imports still work. By Peter Cotton, with sibling packages at microprediction.

Get the source

github.com/microprediction/winning · pip install winning · Research scripts