Package ai.libs.jaicore.basic.metric
Class ComplexityInvariantDistance
- java.lang.Object
-
- ai.libs.jaicore.basic.metric.ComplexityInvariantDistance
-
- All Implemented Interfaces:
org.api4.java.common.math.IMetric<double[]>,IDistanceMetric
public class ComplexityInvariantDistance extends java.lang.Object implements IDistanceMetric
Implementation of the Complexity Invariant Distance (CID) measure as published in "A Complexity-Invariant Distance Measure for Time Series" by Gustavo E.A.P.A. Batista, Xiaoyue Wang and Eamonn J. Keogh. The authors address the complexity invariant of time series distance measures. That is, that time series with higher complexity tend to be further apart under current distance measures than pairs of simple objects. Given a complexity measurecand a distance measured, the Complexity Invariant Distance for the two time seriesAandBis:d(A, B) * (max(c(A), c(B)) / min(c(A), c(B))).
-
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description doubledistance(double[] a, double[] b)Calculates the distance between two time series.-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface org.api4.java.common.metric.IDistanceMetric
getDistance
-
-
-
-
Method Detail
-
distance
public double distance(double[] a, double[] b)Description copied from interface:IDistanceMetricCalculates the distance between two time series.- Specified by:
distancein interfaceIDistanceMetric- Parameters:
a- First time series.b- Second time series.- Returns:
- Distance between the first and second time series.
-
-