Package elki.distance.timeseries
Class ERPDistance
- java.lang.Object
-
- elki.distance.AbstractNumberVectorDistance
-
- elki.distance.timeseries.AbstractEditDistance
-
- elki.distance.timeseries.DTWDistance
-
- elki.distance.timeseries.ERPDistance
-
- All Implemented Interfaces:
Distance<NumberVector>
,NumberVectorDistance<NumberVector>
,PrimitiveDistance<NumberVector>
@Title("Edit Distance with Real Penalty") @Reference(authors="L. Chen, R. Ng", title="On the marriage of Lp-norms and edit distance", booktitle="Proc. 13th Int. Conf. on Very Large Data Bases (VLDB \'04)", url="http://www.vldb.org/conf/2004/RS21P2.PDF", bibkey="DBLP:conf/vldb/ChenN04") public class ERPDistance extends DTWDistance
Edit Distance With Real Penalty distance for numerical vectors.Reference:
L. Chen and R. Ng
On the marriage of Lp-norms and edit distance
Proc. 13th Int. Conf. on Very Large Data Bases (VLDB '04)- Since:
- 0.2
- Author:
- Thomas Bernecker
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static class
ERPDistance.Par
Parameterization class.
-
Field Summary
Fields Modifier and Type Field Description private double
g
Gap value.-
Fields inherited from class elki.distance.timeseries.AbstractEditDistance
bandSize
-
-
Constructor Summary
Constructors Constructor Description ERPDistance(double bandSize, double g)
Constructor.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected double
delta(double val1, double val2)
Compute the delta of two values.double
distance(NumberVector v1, NumberVector v2)
Computes the distance between two given vectors according to this distance function.boolean
equals(java.lang.Object obj)
protected void
firstRow(double[] buf, int band, NumberVector v1, NumberVector v2, int dim2)
Fill the first row.int
hashCode()
-
Methods inherited from class elki.distance.timeseries.AbstractEditDistance
effectiveBandSize, getInputTypeRestriction
-
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.- Specified by:
distance
in interfaceNumberVectorDistance<NumberVector>
- Specified by:
distance
in interfacePrimitiveDistance<NumberVector>
- Overrides:
distance
in classDTWDistance
- Parameters:
v1
- first vectorv2
- second vector- Returns:
- the distance between two given vectors according to this distance function
-
firstRow
protected void firstRow(double[] buf, int band, NumberVector v1, NumberVector v2, int dim2)
Description copied from class:DTWDistance
Fill the first row.- Overrides:
firstRow
in classDTWDistance
- Parameters:
buf
- Bufferband
- Bandwidthv1
- First vectorv2
- Second vectordim2
- Dimensionality of second
-
delta
protected double delta(double val1, double val2)
Description copied from class:DTWDistance
Compute the delta of two values.TODO: support Euclidean, Manhattan, others?
- Overrides:
delta
in classDTWDistance
- Parameters:
val1
- First valueval2
- Second value- Returns:
- Difference
-
equals
public boolean equals(java.lang.Object obj)
- Overrides:
equals
in classAbstractEditDistance
-
hashCode
public int hashCode()
- Overrides:
hashCode
in classAbstractEditDistance
-
-