net.sf.javaml.distance
Class PearsonCorrelationCoefficient

java.lang.Object
  extended by net.sf.javaml.distance.AbstractCorrelation
      extended by net.sf.javaml.distance.PearsonCorrelationCoefficient
All Implemented Interfaces:
java.io.Serializable, DistanceMeasure

public class PearsonCorrelationCoefficient
extends AbstractCorrelation

Calculates the Pearson Correlation Coeffient between two vectors. The returned value lies in the interval [-1,1]. A value of 1 shows that a linear equation describes the relationship perfectly and positively, with all data points lying on the same line and with Y increasing with X. A score of ?1 shows that all data points lie on a single line but that Y increases as X decreases. A value of 0 shows that a linear model is inappropriate / that there is no linear relationship between the variables. http://davidmlane.com/hyperstat/A56626.html http://en.wikipedia.org/wiki/Pearson_product-moment_correlation_coefficient

Author:
Thomas Abeel (thomas@abeel.be)
See Also:
Serialized Form

Constructor Summary
PearsonCorrelationCoefficient()
           
 
Method Summary
 double measure(Instance a, Instance b)
          Measures the Pearson Correlation Coefficient between the two supplied instances.
 
Methods inherited from class net.sf.javaml.distance.AbstractCorrelation
compare
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

PearsonCorrelationCoefficient

public PearsonCorrelationCoefficient()
Method Detail

measure

public double measure(Instance a,
                      Instance b)
Measures the Pearson Correlation Coefficient between the two supplied instances.

Parameters:
a - the first instance
b - the second instance
Returns:
the distance between the two instances


Copyright © 2006-2010 - Thomas Abeel - All Rights Reserved. SourceForge.netLogo