4 ms·
Nah, L_1 is called "taxicab" or "Manhattan" distance. https://en.wikipedia.org/wiki/Taxicab_geometry https://en.wikipedia.org/wiki/Taxicab_geometry https://en
by jey 9y ago
Nah, L_1 is called "taxicab" or "Manhattan" distance.
https://en.wikipedia.org/wiki/Taxicab_geometry https://en.wikipedia.org/wiki/Taxicab_geometry
https://en.wikipedia.org/wiki/Hamming_distance https://en.wikipedia.org/wiki/Hamming_distance
- jules 9y agoRight, those are two different names for the L_1 distance, but why does that show that they're not the same? For binary vectors v,w we have abs(v[i] - w[i]) = v[i] xor w[i], and the L_1 distance is the sum of the former whereas the Hamming distance is the sum of the latter.
- yorwba 9y agoFor non-binary vectors, Hamming (L_0) and L_1 are in general not identical. E.g. L_0(2) = 1 but L_1(2) = 2.
- danbruc 9y agoAnd those are essentially the same so calling it L_1 is correct.
- jey 9y agoWhat's the L0 "norm" of [0.0, 1.0, 2.22045e-16]? julia> vecnorm([0.0, 1.0, eps()], 0) 2.0 julia> vecnorm([0.0, 1.0, eps()], 1) 1.0000000000000002