Class 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 measure c and a distance measure d, the Complexity Invariant Distance for the two time series A and B is: 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
      double distance​(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
    • Method Detail

      • distance

        public double distance​(double[] a,
                               double[] b)
        Description copied from interface: IDistanceMetric
        Calculates the distance between two time series.
        Specified by:
        distance in interface IDistanceMetric
        Parameters:
        a - First time series.
        b - Second time series.
        Returns:
        Distance between the first and second time series.