Environment for
DeveLoping
KDD-Applications
Supported by Index-Structures

de.lmu.ifi.dbs.elki.distance.distancefunction
Class SubspaceDistanceFunction<O extends RealVector<O,?>,P extends Preprocessor<O>,D extends SubspaceDistance<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.SubspaceDistanceFunction<O,P,D>
All Implemented Interfaces:
DistanceFunction<O,D>, MeasurementFunction<O,D>, Loggable, Parameterizable

public class SubspaceDistanceFunction<O extends RealVector<O,?>,P extends Preprocessor<O>,D extends SubspaceDistance<D>>
extends AbstractPreprocessorBasedDistanceFunction<O,P,D>

Provides a distance function to determine a kind of correlation distance between two points, which is a pair consisting of the distance between the two subspaces spanned by the strong eigenvectors of the two points and the affine distance between the two subspaces.

Author:
Elke Achtert

Field Summary
static AssociationID ASSOCIATION_ID
          The Assocoiation ID for the association to be set by the preprocessor.
static String DEFAULT_PREPROCESSOR_CLASS
          The default preprocessor class name.
static String PREPROCESSOR_CLASS_D
          Description for parameter preprocessor.
static Class<Preprocessor> PREPROCESSOR_SUPER_CLASS
          The super class for the preprocessor.
 
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
SubspaceDistanceFunction()
          Provides a distance function to determine distances between subspaces of equal dimensionality.
 
Method Summary
 D distance(O o1, O o2)
          Note, that the pca of o1 must have equal ore more strong eigenvectors than the pca of o2.
 D distance(O o1, O o2, LocalPCA<O> pca1, LocalPCA<O> pca2)
          Computes the distance between two given DatabaseObjects according to this distance function.
(package private)  AssociationID getAssociationID()
          Returns the assocoiation ID for the association to be set by the preprocessor.
(package private)  String getDefaultPreprocessorClassName()
          Returns the name of the default preprocessor.
(package private)  String getPreprocessorClassDescription()
          Returns the description for parameter preprocessor.
(package private)  Class<Preprocessor> getPreprocessorSuperClassName()
          Returns the super class for the preprocessor.
 D infiniteDistance()
          Provides an infinite distance.
 D nullDistance()
          Provides a null distance.
 D undefinedDistance()
          Provides an undefined distance.
 D valueOf(String pattern)
          Provides a measurement suitable to this measurement function based on the given pattern.
 
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, 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
requiredInputPattern
 
Methods inherited from interface de.lmu.ifi.dbs.elki.utilities.optionhandling.Parameterizable
checkGlobalParameterConstraints, description, getParameters, getPossibleOptions, inlineDescription
 

Field Detail

ASSOCIATION_ID

public static final AssociationID ASSOCIATION_ID
The Assocoiation ID for the association to be set by the preprocessor.


PREPROCESSOR_SUPER_CLASS

public static final Class<Preprocessor> PREPROCESSOR_SUPER_CLASS
The super class for the preprocessor.


DEFAULT_PREPROCESSOR_CLASS

public static final String DEFAULT_PREPROCESSOR_CLASS
The default preprocessor class name.


PREPROCESSOR_CLASS_D

public static final String PREPROCESSOR_CLASS_D
Description for parameter preprocessor.

Constructor Detail

SubspaceDistanceFunction

public SubspaceDistanceFunction()
Provides a distance function to determine distances between subspaces of equal dimensionality.

Method Detail

getDefaultPreprocessorClassName

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 SubspaceDistance<D>>

getPreprocessorClassDescription

String getPreprocessorClassDescription()
Returns the description for parameter preprocessor.

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

getPreprocessorSuperClassName

Class<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 SubspaceDistance<D>>

getAssociationID

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 SubspaceDistance<D>>

valueOf

public D valueOf(String pattern)
                                      throws IllegalArgumentException
Description copied from interface: MeasurementFunction
Provides a measurement suitable to this measurement function based on the given pattern.

Parameters:
pattern - a pattern defining a similarity suitable to this measurement function
Returns:
a measurement suitable to this measurement function based on the given pattern
Throws:
IllegalArgumentException - if the given pattern is not compatible with the requirements of this measurement function
See Also:
MeasurementFunction.valueOf(String)

infiniteDistance

public D infiniteDistance()
Description copied from interface: MeasurementFunction
Provides an infinite distance.

Returns:
an infinite distance
See Also:
MeasurementFunction.infiniteDistance()

nullDistance

public D nullDistance()
Description copied from interface: MeasurementFunction
Provides a null distance.

Returns:
a null distance
See Also:
MeasurementFunction.nullDistance()

undefinedDistance

public D undefinedDistance()
Description copied from interface: MeasurementFunction
Provides an undefined distance.

Returns:
an undefined distance
See Also:
MeasurementFunction.undefinedDistance()

distance

public D distance(O o1,
                  O o2)
Note, that the pca of o1 must have equal ore more strong eigenvectors than the pca of o2.

Parameters:
o1 - first DatabaseObject
o2 - second DatabaseObject
Returns:
the distance between two given DatabaseObjects according to this distance function
See Also:
DistanceFunction.distance(de.lmu.ifi.dbs.elki.data.DatabaseObject,de.lmu.ifi.dbs.elki.data.DatabaseObject)

distance

public D distance(O o1,
                  O o2,
                  LocalPCA<O> pca1,
                  LocalPCA<O> pca2)
Computes the distance between two given DatabaseObjects according to this distance function. Note, that the first pca must have an equal number of strong eigenvectors than the second pca.

Parameters:
o1 - first DatabaseObject
o2 - second DatabaseObject
pca1 - first PCA
pca2 - second PCA
Returns:
the distance between two given DatabaseObjects according to this distance function

Release 0.1 (2008-07-10_1838)