Environment for
DeveLoping
KDD-Applications
Supported by Index-Structures

de.lmu.ifi.dbs.elki.distance.distancefunction.timeseries
Class LCSSDistanceFunction<V extends NumberVector<V,?>>

java.lang.Object
  extended by de.lmu.ifi.dbs.elki.logging.AbstractLoggable
      extended by de.lmu.ifi.dbs.elki.distance.AbstractMeasurementFunction<O,D>
          extended by de.lmu.ifi.dbs.elki.distance.distancefunction.AbstractDistanceFunction<V,DoubleDistance>
              extended by de.lmu.ifi.dbs.elki.distance.distancefunction.timeseries.LCSSDistanceFunction<V>
Type Parameters:
V - the type of FeatureVector to compute the distances in between
All Implemented Interfaces:
DistanceFunction<V,DoubleDistance>, MeasurementFunction<V,DoubleDistance>, Parameterizable

@Reference(authors="M. Vlachos, M. Hadjieleftheriou, D. Gunopulos, E. Keogh",
           title="Indexing Multi-Dimensional Time-Series with Support for Multiple Distance Measures",
           booktitle="Proceedings of the ninth ACM SIGKDD international conference on Knowledge discovery and data mining",
           url="http://dx.doi.org/10.1145/956750.956777")
public class LCSSDistanceFunction<V extends NumberVector<V,?>>
extends AbstractDistanceFunction<V,DoubleDistance>

Provides the Longest Common Subsequence distance for FeatureVectors. Adapted for Java, based on Matlab Code by Michalis Vlachos. Original Copyright Notice: BEGIN COPYRIGHT NOTICE lcsMatching code -- (c) 2002 Michalis Vlachos (http://www.cs.ucr.edu/~mvlachos) This code is provided as is, with no guarantees except that bugs are almost surely present. Published reports of research using this code (or a modified version) should cite the article that describes the algorithm:

M. Vlachos, M. Hadjieleftheriou, D. Gunopulos, E. Keogh:
Indexing Multi-Dimensional Time-Series with Support for Multiple Distance Measures
In Proc. of 9th SIGKDD, Washington, DC, 2003

Comments and bug reports are welcome. Email to mvlachos@cs.ucr.edu I would also appreciate hearing about how you used this code, improvements that you have made to it. You are free to modify, extend or distribute this code, as long as this copyright notice is included whole and unchanged. END COPYRIGHT NOTICE

Author:
Thomas Bernecker

Nested Class Summary
protected static class LCSSDistanceFunction.Step
           
 
Field Summary
private  double pDelta
          Keeps the currently set pDelta.
static OptionID PDELTA_ID
          OptionID for PDELTA_PARAM
private  DoubleParameter PDELTA_PARAM
          PDELTA parameter
private  double pEpsilon
          Keeps the currently set pEpsilon.
static OptionID PEPSILON_ID
          OptionID for PEPSILON_PARAM
private  DoubleParameter PEPSILON_PARAM
          PEPSILON parameter
 
Fields inherited from class de.lmu.ifi.dbs.elki.distance.AbstractMeasurementFunction
distanceFactory
 
Fields inherited from class de.lmu.ifi.dbs.elki.logging.AbstractLoggable
debug, logger
 
Constructor Summary
LCSSDistanceFunction(Parameterization config)
          Constructor, adhering to Parameterizable
 
Method Summary
 DoubleDistance distance(V v1, V v2)
          Provides the Longest Common Subsequence distance between the given two vectors.
 
Methods inherited from class de.lmu.ifi.dbs.elki.distance.distancefunction.AbstractDistanceFunction
distance, distance
 
Methods inherited from class de.lmu.ifi.dbs.elki.distance.AbstractMeasurementFunction
getDatabase, getDistanceFactory, infiniteDistance, nullDistance, setDatabase, undefinedDistance, valueOf
 
Methods inherited from class de.lmu.ifi.dbs.elki.logging.AbstractLoggable
debugFine, debugFiner, debugFinest, exception, progress, verbose, warning
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface de.lmu.ifi.dbs.elki.distance.MeasurementFunction
getDistanceFactory, infiniteDistance, nullDistance, setDatabase, undefinedDistance, valueOf
 

Field Detail

PDELTA_ID

public static final OptionID PDELTA_ID
OptionID for PDELTA_PARAM


PEPSILON_ID

public static final OptionID PEPSILON_ID
OptionID for PEPSILON_PARAM


PDELTA_PARAM

private final DoubleParameter PDELTA_PARAM
PDELTA parameter


PEPSILON_PARAM

private final DoubleParameter PEPSILON_PARAM
PEPSILON parameter


pDelta

private double pDelta
Keeps the currently set pDelta.


pEpsilon

private double pEpsilon
Keeps the currently set pEpsilon.

Constructor Detail

LCSSDistanceFunction

public LCSSDistanceFunction(Parameterization config)
Constructor, adhering to Parameterizable

Parameters:
config - Parameterization
Method Detail

distance

public DoubleDistance distance(V v1,
                               V v2)
Provides the Longest Common Subsequence distance between the given two vectors.

Parameters:
v1 - first DatabaseObject
v2 - second DatabaseObject
Returns:
the Longest Common Subsequence distance between the given two vectors as an instance of DoubleDistance.

Release 0.3 (2010-03-31_1612)