Environment for
DeveLoping
KDD-Applications
Supported by Index-Structures

de.lmu.ifi.dbs.elki.distance.distancefunction.correlation
Class ERiCDistanceFunction<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,BitDistance>
                  extended by de.lmu.ifi.dbs.elki.distance.distancefunction.correlation.ERiCDistanceFunction<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,BitDistance>, LocalPCAPreprocessorBasedDistanceFunction<V,P,BitDistance>, PreprocessorBasedDistanceFunction<V,P,BitDistance>, MeasurementFunction<V,BitDistance>, PreprocessorBasedMeasurementFunction<V,P,BitDistance>, PreprocessorClient<P,V>, Parameterizable

public class ERiCDistanceFunction<V extends NumberVector<V,?>,P extends LocalPCAPreprocessor<V>>
extends AbstractPreprocessorBasedDistanceFunction<V,P,BitDistance>
implements LocalPCAPreprocessorBasedDistanceFunction<V,P,BitDistance>

Provides a distance function for building the hierarchy in the ERiC algorithm.

Author:
Elke Achtert

Field Summary
private  double delta
          Holds the value of DELTA_PARAM.
static OptionID DELTA_ID
          OptionID for DELTA_PARAM
private  DoubleParameter DELTA_PARAM
          Parameter to specify the threshold for approximate linear dependency: the strong eigenvectors of q are approximately linear dependent from the strong eigenvectors p if the following condition holds for all stroneg eigenvectors q_i of q (lambda_q < lambda_p): q_i' * M^check_p * q_i <= delta^2, must be a double equal to or greater than 0.
private  double tau
          Holds the value of TAU_PARAM.
static OptionID TAU_ID
          OptionID for TAU_PARAM
private  DoubleParameter TAU_PARAM
          Parameter to specify the threshold for the maximum distance between two approximately linear dependent subspaces of two objects p and q (lambda_q < lambda_p) before considering them as parallel, must be a double equal to or greater than 0.
 
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
ERiCDistanceFunction(Parameterization config)
          Constructor, adhering to Parameterizable
 
Method Summary
private  boolean approximatelyLinearDependent(PCAFilteredResult pca1, PCAFilteredResult pca2)
          Returns true, if the strong eigenvectors of the two specified pcas span up the same space.
 BitDistance distance(V v1, V v2)
          Note, that the pca of o1 must have equal ore more strong eigenvectors than the pca of o2.
 BitDistance distance(V v1, V v2, 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
 

Field Detail

DELTA_ID

public static final OptionID DELTA_ID
OptionID for DELTA_PARAM


DELTA_PARAM

private final DoubleParameter DELTA_PARAM
Parameter to specify the threshold for approximate linear dependency: the strong eigenvectors of q are approximately linear dependent from the strong eigenvectors p if the following condition holds for all stroneg eigenvectors q_i of q (lambda_q < lambda_p): q_i' * M^check_p * q_i <= delta^2, must be a double equal to or greater than 0.

Default value: 0.1

Key: -ericdf.delta


TAU_ID

public static final OptionID TAU_ID
OptionID for TAU_PARAM


TAU_PARAM

private final DoubleParameter TAU_PARAM
Parameter to specify the threshold for the maximum distance between two approximately linear dependent subspaces of two objects p and q (lambda_q < lambda_p) before considering them as parallel, must be a double equal to or greater than 0.

Default value: 0.1

Key: -ericdf.tau


delta

private double delta
Holds the value of DELTA_PARAM.


tau

private double tau
Holds the value of TAU_PARAM.

Constructor Detail

ERiCDistanceFunction

public ERiCDistanceFunction(Parameterization config)
Constructor, adhering to Parameterizable

Parameters:
config - Parameterization
Method Detail

getDefaultPreprocessorClass

public Class<?> getDefaultPreprocessorClass()
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 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 parameter, 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 BitDistance distance(V v1,
                            V v2)
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,?>,BitDistance>
Parameters:
v1 - first DatabaseObject
v2 - second DatabaseObject
Returns:
the distance between two given DatabaseObjects according to this distance function

distance

public BitDistance distance(V v1,
                            V v2,
                            PCAFilteredResult pca1,
                            PCAFilteredResult pca2)
Computes the distance between two given DatabaseObjects according to this distance function. Note, that the first pca must have equal or more strong eigenvectors than the second pca.

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

approximatelyLinearDependent

private boolean approximatelyLinearDependent(PCAFilteredResult pca1,
                                             PCAFilteredResult pca2)
Returns true, if the strong eigenvectors of the two specified pcas span up the same space. Note, that the first pca must have equal ore more strong eigenvectors than the second pca.

Parameters:
pca1 - first PCA
pca2 - second PCA
Returns:
true, if the strong eigenvectors of the two specified pcas span up the same space

Release 0.3 (2010-03-31_1612)