Environment for
DeveLoping
KDD-Applications
Supported by Index-Structures

de.lmu.ifi.dbs.elki.preprocessing
Class KnnQueryBasedHiCOPreprocessor<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>
              extended by de.lmu.ifi.dbs.elki.preprocessing.KnnQueryBasedHiCOPreprocessor<V>
Type Parameters:
V - Vector type
All Implemented Interfaces:
Preprocessor<V>, Parameterizable

public class KnnQueryBasedHiCOPreprocessor<V extends RealVector<V,?>>
extends HiCOPreprocessor<V>

Computes the HiCO correlation dimension of objects of a certain database. The PCA is based on k nearest neighbor queries.

Author:
Elke Achtert

Field Summary
private  Integer k
          Holds the value of parameter k.
private  IntParameter K_PARAM
          Optional parameter to specify the number of nearest neighbors considered in the PCA, must be an integer greater than 0.
static OptionID KNN_HICO_PREPROCESSOR_K
          OptionID for K_PARAM
 
Fields inherited from class de.lmu.ifi.dbs.elki.preprocessing.HiCOPreprocessor
DEFAULT_PCA_DISTANCE_FUNCTION, PCA_DISTANCE_ID, PCA_DISTANCE_PARAM, pcaDistanceFunction
 
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
KnnQueryBasedHiCOPreprocessor()
          Provides a new Preprocessor that computes the correlation dimension of objects of a certain database based on a k nearest neighbor query.
 
Method Summary
protected  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  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.
 List<String> setParameters(List<String> args)
          Sets the value for the parameter k.
 String shortDescription()
          Returns a short description of the class.
 
Methods inherited from class de.lmu.ifi.dbs.elki.preprocessing.HiCOPreprocessor
run
 
Methods inherited from class de.lmu.ifi.dbs.elki.utilities.optionhandling.AbstractParameterizable
addOption, addParameterizable, addParameterizable, checkGlobalParameterConstraints, collectOptions, getAttributeSettings, getParameters, rememberParametersExcept, removeOption, removeParameterizable
 
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
 

Field Detail

KNN_HICO_PREPROCESSOR_K

public static final OptionID KNN_HICO_PREPROCESSOR_K
OptionID for K_PARAM


K_PARAM

private final IntParameter K_PARAM
Optional parameter to specify the number of nearest neighbors considered in the PCA, must be an integer greater than 0. If this parameter is not set, k ist set to three times of the dimensionality of the database objects.

Key: -hicopreprocessor.k

Default value: three times of the dimensionality of the database objects


k

private Integer k
Holds the value of parameter k.

Constructor Detail

KnnQueryBasedHiCOPreprocessor

public KnnQueryBasedHiCOPreprocessor()
Provides a new Preprocessor that computes the correlation dimension of objects of a certain database based on a k nearest neighbor query.

Method Detail

objectIDsForPCA

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

Specified by:
objectIDsForPCA in class HiCOPreprocessor<V extends RealVector<V,?>>
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 List<DistanceResultPair<DoubleDistance>> resultsForPCA(Integer id,
                                                                 Database<V> database,
                                                                 boolean verbose,
                                                                 boolean time)
Description copied from class: HiCOPreprocessor
Returns the ids of the objects and distances stored in the specified database to be considered within the PCA for the specified object id.

Specified by:
resultsForPCA in class HiCOPreprocessor<V extends RealVector<V,?>>
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

setParameters

public List<String> setParameters(List<String> args)
                           throws ParameterException
Sets the value for the parameter k. If k is not specified, the default value is used.

Specified by:
setParameters in interface Parameterizable
Overrides:
setParameters in class HiCOPreprocessor<V extends RealVector<V,?>>
Parameters:
args - parameters to set the attributes accordingly to
Returns:
a list containing the unused parameters
Throws:
ParameterException - in case of wrong parameter-setting

shortDescription

public String shortDescription()
Description copied from class: AbstractParameterizable
Returns a short description of the class.

Specified by:
shortDescription in interface Parameterizable
Overrides:
shortDescription in class AbstractParameterizable
Returns:
Description of the class

Release 0.2 (2009-07-06_1820)