How can we measure differences between two things?
How can we measure differences between two things?
Imagine you have two strings of characters, like "hello" and "hallo". You want to know how many characters differ between them.
Think of each character in the strings as a unique puzzle piece. To find out how many pieces differ, you compare each piece in the same position in both strings and count the mismatches.
Example
Comparing "hello" and "hallo", 'e' and 'a' differ in the second string.
Remember this
The Hamming distance counts the number of positions at which the corresponding characters are different.
Text adapted from Wikipedia, licensed under CC BY-SA 4.0.
Hamming distance
Hamming distance measures the number of differing positions between two strings
Hellinger distance
Ever wondered how to measure differences between two things?
Perplexity
Perplexity = 2^H
Richard Hamming
How do we fix mistakes in data without starting over?
Mahalanobis distance
Mahalanobis distance formula: D^2 = (x - μ)'Σ^(-1)(x - μ)
the Lp norm ball shape changes as p goes from 1 to 2 to infinity
How does the shape of a ball change as we measure distance differently?
Swipe through more Machine Learning concepts
Open Pocket Polymath