
Ever wonder how to measure if two rankings are similar?
Image: Balkiss.hamad, CC BY-SA 4.0, via Wikimedia Commons
Ever wonder how to measure if two rankings are similar?
Imagine you're comparing the rankings of your favorite books from two different lists. You want to know how closely the rankings match.
Think of it as counting how many times two lists agree on the order of items. The closer the agreement, the stronger the connection between the lists.
Example
List A ranks "Book X" as 1st, "Book Y" as 2nd, and "Book Z" as 3rd. List B ranks "Book Y" as 1st, "Book X" as 2nd, and "Book Z" as 3rd. They agree on the order of "Book Y" and "Book Z", showing a strong connection.
Remember this
Spearman's rank correlation coefficient (ρ) quantifies the degree to which two rankings agree.
Text adapted from Wikipedia, licensed under CC BY-SA 4.0.
PageRank
PageRank formula: PR(A) = (1-d) + d Σ(PR(C)/L(C))
Pearson correlation coefficient
Pearson correlation coefficient formula: r = Σ[(xi - x̄)(yi - ȳ)] / [√(Σ(xi - x̄)²) * √(Σ(yi - ȳ)²)]
Phi coefficient
Matthews correlation coefficient (MCC) measures balanced metric even with class imbalance
score matching does: learns the gradient of the log-density without normalizing
Ever wonder how we can compare apples and oranges fairly in studies?
Evaluation of binary classifiers
Why can't we just use one score for everything?
Cosine similarity
Cosine similarity formula: cos(θ) = (A · B) / (||A|| ||B||)
Swipe through 100 ML concepts daily
Open Pocket Polymath