Similar Items: Geometry and Stability of Supervised Learning Problems