Package elki.distance.timeseries
Class LCSSDistance
- java.lang.Object
-
- elki.distance.AbstractNumberVectorDistance
-
- elki.distance.timeseries.LCSSDistance
-
- All Implemented Interfaces:
Distance<NumberVector>
,NumberVectorDistance<NumberVector>
,PrimitiveDistance<NumberVector>
@Title("Longest Common Subsequence distance function") @Reference(authors="M. Vlachos, M. Hadjieleftheriou, D. Gunopulos, E. Keogh", title="Indexing Multi-Dimensional Time-Series with Support for Multiple Distance Measures", booktitle="Proc. 9th ACM SIGKDD Int. Conf. on Knowledge Discovery and Data Mining", url="https://doi.org/10.1145/956750.956777", bibkey="DBLP:conf/kdd/VlachosHGK03") public class LCSSDistance extends AbstractNumberVectorDistance
Longest Common Subsequence distance for numerical vectors.Originally this was based on the Matlab Code by Michalis Vlachos, but we have since switched to a version that uses less memory.
Reference:
M. Vlachos, M. Hadjieleftheriou, D. Gunopulos, E. Keogh
Indexing Multi-Dimensional Time-Series with Support for Multiple Distance Measures
Proc. 9th ACM SIGKDD Int. Conf. on Knowledge Discovery and Data Mining- Since:
- 0.2
- Author:
- Thomas Bernecker
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static class
LCSSDistance.Par
Parameterization class.
-
Constructor Summary
Constructors Constructor Description LCSSDistance(double pDelta, double pEpsilon)
Constructor.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description double
distance(NumberVector v1, NumberVector v2)
Computes the distance between two given vectors according to this distance function.boolean
equals(java.lang.Object obj)
VectorTypeInformation<? super NumberVector>
getInputTypeRestriction()
Get the input data type of the function.double
getRange(NumberVector v1, int dim1, NumberVector v2, int dim2)
int
hashCode()
-
Methods inherited from class elki.distance.AbstractNumberVectorDistance
dimensionality, dimensionality, dimensionality, dimensionality, dimensionality, dimensionality, dimensionality, dimensionality
-
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface elki.distance.Distance
isMetric, isSquared, isSymmetric
-
Methods inherited from interface elki.distance.PrimitiveDistance
instantiate
-
-
-
-
Method Detail
-
distance
public double distance(NumberVector v1, NumberVector v2)
Description copied from interface:NumberVectorDistance
Computes the distance between two given vectors according to this distance function.- Parameters:
v1
- first vectorv2
- second vector- Returns:
- the distance between two given vectors according to this distance function
-
getRange
public double getRange(NumberVector v1, int dim1, NumberVector v2, int dim2)
-
getInputTypeRestriction
public VectorTypeInformation<? super NumberVector> getInputTypeRestriction()
Description copied from interface:Distance
Get the input data type of the function.- Specified by:
getInputTypeRestriction
in interfaceDistance<NumberVector>
- Specified by:
getInputTypeRestriction
in interfacePrimitiveDistance<NumberVector>
- Overrides:
getInputTypeRestriction
in classAbstractNumberVectorDistance
- Returns:
- Type restriction
-
equals
public boolean equals(java.lang.Object obj)
- Overrides:
equals
in classjava.lang.Object
-
hashCode
public int hashCode()
- Overrides:
hashCode
in classjava.lang.Object
-
-