code: public static void sort(ScoringInfo[] scoringInfos, ScoreKeeper.StoppingMetric criterion) {
      if (null == scoringInfos) return;
      if (scoringInfos.length == 0) return;
  
      // handle StoppingMetric.AUTO
      if (criterion == ScoreKeeper.StoppingMetric.AUTO)
        criterion = scoringInfos[0].is_classification ? ScoreKeeper.StoppingMetric.logloss : scoringInfos[0].is_autoencoder ? ScoreKeeper.StoppingMetric.RMSE : ScoreKeeper.StoppingMetric.deviance;
  
      Arrays.sort(scoringInfos, ScoringInfo.comparator(criterion));
    }
docs: Sort an array of ScoringInfo based on a stopping criterion / metric.  Uses
  cross-validation or validation metrics if available, otherwise falls back to training
  metrics.  Understands whether more is better for the given criterion and will order
  the array so that the best models are last
  @param scoringInfos array of ScoringInfo to sort
  @param criterion scalar model metric / stopping criterion by which to sort