docs: public double mahalanobisDistance(double[] vec) {
      double agg = 0.;
      for(int i = 0; i < vec.length; i++) {
        double diff = vec[i] - mean[i];
        agg += diff / variance * diff;
      }
      return agg;
    }