Out-of-sample error estimate for robust M-estimators with convex penalty