at.tuwien.ifs.somtoolbox.layers.metrics
Class AbstractWeightedMetric
java.lang.Object
at.tuwien.ifs.somtoolbox.layers.metrics.AbstractMetric
at.tuwien.ifs.somtoolbox.layers.metrics.AbstractWeightedMetric
- All Implemented Interfaces:
- DistanceMetric, Comparable<DistanceMetric>
- Direct Known Subclasses:
- L2MetricWeighted
public abstract class AbstractWeightedMetric
- extends AbstractMetric
- Version:
- $Id: AbstractWeightedMetric.java 3583 2010-05-21 10:07:41Z mayer $
- Author:
- Rudolf Mayer
Methods inherited from class at.tuwien.ifs.somtoolbox.layers.metrics.AbstractMetric |
checkDimensions, checkDimensions, compareTo, distance, distance, distance, distance, distance, distance, distance, distance, instantiateNice, meanVector, performanceTest, setMetricParams, transformValue, transformVector |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
featureWeights
protected double[] featureWeights
AbstractWeightedMetric
public AbstractWeightedMetric()
instantiate
public static AbstractWeightedMetric instantiate(String mName)
throws ClassNotFoundException,
InstantiationException,
IllegalAccessException
- Throws:
ClassNotFoundException
InstantiationException
IllegalAccessException
distance
public abstract double distance(double[] vector1,
double[] vector2,
double[] weights)
throws MetricException
- Throws:
MetricException
distance
public double distance(double[] vector,
Unit unit)
throws MetricException
- Throws:
MetricException
distance
public double distance(InputDatum inputDatum,
Unit unit)
throws MetricException
- Throws:
MetricException
distance
public double distance(double[] vector1,
double[] vector2)
throws MetricException
- Description copied from interface:
DistanceMetric
- Calculates the distance between two vectors provided by argument
vector1
and vector2
. A
MetricException
is thrown, if the dimensionalities of the two vectors differ.
- Specified by:
distance
in interface DistanceMetric
- Specified by:
distance
in class AbstractMetric
- Parameters:
vector1
- first vector.vector2
- second vector.
- Returns:
- the distance between
vector1
and vector2
.
- Throws:
MetricException
- if the dimensionalities of the two vectors differ.- See Also:
DistanceMetric.distance(double[], double[])