curvature_estimation function

Computes the curvatures of all samples in the training set.