Geometry and Stability of Supervised Learning Problems