Classifier function, plot loss function on critical points ranked by index