code: private ModelMetrics.MetricBuilder createMetricsBuilder(final int responseClassesNum, final String[] responseDomain) {
          switch (responseClassesNum) {
              case 1:
                  return new ModelMetricsRegression.MetricBuilderRegression();
              case 2:
                  return new ModelMetricsBinomial.MetricBuilderBinomial(responseDomain);
              default:
                  return new ModelMetricsMultinomial.MetricBuilderMultinomial(responseClassesNum, responseDomain);
          }
      }
docs: Constructs a MetricBuilder for this XGBoostScoreTask based on parameters of response variable
  
  @param responseClassesNum Number of classes found in response variable
  @param responseDomain     Specific domains in response variable
  @return An instance of {@link hex.ModelMetrics.MetricBuilder} corresponding to given response variable type