Environment for
DeveLoping
KDD-Applications
Supported by Index-Structures

de.lmu.ifi.dbs.elki.preprocessing
Class HiCOPreprocessor<V extends RealVector<V,?>>

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.preprocessing.HiCOPreprocessor<V>
Type Parameters:
V - Vector type
All Implemented Interfaces:
Preprocessor<V>, Parameterizable
Direct Known Subclasses:
KnnQueryBasedHiCOPreprocessor, RangeQueryBasedHiCOPreprocessor

public abstract class HiCOPreprocessor<V extends RealVector<V,?>>
extends AbstractParameterizable
implements Preprocessor<V>

Abstract superclass for preprocessors for HiCO correlation dimension assignment to objects of a certain database.

Author:
Elke Achtert

Field Summary
static String 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  ClassParameter<DistanceFunction<V,DoubleDistance>> PCA_DISTANCE_PARAM
          Parameter to specify the distance function used for running PCA.
protected  DistanceFunction<V,DoubleDistance> pcaDistanceFunction
          The distance function for the PCA.
 
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, logger
 
Constructor Summary
HiCOPreprocessor()
          Provides a new Preprocessor that computes the correlation dimension of objects of a certain database.
 
Method Summary
protected abstract  List<Integer> objectIDsForPCA(Integer id, Database<V> database, boolean verbose, boolean time)
          Returns the ids of the objects stored in the specified database to be considered within the PCA for the specified object id.
protected abstract  List<DistanceResultPair<DoubleDistance>> resultsForPCA(Integer id, Database<V> database, boolean verbose, boolean time)
          Returns the ids of the objects and distances stored in the specified database to be considered within the PCA for the specified object id.
 void run(Database<V> database, boolean verbose, boolean time)
          This method determines the correlation dimensions of the objects stored in the specified database and sets the necessary associations in the database.
 List<String> setParameters(List<String> args)
          Sets the values for the parameters alpha, pca and pcaDistancefunction if specified.
 
Methods inherited from class de.lmu.ifi.dbs.elki.utilities.optionhandling.AbstractParameterizable
addOption, addParameterizable, addParameterizable, checkGlobalParameterConstraints, collectOptions, getAttributeSettings, getParameters, rememberParametersExcept, removeOption, removeParameterizable, shortDescription
 
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.utilities.optionhandling.Parameterizable
checkGlobalParameterConstraints, collectOptions, getParameters, shortDescription
 

Field Detail

DEFAULT_PCA_DISTANCE_FUNCTION

public static final String 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 ClassParameter<DistanceFunction<V extends RealVector<V,?>,DoubleDistance>> PCA_DISTANCE_PARAM
Parameter to specify the distance function used for running PCA. Key: -hico.pca.distance


pcaDistanceFunction

protected DistanceFunction<V extends RealVector<V,?>,DoubleDistance> pcaDistanceFunction
The distance function for the PCA.


pca

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

Constructor Detail

HiCOPreprocessor

public HiCOPreprocessor()
Provides a new Preprocessor that computes the correlation dimension of objects of a certain database.

Method Detail

run

public void run(Database<V> database,
                boolean verbose,
                boolean time)
This method determines the correlation dimensions of the objects stored in the specified database and sets the necessary associations in the database.

Specified by:
run in interface Preprocessor<V extends RealVector<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

setParameters

public List<String> setParameters(List<String> args)
                           throws ParameterException
Sets the values for the parameters alpha, pca and pcaDistancefunction if specified. If the parameters are not specified default values are set.

Specified by:
setParameters in interface Parameterizable
Overrides:
setParameters in class AbstractParameterizable
Parameters:
args - parameters to set the attributes accordingly to
Returns:
a list containing the unused parameters
Throws:
ParameterException - in case of wrong parameter-setting

objectIDsForPCA

protected abstract List<Integer> objectIDsForPCA(Integer id,
                                                 Database<V> database,
                                                 boolean verbose,
                                                 boolean time)
Returns the ids of the objects stored in the specified database to be considered within the PCA for the specified object id.

Parameters:
id - the id of the object for which a PCA should be performed
database - the database holding the objects
verbose - flag to allow verbose messages while performing the algorithm
time - flag to request output of performance time
Returns:
the list of the object ids to be considered within the PCA

resultsForPCA

protected abstract List<DistanceResultPair<DoubleDistance>> resultsForPCA(Integer id,
                                                                          Database<V> database,
                                                                          boolean verbose,
                                                                          boolean time)
Returns the ids of the objects and distances stored in the specified database to be considered within the PCA for the specified object id.

Parameters:
id - the id of the object for which a PCA should be performed
database - the database holding the objects
verbose - flag to allow verbose messages while performing the algorithm
time - flag to request output of performance time
Returns:
the list of the object ids to be considered within the PCA

Release 0.2.1 (2009-07-13_1605)