public class DerivateTransformDistance extends java.lang.Object implements ITimeSeriesDistance
d, the Derivate Transform Distance for
the two time series A and B is:
a * d(A, B) + b * d(A', B') + c * d(t(A), t(B)), where
A' and B' are the derivates (@see
jaicore.ml.tsc.filter.derivate) and t(A) and t(B)
are transforms (@see jaicore.ml.tsc.filter.transform) of A and
B respec. and
0 <= a <= 1, 0 <= b <= 1, 0 <= c <= 1> are parameters of the
measure.
The Derivate Transform Distance that uses Dynamic Time Warping as underlying
distance measure is commonly denoted as DTD_DTW. The Derivate Transform
Distance that uses the Euclidean distance as underlying distance measure is
commonly denoted as TD_ED.
It is also possible to use a distinct distance measure to calculate the distance between the time series, its transforms and its derivates.
| Constructor and Description |
|---|
DerivateTransformDistance(double a,
double b,
double c,
ADerivateFilter derivate,
ATransformFilter transform,
ITimeSeriesDistance distance)
Constructor that uses the same distance measures for function, derivate and
transform values.
|
DerivateTransformDistance(double a,
double b,
double c,
ADerivateFilter derivate,
ATransformFilter transform,
ITimeSeriesDistance timeSeriesDistance,
ITimeSeriesDistance derivateDistance,
ITimeSeriesDistance transformDistance)
Constructor with individual distance measure for function, derivate and
transform values.
|
DerivateTransformDistance(double a,
double b,
double c,
ITimeSeriesDistance distance)
Constructor that uses the same distance measures for function, derivate and
transform values.
|
DerivateTransformDistance(double a,
double b,
double c,
ITimeSeriesDistance timeSeriesDistance,
ITimeSeriesDistance derivateDistance,
ITimeSeriesDistance transformDistance)
Constructor with individual distance measure for function, derivate and
transform values that uses the
BackwardDifferencetransform as
derivate and the CosineTransform as transformation. |
| Modifier and Type | Method and Description |
|---|---|
double |
distance(double[] a,
double[] b)
Calculates the distance between two time series.
|
double |
getA()
Getter for the
a parameter. |
double |
getB()
Getter for the
b parameter. |
double |
getC()
Getter for the
c parameter. |
void |
setA(double a)
Sets the
a parameter. |
void |
setB(double b)
Sets the
b parameter. |
void |
setC(double c)
Sets the
c parameter. |
public DerivateTransformDistance(double a,
double b,
double c,
ADerivateFilter derivate,
ATransformFilter transform,
ITimeSeriesDistance timeSeriesDistance,
ITimeSeriesDistance derivateDistance,
ITimeSeriesDistance transformDistance)
a - Determines the influence of distance of the
derivate values to the overall distance measure.b - Determines the influence of distance of the
transform values to the overall distance measure.c - Determines the influence of distance of the
transform values to the overall distance measure.derivate - The derivate calculation to use.transform - The transform calculation to use.timeSeriesDistance - The distance measure to use to calculate the
distance of the function values.derivateDistance - The distance measure to use to calculate the
distance of the derivate values.transformDistance - The distance measure to use to calculate the
distance of the transform values.public DerivateTransformDistance(double a,
double b,
double c,
ITimeSeriesDistance timeSeriesDistance,
ITimeSeriesDistance derivateDistance,
ITimeSeriesDistance transformDistance)
BackwardDifferencetransform as
derivate and the CosineTransform as transformation.a - Determines the influence of distance of the
derivate values to the overall distance measure.b - Determines the influence of distance of the
transform values to the overall distance measure.c - Determines the influence of distance of the
transform values to the overall distance measure.timeSeriesDistance - The distance measure to use to calculate the
distance of the function values.derivateDistance - The distance measure to use to calculate the
distance of the derivate values.transformDistance - The distance measure to use to calculate the
distance of the transform values.public DerivateTransformDistance(double a,
double b,
double c,
ADerivateFilter derivate,
ATransformFilter transform,
ITimeSeriesDistance distance)
a - Determines the influence of distance of the derivate values
to the overall distance measure.b - Determines the influence of distance of the transform values
to the overall distance measure.c - Determines the influence of distance of the transform values
to the overall distance measure.derivate - The derivate calculation to use.transform - The transform calculation to use.distance - The distance measure to use of the function, derivate and
transform values.public DerivateTransformDistance(double a,
double b,
double c,
ITimeSeriesDistance distance)
a - Determines the influence of distance of the derivate values
to the overall distance measure.b - Determines the influence of distance of the transform values
to the overall distance measure.c - Determines the influence of distance of the transform values
to the overall distance measure.distance - The distance measure to use of the function, derivate and
transform values.public double distance(double[] a,
double[] b)
ITimeSeriesDistancedistance in interface ITimeSeriesDistancea - First time series.b - Second time series.public void setA(double a)
a parameter. @see #aa - The a parameter, 0 <= a <= 1.public void setB(double b)
b parameter. @see #ba - The b parameter, 0 <= b <= 1.public void setC(double c)
c parameter. @see #ca - The c parameter, 0 <= c <= 1.public double getA()
a parameter. @see #apublic double getB()
b parameter. @see #bpublic double getC()
c parameter. @see #c