public class DerivateDistance extends java.lang.Object implements ITimeSeriesDistance
d, the Derivate Distance for the two
time series A and B is:
a * d(A, B) + b * d(A', B'), where A' and
B' are the derivates (@see jaicore.ml.tsc.filter.derivate) of
A and B respec. and
0 <= a <= 1, 0 <= b <= 1> are parameters of the measure. The
parameters a and b are set via an
alpha value, that is a=cos(alpha) and
b=sin(alpha).
The Derivate Distance that uses Dynamic Time Warping as underlying distance
measure is commonly denoted as DD_DTW. The Derivate Distance that uses the
Euclidean distance as underlying distance measure is commonly denoted as
DD_ED.
It is also possible to use a distinct distance measure to calculate the distance between the time series and its derivates.
| Constructor and Description |
|---|
DerivateDistance(double alpha,
ADerivateFilter derivate,
ITimeSeriesDistance distance)
Constructor that uses the same distance measures for the function and
derivate values.
|
DerivateDistance(double alpha,
ADerivateFilter derivate,
ITimeSeriesDistance timeSeriesDistance,
ITimeSeriesDistance derivateDistance)
Constructor with individual distance measures for the function and derivate
values.
|
DerivateDistance(double alpha,
ITimeSeriesDistance distance)
Constructor that uses the same distance measures for the function and
derivate values that uses the
BackwardDifferenceDerivate as
derivation. |
DerivateDistance(double alpha,
ITimeSeriesDistance timeSeriesDistance,
ITimeSeriesDistance derivateDistance)
Constructor with individual distance measures for the function and derivate
values that uses the
BackwardDifferenceDerivate as derivation. |
| 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 |
getAlpha()
Getter for the alpha value.
|
double |
getB()
Getter for the
a parameter. |
void |
setAlpha(double alpha)
Sets the alpha value and adjusts the measurement parameters
a = cos(alpha) |
public DerivateDistance(double alpha,
ADerivateFilter derivate,
ITimeSeriesDistance timeSeriesDistance,
ITimeSeriesDistance derivateDistance)
alpha - The distance measure to use to calculate the
distance of the function values.
0 <= alpha <= pi/2.derivate - The derivate calculation to use.timeSeriesDistance - The distance measure to use to calculate the
distance of the derivate values.derivateDistance - The distance measure to use to calculate the
distance of the derivate values.public DerivateDistance(double alpha,
ITimeSeriesDistance timeSeriesDistance,
ITimeSeriesDistance derivateDistance)
BackwardDifferenceDerivate as derivation.alpha - The distance measure to use to calculate the
distance of the function values.
0 <= alpha <= pi/2.timeSeriesDistance - The distance measure to use to calculate the
distance of the derivate values.derivateDistance - The distance measure to use to calculate the
distance of the derivate values.public DerivateDistance(double alpha,
ADerivateFilter derivate,
ITimeSeriesDistance distance)
alpha - The distance measure to use to calculate the distance of the
function values. 0 <= alpha <= pi/2.derivate - The derivate calculation to use.distance - The distance measure to use to calculate the distance of the
function and derivate values.public DerivateDistance(double alpha,
ITimeSeriesDistance distance)
BackwardDifferenceDerivate as
derivation.alpha - The distance measure to use to calculate the distance of the
function values. 0 <= alpha <= pi/2.distance - The distance measure to use to calculate the distance of the
function and derivate values.public double distance(double[] a,
double[] b)
ITimeSeriesDistancedistance in interface ITimeSeriesDistancea - First time series.b - Second time series.public void setAlpha(double alpha)
a = cos(alpha) and b = sin(alpha) accordingly.alpha - The alpha value, 0 <= alpha <= pi/2.public double getAlpha()
0 <= alpha <= pi/2.public double getA()
a parameter. @see #apublic double getB()
a parameter. @see #b