|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--coreComponents.DistanceMetric
Abstract class for implementing specialised distance measures.
Constructor Summary | |
DistanceMetric()
|
Method Summary | |
abstract boolean |
checkInstances(Instances instances)
Check if the instances are valid for the distance metric. |
abstract double |
distance(Instance inst1,
Instance inst2)
Calculates the distance between two instances. |
static DistanceMetric |
forName(java.lang.String distanceMetricName,
java.lang.String[] options)
Creates a new instance of a distance metric given it's class name and (optional) arguments to pass to it's setOptions method. |
abstract void |
reset(Instances instances)
This function is useful if we need to reinitialise the distance metric without using the constructor |
abstract java.lang.String |
toString()
Creates a debugging string detailing the information about the distance metric |
abstract void |
updateRanges(Instance inst1)
Update the ranges of the distance metric with a new training instance. |
Methods inherited from class java.lang.Object |
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Constructor Detail |
public DistanceMetric()
Method Detail |
public abstract void reset(Instances instances)
public abstract double distance(Instance inst1, Instance inst2)
inst1
- the first instanceinst2
- the second instance
public abstract java.lang.String toString()
toString
in class java.lang.Object
public abstract void updateRanges(Instance inst1)
inst1
- the instance to update with
public abstract boolean checkInstances(Instances instances)
instances
- the training instances to be checked
public static DistanceMetric forName(java.lang.String distanceMetricName, java.lang.String[] options) throws java.lang.Exception
distanceMetricName
- the fully qualified class name of theoptions
- an array of options suitable for passing to setOptions. May
be null.
java.lang.Exception
- if the distance metric name is invalid, or the options
supplied are not acceptable to the distance metric
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
Copyright (c) 2003 David Lindsay, Computer Learning Research Centre, Dept. Computer Science, Royal Holloway, University of London