Class SpearmanRankCorrelationPerExample

All Implemented Interfaces:
Serializable

public class SpearmanRankCorrelationPerExample extends ClusNumericError
This class computes the average spearman rank correlation over all target attributes. Ties are not taken into account. The spearman rank correlation is a measure for how well the rankings of the real values correspond to the rankings of the predicted values. This version of coefficient computes the correlation between multiple true/predicted target values for a given example, and returns the average over all examples. Some methods are missing.
Author:
beau, matejp
See Also:
  • Field Details

  • Constructor Details

  • Method Details

    • addExample

      public void addExample(double[] real, double[] predicted)
      Specified by:
      addExample in class ClusNumericError
    • addExample

      public void addExample(DataTuple real, DataTuple pred)
      Overrides:
      addExample in class ClusError
    • getModelErrorComponent

      public double getModelErrorComponent(int i)
      Overrides:
      getModelErrorComponent in class ClusError
    • getAvgRankCorr

      public double getAvgRankCorr()
      Gives the average (=arithmetic mean) spearman rank correlation over all examples.
      Returns:
      average spearman rank correlation
    • getHarmonicAvgRankCorr

      public double getHarmonicAvgRankCorr()
      Gives the average (=arithmetic mean) spearman rank correlation over all examples.
      Returns:
      harmonic mean of spearman rank correlations for each example
    • getRankCorrVariance

      public double getRankCorrVariance()
      Gives the variance of the arithmetic mean of the rank correlation over all examples
      Returns:
      variance of the average rank correlation
    • getHarmonicRankCorrVariance

      public double getHarmonicRankCorrVariance()
      Gives the variance of the harmonic mean of the rank correlation over all examples
      Returns:
      variance of the average rank correlation
    • getName

      public String getName()
      Description copied from class: ClusError
      Information
      Specified by:
      getName in class ClusError
    • getSpearmanRankCorrelation

      public double getSpearmanRankCorrelation(double[] a, double[] b)
    • getErrorClone

      public ClusError getErrorClone(ClusErrorList par)
      Specified by:
      getErrorClone in class ClusError
    • shouldBeLow

      public boolean shouldBeLow()
      Description copied from class: ClusError
      Should this error be minimized (e.g. RRSE) or maximized (e.g. accuracy)? True by default.
      Specified by:
      shouldBeLow in class ClusError