Environment for
DeveLoping
KDD-Applications
Supported by Index-Structures

de.lmu.ifi.dbs.elki.preprocessing
Class ProjectedDBSCANPreprocessor<D extends Distance<D>,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.ProjectedDBSCANPreprocessor<D,V>
Type Parameters:
D - Distance type
V - Vector type
All Implemented Interfaces:
Preprocessor<V>, Parameterizable
Direct Known Subclasses:
FourCPreprocessor, PreDeConPreprocessor

public abstract class ProjectedDBSCANPreprocessor<D extends Distance<D>,V extends RealVector<V,?>>
extends AbstractParameterizable
implements Preprocessor<V>

Abstract superclass for preprocessor of algorithms extending the ProjectedDBSCAN algorithm.

Author:
Arthur Zimek

Field Summary
static String DEFAULT_DISTANCE_FUNCTION
          The default range query distance function.
static OptionID DISTANCE_FUNCTION_ID
          OptionID for DISTANCE_FUNCTION_PARAM
private  ClassParameter<DistanceFunction<V,D>> DISTANCE_FUNCTION_PARAM
          Parameter distance function
private  String epsilon
          Contains the value of parameter epsilon;
static PatternParameter EPSILON_PARAM
          Parameter to specify the maximum radius of the neighborhood to be considered, must be suitable to LocallyWeightedDistanceFunction.
private  int minpts
          Holds the value of parameter minpts.
private  IntParameter MINPTS_PARAM
          Parameter to specify the threshold for minimum number of points in the epsilon-neighborhood of a point, must be an integer greater than 0.
protected  DistanceFunction<V,D> rangeQueryDistanceFunction
          The distance function for the variance analysis.
 
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
protected ProjectedDBSCANPreprocessor()
          Provides a new Preprocessor that computes the correlation dimension of objects of a certain database.
 
Method Summary
 void run(Database<V> database, boolean verbose, boolean time)
          This method executes the actual preprocessing step of this Preprocessor for the objects of the specified database.
protected abstract  void runVarianceAnalysis(Integer id, List<DistanceResultPair<D>> neighbors, Database<V> database)
          This method implements the type of variance analysis to be computed for a given point.
 List<String> setParameters(List<String> args)
          Grabs all specified options from the option handler.
 
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

EPSILON_PARAM

public static final PatternParameter EPSILON_PARAM
Parameter to specify the maximum radius of the neighborhood to be considered, must be suitable to LocallyWeightedDistanceFunction.

Key: -epsilon


MINPTS_PARAM

private final IntParameter MINPTS_PARAM
Parameter to specify the threshold for minimum number of points in the epsilon-neighborhood of a point, must be an integer greater than 0.

Key: -projdbscan.minpts


DEFAULT_DISTANCE_FUNCTION

public static final String DEFAULT_DISTANCE_FUNCTION
The default range query distance function.


DISTANCE_FUNCTION_ID

public static final OptionID DISTANCE_FUNCTION_ID
OptionID for DISTANCE_FUNCTION_PARAM


DISTANCE_FUNCTION_PARAM

private final ClassParameter<DistanceFunction<V extends RealVector<V,?>,D extends Distance<D>>> DISTANCE_FUNCTION_PARAM
Parameter distance function


epsilon

private String epsilon
Contains the value of parameter epsilon;


rangeQueryDistanceFunction

protected DistanceFunction<V extends RealVector<V,?>,D extends Distance<D>> rangeQueryDistanceFunction
The distance function for the variance analysis.


minpts

private int minpts
Holds the value of parameter minpts.

Constructor Detail

ProjectedDBSCANPreprocessor

protected ProjectedDBSCANPreprocessor()
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)
Description copied from interface: Preprocessor
This method executes the actual preprocessing step of this Preprocessor for the objects of the specified 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

runVarianceAnalysis

protected abstract void runVarianceAnalysis(Integer id,
                                            List<DistanceResultPair<D>> neighbors,
                                            Database<V> database)
This method implements the type of variance analysis to be computed for a given point.

Example1: for 4C, this method should implement a PCA for the given point. Example2: for PreDeCon, this method should implement a simple axis-parallel variance analysis.

Parameters:
id - the given point
neighbors - the neighbors as query results of the given point
database - the database for which the preprocessing is performed

setParameters

public List<String> setParameters(List<String> args)
                           throws ParameterException
Description copied from class: AbstractParameterizable
Grabs all specified options from the option handler. Any extending class should call this method first and return the returned array without further changes, but after setting further required parameters. An example for overwriting this method taking advantage from the previously (in superclasses) defined options would be:

 {
   List remainingParameters = super.setParameters(args);
   // set parameters for your class
   // for example like this:
   if(isSet(MY_PARAM_VALUE_PARAM))
   {
      myParamValue = getParameterValue(MY_PARAM_VALUE_PARAM);
   }
   .
   .
   .
   return remainingParameters;
   // or in case of attributes requesting parameters themselves
   // return parameterizableAttribbute.setParameters(remainingParameters);
 }
 

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

Release 0.2.1 (2009-07-13_1605)