Class UncenteredCorrelationDistance

    • Constructor Detail

      • UncenteredCorrelationDistance

        @Deprecated
        public UncenteredCorrelationDistance()
        Deprecated.
        Use static instance!
        Constructor - use STATIC instead.
    • Method Detail

      • uncenteredCorrelation

        public static double uncenteredCorrelation​(NumberVector x,
                                                   NumberVector y)
        Compute the uncentered correlation of two vectors.
        Parameters:
        x - first NumberVector
        y - second NumberVector
        Returns:
        the uncentered correlation coefficient for x and y
      • uncenteredCorrelation

        public static double uncenteredCorrelation​(double[] x,
                                                   double[] y)
        Compute the uncentered correlation of two vectors.
        Parameters:
        x - first NumberVector
        y - second NumberVector
        Returns:
        the uncentered correlation coefficient for x and y
      • distance

        public double distance​(NumberVector v1,
                               NumberVector v2)
        Computes the Pearson correlation distance for two given feature vectors. The Pearson correlation distance is computed from the Pearson correlation coefficient r as: 1-r. Hence, possible values of this distance are between 0 and 2.
        Parameters:
        v1 - first feature vector
        v2 - second feature vector
        Returns:
        the Pearson correlation distance for two given feature vectors v1 and v2
      • toString

        public java.lang.String toString()
        Overrides:
        toString in class java.lang.Object
      • equals

        public boolean equals​(java.lang.Object obj)
        Overrides:
        equals in class java.lang.Object
      • hashCode

        public int hashCode()
        Overrides:
        hashCode in class java.lang.Object