nz.ac.waikato.mcennis.rat.reusablecores.distance
Class PearsonDistance

java.lang.Object
  extended by nz.ac.waikato.mcennis.rat.reusablecores.distance.PearsonDistance
All Implemented Interfaces:
DistanceFunction

public class PearsonDistance
extends java.lang.Object
implements DistanceFunction

Adapted from Anna Huang's Pearson distance metric for Weka by Daniel McEnnis


Constructor Summary
PearsonDistance()
           
 
Method Summary
 double distance(DataVector inst1, DataVector inst2)
          Return the distance between the two given vectors as a double.
 PearsonDistance prototype()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

PearsonDistance

public PearsonDistance()
Method Detail

distance

public double distance(DataVector inst1,
                       DataVector inst2)
Description copied from interface: DistanceFunction
Return the distance between the two given vectors as a double.

Specified by:
distance in interface DistanceFunction
Parameters:
inst1 - left data vector
inst2 - right data vector
Returns:
distance by a given metric

prototype

public PearsonDistance prototype()
Specified by:
prototype in interface DistanceFunction

Get Relational Analysis Toolkit at SourceForge.net. Fast, secure and Free Open Source software downloads