Environment for
DeveLoping
KDD-Applications
Supported by Index-Structures

de.lmu.ifi.dbs.elki.distance.distancefunction.subspace
Class SubspaceDistanceFunction<V extends NumberVector<V,?>,P extends LocalPCAPreprocessor<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<O,D>
              extended by de.lmu.ifi.dbs.elki.distance.distancefunction.AbstractPreprocessorBasedDistanceFunction<V,P,SubspaceDistance>
                  extended by de.lmu.ifi.dbs.elki.distance.distancefunction.subspace.SubspaceDistanceFunction<V,P>
Type Parameters:
V - the type of NumberVector to compute the distances in between
P - the type of Preprocessor used
All Implemented Interfaces:
DistanceFunction<V,SubspaceDistance>, LocalPCAPreprocessorBasedDistanceFunction<V,P,SubspaceDistance>, PreprocessorBasedDistanceFunction<V,P,SubspaceDistance>, MeasurementFunction<V,SubspaceDistance>, PreprocessorBasedMeasurementFunction<V,P,SubspaceDistance>, PreprocessorClient<P,V>, Parameterizable

public class SubspaceDistanceFunction<V extends NumberVector<V,?>,P extends LocalPCAPreprocessor<V>>
extends AbstractPreprocessorBasedDistanceFunction<V,P,SubspaceDistance>
implements LocalPCAPreprocessorBasedDistanceFunction<V,P,SubspaceDistance>

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
 
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
SubspaceDistanceFunction(Parameterization config)
          Constructor, adhering to Parameterizable
 
Method Summary
 SubspaceDistance distance(V o1, V o2)
          Note, that the pca of o1 must have equal ore more strong eigenvectors than the pca of o2.
 SubspaceDistance distance(V o1, V o2, PCAFilteredResult pca1, PCAFilteredResult pca2)
          Computes the distance between two given DatabaseObjects according to this distance function.
 AssociationID<?> getAssociationID()
          Returns the association ID for the association to be set by the preprocessor.
 Class<?> getDefaultPreprocessorClass()
          Returns the name of the default preprocessor.
 String getPreprocessorDescription()
          Returns the description for the preprocessor parameter.
 Class<P> getPreprocessorSuperClass()
          Returns the super class for the preprocessor parameter.
 
Methods inherited from class de.lmu.ifi.dbs.elki.distance.distancefunction.AbstractPreprocessorBasedDistanceFunction
getPreprocessor, setDatabase
 
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, 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.distancefunction.DistanceFunction
distance, distance
 
Methods inherited from interface de.lmu.ifi.dbs.elki.distance.MeasurementFunction
getDistanceFactory, infiniteDistance, nullDistance, setDatabase, undefinedDistance, valueOf
 

Constructor Detail

SubspaceDistanceFunction

public SubspaceDistanceFunction(Parameterization config)
Constructor, adhering to Parameterizable

Parameters:
config - Parameterization
Method Detail

getDefaultPreprocessorClass

public Class<?> getDefaultPreprocessorClass()
Description copied from interface: PreprocessorClient
Returns the name of the default preprocessor.

Specified by:
getDefaultPreprocessorClass in interface PreprocessorClient<P extends LocalPCAPreprocessor<V>,V extends NumberVector<V,?>>
Returns:
the name of the default preprocessor, which is KnnQueryBasedLocalPCAPreprocessor

getPreprocessorDescription

public final String getPreprocessorDescription()
Description copied from interface: PreprocessorClient
Returns the description for the preprocessor parameter.

Specified by:
getPreprocessorDescription in interface PreprocessorClient<P extends LocalPCAPreprocessor<V>,V extends NumberVector<V,?>>
Returns:
the description for the preprocessor parameter

getPreprocessorSuperClass

public Class<P> getPreprocessorSuperClass()
Description copied from interface: PreprocessorClient
Returns the super class for the preprocessor parameter.

Specified by:
getPreprocessorSuperClass in interface PreprocessorClient<P extends LocalPCAPreprocessor<V>,V extends NumberVector<V,?>>
Returns:
the super class for the preprocessor, which is Preprocessor

getAssociationID

public AssociationID<?> getAssociationID()
Description copied from interface: PreprocessorClient
Returns the association ID for the association to be set by the preprocessor.

Specified by:
getAssociationID in interface PreprocessorClient<P extends LocalPCAPreprocessor<V>,V extends NumberVector<V,?>>
Returns:
the association ID for the association to be set by the preprocessor, which is AssociationID.LOCAL_PCA

distance

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

Specified by:
distance in interface DistanceFunction<V extends NumberVector<V,?>,SubspaceDistance>
Parameters:
o1 - first DatabaseObject
o2 - second DatabaseObject
Returns:
the distance between two given DatabaseObjects according to this distance function

distance

public SubspaceDistance distance(V o1,
                                 V o2,
                                 PCAFilteredResult pca1,
                                 PCAFilteredResult 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.3 (2010-03-31_1612)