Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

Pythagoras theorem only holds in Euclidean geometry (or so, Wikipedia says). The computer world has no notion of space, so there's no a priori reason for choosing Pythagoras over other norms%. Has anyone here experimented with alternatives?

%See for example: http://en.wikipedia.org/wiki/Distance



I've used the 1-norm, aka "Manhattan", distance (with weights of course) for visual image search. I think the 1-norm is always a better choice than the Euclidean distance unless there is some clear geometric context.


The 1-norm tends to also be less sensitive to outliers, and in machine learning, 1-norm regularization leads to sparse solutions. The real reason 2-norm is popular is that it is easy to minimize (differentiable).




Consider applying for YC's Summer 2026 batch! Applications are open till May 4

Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: