public class TransformDistance extends AWeightedTrigometricDistance
d, the Transform Distance for the two
time series A and B is:
a * d(A, B) + b * d(t(A), t(B)), where 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> 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 Transform Distance that uses Dynamic Time Warping as underlying distance
measure is commonly denoted as TD_DTW. The 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 and its transforms.
| Constructor and Description |
|---|
TransformDistance(double alpha,
ATransformFilter transform,
ITimeSeriesDistance distance)
Constructor that uses the same distance measures for the function and
transform values.
|
TransformDistance(double alpha,
ATransformFilter transform,
ITimeSeriesDistance timeSeriesDistance,
ITimeSeriesDistance transformDistance)
Constructor with individual distance measures for the function and transform
values.
|
TransformDistance(double alpha,
ITimeSeriesDistance distance)
Constructor that uses the same distance measures for the function and
transform values that uses the
CosineTransform as transformation. |
TransformDistance(double alpha,
ITimeSeriesDistance timeSeriesDistance,
ITimeSeriesDistance transformDistance)
Constructor with individual distance measures for the function and transform
values that uses the
CosineTransform as transformation. |
| Modifier and Type | Method and Description |
|---|---|
double |
distance(double[] a,
double[] b)
Calculates the distance between two time series.
|
getA, getAlpha, getB, setAlphapublic TransformDistance(double alpha,
ATransformFilter transform,
ITimeSeriesDistance timeSeriesDistance,
ITimeSeriesDistance transformDistance)
alpha - @see #alpha ,0 <= alpha <= pi/2.transform - The transform calculation to use.timeSeriesDistance - The distance measure to use to calculate the
distance of the transform values.transformDistance - The distance measure to use to calculate the
distance of the transform values.public TransformDistance(double alpha,
ITimeSeriesDistance timeSeriesDistance,
ITimeSeriesDistance transformDistance)
CosineTransform as transformation.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 transform values.transformDistance - The distance measure to use to calculate the
distance of the transform values.public TransformDistance(double alpha,
ATransformFilter transform,
ITimeSeriesDistance distance)
alpha - The distance measure to use to calculate the distance of the
function values. 0 <= alpha <= pi/2.transform - The transform calculation to use.distance - The distance measure to use to calculate the distance of the
function and transform values.public TransformDistance(double alpha,
ITimeSeriesDistance distance)
CosineTransform as transformation.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 transform values.public double distance(double[] a,
double[] b)
ITimeSeriesDistancea - The influence of distance of the function values to the overall distance measure.b - The influence of distance of the transform values to the overall distance measure.