code: public static <V> double getCohenD(final Map<V, Double> baselineMetricPerDimension, final Map<V, Double> testMetricPerDimension, final boolean doLeastSquares) {
          SummaryStatistics statsBaseline = new SummaryStatistics();
          for (double d : baselineMetricPerDimension.values()) {
              statsBaseline.addValue(d);
          }
          SummaryStatistics statsTest = new SummaryStatistics();
          for (double d : testMetricPerDimension.values()) {
              statsTest.addValue(d);
          }
          if (doLeastSquares) {
              return getCohenDLeastSquares(
                      (int) statsBaseline.getN(), statsBaseline.getMean(), statsBaseline.getStandardDeviation(),
                      (int) statsTest.getN(), statsTest.getMean(), statsTest.getStandardDeviation());
          }
          return getCohenD(
                  (int) statsBaseline.getN(), statsBaseline.getMean(), statsBaseline.getStandardDeviation(),
                  (int) statsTest.getN(), statsTest.getMean(), statsTest.getStandardDeviation());
      }
docs: Computes Cohen's d, either the classical formulation (dividing the pooled
  standard deviation by the sum of the number of samples) or using the
  least squares estimation (substracting 2 to the sum of the number of
  samples when normalizing the pooled standard deviation).
  
  @param <V> type of the keys of each map.
  @param baselineMetricPerDimension map for the baseline method, one value
  for each user (dimension)
  @param testMetricPerDimension map for the test method, one value for each
  user (dimension)
  @param doLeastSquares flag to use one formulation or the other (see
  description above)
  @return the computed Cohen's d as estimation of the effect size..