code: public double getCorrelation() {
      if(!(sumXX > 0. && sumYY > 0.)) {
        return (sumXX == sumYY) ? 1. : 0.;
      }
      return sumXY / FastMath.sqrt(sumXX * sumYY);
    }
docs: Get the Pearson correlation value.
  
  @return Correlation value