public class DTWKernelComparator extends Object implements Comparator<VectorialValue>, DerivableComparator<VectorialValue,double[]>
Constructor and Description |
---|
DTWKernelComparator(double[] localWeights) |
DTWKernelComparator(double[] localWeights,
double sigma) |
Modifier and Type | Method and Description |
---|---|
double |
calculateLocalDerivative(int paramIdent,
VectorialValue a,
VectorialValue b,
OperationType type)
TODO: think about opterationType
This is called by an AlignmentDerivativeAlgorithm and should calculate
the local derivative for only one comparison of the values a and b.
|
double |
compare(VectorialValue a,
VectorialValue b)
This has to return a distance between a and b with the following
restrictions:
The return value has to lie between 0 and 1.
|
int |
getNumberOfParameters()
This shall return the number of parameters of this comparator.
|
Class<double[]> |
getResultClass()
Returns the class of the intuitive format of the derivatives for all
parameters of this comparator.
|
double |
getSigma() |
ValueType |
getType() |
double[] |
transformToResult(double[] derivatives)
This method is supposed to construct the derivative for this comparator
in an intuitive format given its vectorial form.
|
public DTWKernelComparator(double[] localWeights)
public DTWKernelComparator(double[] localWeights, double sigma)
public ValueType getType()
getType
in interface Comparator<VectorialValue>
public double getSigma()
public double compare(VectorialValue a, VectorialValue b)
compare
in interface Comparator<VectorialValue>
a
- the left input.b
- the right input.public double calculateLocalDerivative(int paramIdent, VectorialValue a, VectorialValue b, OperationType type)
calculateLocalDerivative
in interface DerivableComparator<VectorialValue,double[]>
paramIdent
- the index for this parameters.a
- the value that has been compared with b.b
- the value that has been compared with a.type
- the operation type that has actually been used in the
comparison.public double[] transformToResult(double[] derivatives)
transformToResult
in interface DerivableComparator<VectorialValue,double[]>
derivatives
- the derivatives for all parameters of this comparator
in its vectorial form.public Class<double[]> getResultClass()
DerivableComparator
getResultClass
in interface DerivableComparator<VectorialValue,double[]>
public int getNumberOfParameters()
DerivableComparator
getNumberOfParameters
in interface DerivableComparator<VectorialValue,double[]>
Copyright (C) 2013, 2014 Benjamin Paaßen, Charlie Krüger, Georg Zentgraf, AG Theoretical Computer Science, Centre of Excellence Cognitive Interaction Technology (CITEC), University of Bielefeld, licensed under the AGPL v. 3: http://openresearch.cit-ec.de/projects/tcs