|
|
|||||||||||||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES All Classes | |||||||||||||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectde.lmu.ifi.dbs.elki.logging.AbstractLoggable
de.lmu.ifi.dbs.elki.utilities.optionhandling.AbstractParameterizable
de.lmu.ifi.dbs.elki.distance.AbstractMeasurementFunction<O,D>
de.lmu.ifi.dbs.elki.distance.distancefunction.AbstractDistanceFunction<O,DoubleDistance>
de.lmu.ifi.dbs.elki.distance.distancefunction.AbstractDoubleDistanceFunction<V>
de.lmu.ifi.dbs.elki.distance.distancefunction.timeseries.LCSSDistanceFunction<V>
V
- the type of NumberVector to compute the distances in betweenpublic class LCSSDistanceFunction<V extends NumberVector<V,?>>
Provides the Longest Common Subsequence distance for NumberVectors. 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
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 |
---|
INFINITY_PATTERN |
Fields inherited from class de.lmu.ifi.dbs.elki.utilities.optionhandling.AbstractParameterizable |
---|
optionHandler |
Fields inherited from class de.lmu.ifi.dbs.elki.logging.AbstractLoggable |
---|
debug, logger |
Constructor Summary | |
---|---|
LCSSDistanceFunction()
Provides a Longest Common Subsequence distance function that can compute the Dynamic Time Warping distance (that is a DoubleDistance) for NumberVectors. |
Method Summary | |
---|---|
DoubleDistance |
distance(V v1,
V v2)
Provides the Longest Common Subsequence distance between the given two vectors. |
List<String> |
setParameters(List<String> args)
Grabs all specified options from the option handler. |
String |
shortDescription()
Returns the required input pattern. |
Methods inherited from class de.lmu.ifi.dbs.elki.distance.distancefunction.AbstractDoubleDistanceFunction |
---|
infiniteDistance, nullDistance, undefinedDistance, valueOf |
Methods inherited from class de.lmu.ifi.dbs.elki.distance.distancefunction.AbstractDistanceFunction |
---|
distance, distance, isInfiniteDistance, isNullDistance, isUndefinedDistance |
Methods inherited from class de.lmu.ifi.dbs.elki.distance.AbstractMeasurementFunction |
---|
getDatabase, matches, requiredInputPattern, setDatabase, setRequiredInputPattern |
Methods inherited from class de.lmu.ifi.dbs.elki.utilities.optionhandling.AbstractParameterizable |
---|
addOption, addParameterizable, addParameterizable, checkGlobalParameterConstraints, collectOptions, getAttributeSettings, getParameters, rememberParametersExcept, removeOption, removeParameterizable |
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 |
---|
requiredInputPattern, setDatabase |
Methods inherited from interface de.lmu.ifi.dbs.elki.utilities.optionhandling.Parameterizable |
---|
checkGlobalParameterConstraints, collectOptions, getParameters |
Field Detail |
---|
public static final OptionID PDELTA_ID
PDELTA_PARAM
public static final OptionID PEPSILON_ID
PEPSILON_PARAM
private final DoubleParameter PDELTA_PARAM
private final DoubleParameter PEPSILON_PARAM
private double pDelta
private double pEpsilon
Constructor Detail |
---|
public LCSSDistanceFunction()
Method Detail |
---|
public DoubleDistance distance(V v1, V v2)
v1
- first DatabaseObjectv2
- second DatabaseObject
DoubleDistance
.public String shortDescription()
AbstractMeasurementFunction
shortDescription
in interface Parameterizable
shortDescription
in class AbstractMeasurementFunction<V extends NumberVector<V,?>,DoubleDistance>
public List<String> setParameters(List<String> args) throws ParameterException
AbstractParameterizable
{ ListremainingParameters = super.setParameters(args); // set parameters for your class // for example like this: if(isSet(MY_PARAM_VALUE_PARAM)) { myParamValue = getParameterValue(MY_PARAM_VALUE_PARAM); } . . . return remainingParameters; // or in case of attributes requesting parameters themselves // return parameterizableAttribbute.setParameters(remainingParameters); }
setParameters
in interface Parameterizable
setParameters
in class AbstractParameterizable
args
- parameters to set the attributes accordingly to
ParameterException
- in case of wrong parameter-setting
|
|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES All Classes | |||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |