Environment for
DeveLoping
KDD-Applications
Supported by Index-Structures

de.lmu.ifi.dbs.elki.distance.distancefunction
Class AbstractCorrelationDistanceFunction<O extends RealVector<O,?>,P extends Preprocessor<O>,D extends CorrelationDistance<D>>

java.lang.Object
  extended by de.lmu.ifi.dbs.elki.logging.AbstractLoggable
      extended by de.lmu.ifi.dbs.elki.utilities.optionhandling.AbstractParameterizable
          extended by de.lmu.ifi.dbs.elki.distance.AbstractMeasurementFunction<O,D>
              extended by de.lmu.ifi.dbs.elki.distance.distancefunction.AbstractDistanceFunction<O,D>
                  extended by de.lmu.ifi.dbs.elki.distance.distancefunction.AbstractPreprocessorBasedDistanceFunction<O,P,D>
                      extended by de.lmu.ifi.dbs.elki.distance.distancefunction.AbstractCorrelationDistanceFunction<O,P,D>
All Implemented Interfaces:
DistanceFunction<O,D>, MeasurementFunction<O,D>, Loggable, Parameterizable
Direct Known Subclasses:
PCABasedCorrelationDistanceFunction, PreferenceVectorBasedCorrelationDistanceFunction

public abstract class AbstractCorrelationDistanceFunction<O extends RealVector<O,?>,P extends Preprocessor<O>,D extends CorrelationDistance<D>>
extends AbstractPreprocessorBasedDistanceFunction<O,P,D>

Abstract super class for correlation based distance functions. Provides the Correlation distance for real valued vectors. All subclasses must implement a method to process the preprocessing step in terms of doing the PCA for each object of the database.

Author:
Elke Achtert

Field Summary
static Pattern SEPARATOR
          Indicates a separator.
 
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
 
Constructor Summary
AbstractCorrelationDistanceFunction()
          Provides a CorrelationDistanceFunction with a pattern defined to accept Strings that define an Integer followed by a separator followed by a Double.
 
Method Summary
(package private) abstract  D correlationDistance(O dv1, O dv2)
          Computes the correlation distance between the two specified vectors.
 String description()
          Returns a description of the class and the required parameters.
 D distance(O rv1, O rv2)
          Provides the Correlation distance between the given two vectors.
(package private) abstract  AssociationID getAssociationID()
          Returns the assocoiation ID for the association to be set by the preprocessor.
(package private) abstract  String getDefaultPreprocessorClassName()
          Returns the name of the default preprocessor.
(package private) abstract  String getPreprocessorClassDescription()
          Returns the description for parameter preprocessor.
(package private) abstract  Class<? extends Preprocessor> getPreprocessorSuperClassName()
          Returns the super class for the preprocessor.
 
Methods inherited from class de.lmu.ifi.dbs.elki.distance.distancefunction.AbstractPreprocessorBasedDistanceFunction
getAttributeSettings, getPreprocessor, setDatabase, setParameters
 
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, setRequiredInputPattern
 
Methods inherited from class de.lmu.ifi.dbs.elki.utilities.optionhandling.AbstractParameterizable
addOption, checkGlobalParameterConstraints, deleteOption, description, description, getParameters, getParameterValue, getPossibleOptions, inlineDescription, isSet, setParameters
 
Methods inherited from class de.lmu.ifi.dbs.elki.logging.AbstractLoggable
debugFine, debugFiner, debugFinest, exception, message, progress, progress, progress, verbose, 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
infiniteDistance, nullDistance, requiredInputPattern, undefinedDistance, valueOf
 
Methods inherited from interface de.lmu.ifi.dbs.elki.utilities.optionhandling.Parameterizable
checkGlobalParameterConstraints, getParameters, getPossibleOptions, inlineDescription
 

Field Detail

SEPARATOR

public static final Pattern SEPARATOR
Indicates a separator.

Constructor Detail

AbstractCorrelationDistanceFunction

public AbstractCorrelationDistanceFunction()
Provides a CorrelationDistanceFunction with a pattern defined to accept Strings that define an Integer followed by a separator followed by a Double.

Method Detail

distance

public D distance(O rv1,
                  O rv2)
Provides the Correlation distance between the given two vectors.

Parameters:
rv1 - first DatabaseObject
rv2 - second DatabaseObject
Returns:
the Correlation distance between the given two vectors as an instance of CorrelationDistance.
See Also:
DistanceFunction.distance(de.lmu.ifi.dbs.elki.data.DatabaseObject, de.lmu.ifi.dbs.elki.data.DatabaseObject)

description

public String description()
Returns a description of the class and the required parameters.

Specified by:
description in interface Parameterizable
Overrides:
description in class AbstractParameterizable
Returns:
String a description of the class and the required parameters
See Also:
Parameterizable.description()

correlationDistance

abstract D correlationDistance(O dv1,
                               O dv2)
Computes the correlation distance between the two specified vectors.

Parameters:
dv1 - first RealVector
dv2 - second RealVector
Returns:
the correlation distance between the two specified vectors

getDefaultPreprocessorClassName

abstract String getDefaultPreprocessorClassName()
Returns the name of the default preprocessor.

Specified by:
getDefaultPreprocessorClassName in class AbstractPreprocessorBasedDistanceFunction<O extends RealVector<O,?>,P extends Preprocessor<O>,D extends CorrelationDistance<D>>

getPreprocessorClassDescription

abstract String getPreprocessorClassDescription()
Returns the description for parameter preprocessor.

Specified by:
getPreprocessorClassDescription in class AbstractPreprocessorBasedDistanceFunction<O extends RealVector<O,?>,P extends Preprocessor<O>,D extends CorrelationDistance<D>>

getPreprocessorSuperClassName

abstract Class<? extends Preprocessor> getPreprocessorSuperClassName()
Returns the super class for the preprocessor.

Specified by:
getPreprocessorSuperClassName in class AbstractPreprocessorBasedDistanceFunction<O extends RealVector<O,?>,P extends Preprocessor<O>,D extends CorrelationDistance<D>>

getAssociationID

abstract AssociationID getAssociationID()
Returns the assocoiation ID for the association to be set by the preprocessor.

Specified by:
getAssociationID in class AbstractPreprocessorBasedDistanceFunction<O extends RealVector<O,?>,P extends Preprocessor<O>,D extends CorrelationDistance<D>>

Release 0.1 (2008-07-10_1838)