Published: Nov. 8, 2020, 5 p.m.
Support my new podcast: Lefnire's Life Hacks
Show notes at\xa0ocdevel.com/mlg/32.
L1/L2 norm, Manhattan, Euclidean, cosine distances, dot product
Normed distances\xa0link
- A norm is a function that assigns a strictly positive length to each vector in a vector space.\xa0link
- Minkowski is generalized.\xa0
p_root(sum(xi-yi)^p)
. "p" = ? (1, 2, ..) for below. - L1: Manhattan/city-block/taxicab.\xa0
abs(x2-x1)+abs(y2-y1)
. Grid-like distance (triangle legs). Preferred for high-dim space. - L2: Euclidean.\xa0
sqrt((x2-x1)^2+(y2-y1)^2
.\xa0sqrt(dot-product)
. Straight-line distance; min distance (Pythagorean triangle edge) - Others: Mahalanobis, Chebyshev (p=inf), etc
Dot product
- A type of inner product.
Outer-product: lies outside the involved planes. Inner-product: dot product lies inside the planes/axes involved\xa0link. Dot product: inner product on a finite dimensional Euclidean space\xa0link
Cosine (normalized dot)