5th year PhD candidate at NYU Stern
Far better an approximate answer to the right question, which is often vague, than an exact answer to the wrong question, which can always be made precise.
— John Tukey
Since all models are wrong the scientist cannot obtain a ‘correct’ one by excessive elaboration. On the contrary following William of Occam he should seek an economical description of natural phenomena. Just as the ability to devise simple but evocative models is the signature of the great scientist so overelaboration and overparameterization is often the mark of mediocrity.
— George E.P. Box
\[ P(\mbox{complete}=1) = \mbox{logit}^{-1}(\alpha_i + \beta_j + \epsilon_{ijk} )\]
Similar to prediction, but you control some of the variables:
In the NFL, teams have 3 options on 4th down:
http://www.advancednflstats.com/2009/09/4th-down-study-part-1.html
where to go to college?
which colleges are being chosen over others?
"A Revealed Preference Ranking of U.S. Colleges and Universities" (Avery et al. 2004)
Ranking problem can be transformed into a two-class classification problem via the pairwise transform.
Goal: Learn \( \; f : X \times X \rightarrow \{-1,1\} \).
All we have to do is use: \( (\mathbb{R}, \geq) \)!
Goal: Learn scoring function \( q : X \rightarrow \mathbb{R} \) .
Count the games where the ranking-predicted winner is upset.
If the ranking-predicted winner loses, add the difference in ranks to the loss.
Kendall tau distance is a metric that counts the number of pairwise disagreements between two rankings.
Two rankings \( R_1, R_2 \) disagree on pair \( i, j \) if:
\[ R_1(i) > R_1(j) \wedge R_2(i) < R_2(j) \]
Useful if we want to match some existing ranking, say ESPN.com Power Rankings.
From 1988 through 2004, 11 of 16 Super Bowls were won by the team that led the NFL in Pythagorean wins, while only seven were won by the team with the most actual victories. Super Bowl champions that led the league in Pythagorean wins but not actual wins include the 2004 Patriots, 2000 Ravens, 1999 Rams and 1997 Broncos.
— Football Outsiders Almanac (2011)
See also this post.
Points for \( = y \), Points against \( = x \)
Win Rate \( = \frac{y^{\beta}}{x^{\beta} + y^{\beta}} \)
Set \( \beta \) empirically, different for each sport.
\( \beta \) can be thought of as a shrinkage parameter.
1 | ![]() | 9 | ![]() | 17 | ![]() | 25 | ![]() |
2 | ![]() | 10 | ![]() | 18 | ![]() | 26 | ![]() |
3 | ![]() | 11 | ![]() | 19 | ![]() | 27 | ![]() |
4 | ![]() | 12 | ![]() | 20 | ![]() | 28 | ![]() |
5 | ![]() | 13 | ![]() | 21 | ![]() | 29 | ![]() |
6 | ![]() | 14 | ![]() | 22 | ![]() | 30 | ![]() |
7 | ![]() | 15 | ![]() | 23 | ![]() | 31 | ![]() |
8 | ![]() | 16 | ![]() | 24 | ![]() | 32 | ![]() |
Idea: iteratively adjust for strength of schedule. Give more credit to victories over teams which are "good"
\( r_i \) is the score of team \( i \). \( a_{ij} \) is 1 if \( i \) beat \( j \).
\[ \lambda r_i = \frac{1}{n_i} = \sum_{j=1}^N a_{ij} r_j \]
\[ \mathbf{A} \mathbf{r} = \lambda \mathbf{r} \]
If \( \mathbf{A} \) is nonnegative and irreducible, it has a strictly positive eigenvector corresponding to its largest eigenvalue.
\[ \begin{array}{r} DAL \\ NYG \\ PHI \\ WAS \end{array} \left( \begin{array}{cccc} 0 & 1 & 2 & 0 \\ 1 & 0 & 1 & 1 \\ 0 & 1 & 0 & 0 \\ 2 & 1 & 2 & 0 \end{array} \right) \left( \begin{array}{c} 1 \\ 1 \\ 1 \\ 1 \end{array} \right) = \left( \begin{array}{c} 3 \\ 3 \\ 1 \\ 5 \end{array} \right) \]
\[ \left( \begin{array}{cccc} 0 & 1 & 2 & 0 \\ 1 & 0 & 1 & 1 \\ 0 & 1 & 0 & 0 \\ 2 & 1 & 2 & 0 \end{array} \right) \left( \begin{array}{cccc} 0 & 1 & 2 & 0 \\ 1 & 0 & 1 & 1 \\ 0 & 1 & 0 & 0 \\ 2 & 1 & 2 & 0 \end{array} \right) \left( \begin{array}{c} 1 \\ 1 \\ 1 \\ 1 \end{array} \right) = \left( \begin{array}{c} 5 \\ 9 \\ 3 \\ 11 \end{array} \right) \]
Must normalize this output vector by its norm.
\[ r_k = \frac{A^{k} r_0}{| A^{k} r_0 | } \]
The limit of this is just the first eigenvector!
def power_iteration(m, iters=10000):
x0 = np.ones(m.shape[0])
for i in range(iters):
x0 = np.dot(m,x0)
x0 /= np.linalg.norm(x0,1)
return x0
Redefine the preference matrix \( A \):
\[ A' = (1 - \alpha) A + \alpha \frac{1}{N} M \]
where \( M \) is a matrix of all ones.
1 | ![]() | 9 | ![]() | 17 | ![]() | 25 | ![]() |
2 | ![]() | 10 | ![]() | 18 | ![]() | 26 | ![]() |
3 | ![]() | 11 | ![]() | 19 | ![]() | 27 | ![]() |
4 | ![]() | 12 | ![]() | 20 | ![]() | 28 | ![]() |
5 | ![]() | 13 | ![]() | 21 | ![]() | 29 | ![]() |
6 | ![]() | 14 | ![]() | 22 | ![]() | 30 | ![]() |
7 | ![]() | 15 | ![]() | 23 | ![]() | 31 | ![]() |
8 | ![]() | 16 | ![]() | 24 | ![]() | 32 | ![]() |
\[ P(i>j) = \frac{1}{1 + e^{-(q_i - q_j)}} = \mbox{logit}^{-1}(q_i - q_j) \]
(Bradley & Terry, 1952; Luce, 1959)
This is basically the same as a Rasch model from education.
1 | ![]() | 9 | ![]() | 17 | ![]() | 25 | ![]() |
2 | ![]() | 10 | ![]() | 18 | ![]() | 26 | ![]() |
3 | ![]() | 11 | ![]() | 19 | ![]() | 27 | ![]() |
4 | ![]() | 12 | ![]() | 20 | ![]() | 28 | ![]() |
5 | ![]() | 13 | ![]() | 21 | ![]() | 29 | ![]() |
6 | ![]() | 14 | ![]() | 22 | ![]() | 30 | ![]() |
7 | ![]() | 15 | ![]() | 23 | ![]() | 31 | ![]() |
8 | ![]() | 16 | ![]() | 24 | ![]() | 32 | ![]() |
What's the absolute best we can do in describing the data with a ranking?
A feedback arc set is a set of edges whose removal makes the graph acyclic.
# g = igraph.Graph()
feedback_arcs = g.feedback_arc_set(method='exact')
g.delete_edges(feedback_arcs)
NP-Complete!
1 | ![]() | 9 | ![]() | 17 | ![]() | 25 | ![]() |
2 | ![]() | 10 | ![]() | 18 | ![]() | 26 | ![]() |
3 | ![]() | 11 | ![]() | 19 | ![]() | 27 | ![]() |
4 | ![]() | 12 | ![]() | 20 | ![]() | 28 | ![]() |
5 | ![]() | 13 | ![]() | 21 | ![]() | 29 | ![]() |
6 | ![]() | 14 | ![]() | 22 | ![]() | 30 | ![]() |
7 | ![]() | 15 | ![]() | 23 | ![]() | 31 | ![]() |
8 | ![]() | 16 | ![]() | 24 | ![]() | 32 | ![]() |
(shameless plug)