Measures of distortion for machine learning