Environment for
DeveLoping
KDD-Applications
Supported by Index-Structures

de.lmu.ifi.dbs.elki.preprocessing
Class LocalPCAPreprocessor<V extends NumberVector<V,?>>

java.lang.Object
  extended by de.lmu.ifi.dbs.elki.logging.AbstractLoggable
      extended by de.lmu.ifi.dbs.elki.preprocessing.LocalPCAPreprocessor<V>
Type Parameters:
V - the type of NumberVector handled by this Preprocessor
All Implemented Interfaces:
Preprocessor<V>
Direct Known Subclasses:
KnnQueryBasedLocalPCAPreprocessor, RangeQueryBasedLocalPCAPreprocessor

@Title(value="Local PCA Preprocessor")
@Description(value="Materializes the local PCA and the locally weighted matrix of objects of a database.")
public abstract class LocalPCAPreprocessor<V extends NumberVector<V,?>>
extends AbstractLoggable
implements Preprocessor<V>

Abstract superclass for preprocessors performing for each object of a certain database a filtered PCA based on the local neighborhood of the object. The result of the PCA is assigned to the database with association id AssociationID.LOCAL_PCA. Additionally, a copy of the PCAs similarity matrix is assigned with association id AssociationID.LOCALLY_WEIGHTED_MATRIX.

Author:
Elke Achtert

Field Summary
static Class<?> DEFAULT_PCA_DISTANCE_FUNCTION
          The default distance function for the PCA.
private  PCAFilteredRunner<V,DoubleDistance> pca
          PCA utility object.
static OptionID PCA_DISTANCE_ID
          OptionID for PCA_DISTANCE_PARAM
protected  ObjectParameter<DistanceFunction<V,DoubleDistance>> PCA_DISTANCE_PARAM
          Parameter to specify the distance function used for running PCA.
protected  DistanceFunction<V,DoubleDistance> pcaDistanceFunction
          Holds the instance of the distance function specified by PCA_DISTANCE_PARAM.
 
Fields inherited from class de.lmu.ifi.dbs.elki.logging.AbstractLoggable
debug, logger
 
Constructor Summary
LocalPCAPreprocessor(Parameterization config)
          Constructor, adhering to Parameterizable
 
Method Summary
protected abstract  List<DistanceResultPair<DoubleDistance>> objectsForPCA(Integer id, Database<V> database)
          Returns the objects to be considered within the PCA for the specified query object.
 void run(Database<V> database, boolean verbose, boolean time)
          Performs for each object of the specified database a filtered PCA based on the local neighborhood of the object.
 
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
 

Field Detail

DEFAULT_PCA_DISTANCE_FUNCTION

public static final Class<?> DEFAULT_PCA_DISTANCE_FUNCTION
The default distance function for the PCA.


PCA_DISTANCE_ID

public static final OptionID PCA_DISTANCE_ID
OptionID for PCA_DISTANCE_PARAM


PCA_DISTANCE_PARAM

protected final ObjectParameter<DistanceFunction<V extends NumberVector<V,?>,DoubleDistance>> PCA_DISTANCE_PARAM
Parameter to specify the distance function used for running PCA. Key: -localpca.distancefunction


pcaDistanceFunction

protected DistanceFunction<V extends NumberVector<V,?>,DoubleDistance> pcaDistanceFunction
Holds the instance of the distance function specified by PCA_DISTANCE_PARAM.


pca

private PCAFilteredRunner<V extends NumberVector<V,?>,DoubleDistance> pca
PCA utility object.

Constructor Detail

LocalPCAPreprocessor

public LocalPCAPreprocessor(Parameterization config)
Constructor, adhering to Parameterizable

Parameters:
config - Parameterization
Method Detail

run

public void run(Database<V> database,
                boolean verbose,
                boolean time)
Performs for each object of the specified database a filtered PCA based on the local neighborhood of the object. The result of the PCA is assigned to the database with association id AssociationID.LOCAL_PCA. Additionally, a copy of the PCAs similarity matrix is assigned with association id AssociationID.LOCALLY_WEIGHTED_MATRIX.

Specified by:
run in interface Preprocessor<V extends NumberVector<V,?>>
Parameters:
database - the database for which the preprocessing is performed
verbose - flag to allow verbose messages while performing the algorithm
time - flag to request output of performance time

objectsForPCA

protected abstract List<DistanceResultPair<DoubleDistance>> objectsForPCA(Integer id,
                                                                          Database<V> database)
Returns the objects to be considered within the PCA for the specified query object.

Parameters:
id - the id of the query object for which a PCA should be performed
database - the database holding the objects
Returns:
the list of the objects (i.e. the ids and the distances to the query object) to be considered within the PCA

Release 0.3 (2010-03-31_1612)