weka.classifiers.neural.lvq.vectordistance
Class NumericDistance

java.lang.Object
  extended by weka.classifiers.neural.lvq.vectordistance.NumericDistance
All Implemented Interfaces:
java.io.Serializable, AttributeDistance

public class NumericDistance
extends java.lang.Object
implements AttributeDistance

Description: Distance between numberic attribute values, lower the distance the closer the values.
Copyright (c) Jason Brownlee 2004

Author:
Jason Brownlee
See Also:
Serialized Form

Constructor Summary
NumericDistance()
           
 
Method Summary
 double distance(double instanceValue, double codebookValue)
          Distance between numberic attribute values, lower the distance the closer the values.
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

NumericDistance

public NumericDistance()
Method Detail

distance

public double distance(double instanceValue,
                       double codebookValue)
Distance between numberic attribute values, lower the distance the closer the values. The square of the delta is returned. These can be summed to produce an approximation of the eucliden distance (with or without the square root at the end).

Specified by:
distance in interface AttributeDistance
Parameters:
instanceValue -
codebookValue -
Returns: