Environment for
DeveLoping
KDD-Applications
Supported by Index-Structures

de.lmu.ifi.dbs.elki.algorithm.clustering
Class ProjectedDBSCAN<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.algorithm.AbstractAlgorithm<V>
              extended by de.lmu.ifi.dbs.elki.algorithm.clustering.ProjectedDBSCAN<V>
Type Parameters:
V - the type of Realvector handled by this Algorithm
All Implemented Interfaces:
Algorithm<V>, Clustering<V>, Loggable, Parameterizable
Direct Known Subclasses:
FourC, PreDeCon

public abstract class ProjectedDBSCAN<V extends RealVector<V,?>>
extends AbstractAlgorithm<V>
implements Clustering<V>

Provides an abstract algorithm requiring a VarianceAnalysisPreprocessor.

Author:
Arthur Zimek

Field Summary
static OptionID DBSCAN_EPSILON_ID
          OptionID for EPSILON_PARAM
protected  ClassParameter<AbstractLocallyWeightedDistanceFunction> DISTANCE_FUNCTION_PARAM
          Parameter to specify the distance function to determine the distance between database objects, must extend AbstractLocallyWeightedDistanceFunction.
private  AbstractLocallyWeightedDistanceFunction<V,?> distanceFunction
          The distance function.
static OptionID DISTANCEFUNCTION_ID
          OptionID for DISTANCE_FUNCTION_PARAM
protected  String epsilon
          Epsilon.
private  PatternParameter EPSILON_PARAM
          Parameter to specify the maximum radius of the neighborhood to be considered, must be suitable to LocallyWeightedDistanceFunction.
private  int lambda
          Keeps lambda.
static OptionID LAMBDA_ID
          OptionID for LAMBDA_PARAM
private  IntParameter LAMBDA_PARAM
          Parameter to specify the intrinsic dimensionality of the clusters to find, must be an integer greater than 0.
protected  int minpts
          Minimum points.
static OptionID MINPTS_ID
          OptionID for MINPTS_PARAM
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.
private  Set<Integer> noise
          Holds a set of noise.
private  Set<Integer> processedIDs
          Holds a set of processed ids.
private  ClustersPlusNoise<V> result
          Provides the result of the algorithm.
private  List<List<Integer>> resultList
          Holds a list of clusters found.
 
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
 
Constructor Summary
protected ProjectedDBSCAN()
          Provides the abstract algorithm for variance analysis based DBSCAN.
 
Method Summary
protected  void expandCluster(Database<V> database, Integer startObjectID, Progress progress)
          ExpandCluster function of DBSCAN.
 List<AttributeSettings> getAttributeSettings()
          Returns the settings of all options assigned to the option handler.
 ClustersPlusNoise<V> getResult()
          Returns the result of the algorithm.
abstract  Class<?> preprocessorClass()
          Returns the class actually used as VarianceAnalysisPreprocessor.
protected  void runInTime(Database<V> database)
          The run method encapsulated in measure of runtime.
 String[] setParameters(String[] args)
          Grabs all specified options from the option handler and sets the values for the flags AbstractAlgorithm.VERBOSE_FLAG and AbstractAlgorithm.TIME_FLAG.
 
Methods inherited from class de.lmu.ifi.dbs.elki.algorithm.AbstractAlgorithm
description, isTime, isVerbose, run, setTime, setVerbose
 
Methods inherited from class de.lmu.ifi.dbs.elki.utilities.optionhandling.AbstractParameterizable
addOption, checkGlobalParameterConstraints, deleteOption, description, description, getParameters, getParameterValue, getPossibleOptions, inlineDescription, isSet, setParameters
 
Methods inherited from class de.lmu.ifi.dbs.elki.logging.AbstractLoggable
debugFine, debugFiner, debugFinest, exception, message, progress, progress, progress, verbose, 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.algorithm.Algorithm
getDescription, run, setTime, setVerbose
 
Methods inherited from interface de.lmu.ifi.dbs.elki.utilities.optionhandling.Parameterizable
checkGlobalParameterConstraints, description, getParameters, getPossibleOptions, inlineDescription
 

Field Detail

DISTANCEFUNCTION_ID

public static final OptionID DISTANCEFUNCTION_ID
OptionID for DISTANCE_FUNCTION_PARAM


DBSCAN_EPSILON_ID

public static final OptionID DBSCAN_EPSILON_ID
OptionID for EPSILON_PARAM


LAMBDA_ID

public static final OptionID LAMBDA_ID
OptionID for LAMBDA_PARAM


MINPTS_ID

public static final OptionID MINPTS_ID
OptionID for MINPTS_PARAM


DISTANCE_FUNCTION_PARAM

protected final ClassParameter<AbstractLocallyWeightedDistanceFunction> DISTANCE_FUNCTION_PARAM
Parameter to specify the distance function to determine the distance between database objects, must extend AbstractLocallyWeightedDistanceFunction.

Key: -projdbscan.distancefunction

Default value: EuklideanDistanceFunction


EPSILON_PARAM

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

Key: -projdbscan.epsilon


LAMBDA_PARAM

private final IntParameter LAMBDA_PARAM
Parameter to specify the intrinsic dimensionality of the clusters to find, must be an integer greater than 0.

Key: -projdbscan.lambda


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


epsilon

protected String epsilon
Epsilon.


minpts

protected int minpts
Minimum points.


lambda

private int lambda
Keeps lambda.


resultList

private List<List<Integer>> resultList
Holds a list of clusters found.


result

private ClustersPlusNoise<V extends RealVector<V,?>> result
Provides the result of the algorithm.


noise

private Set<Integer> noise
Holds a set of noise.


processedIDs

private Set<Integer> processedIDs
Holds a set of processed ids.


distanceFunction

private AbstractLocallyWeightedDistanceFunction<V extends RealVector<V,?>,?> distanceFunction
The distance function.

Constructor Detail

ProjectedDBSCAN

protected ProjectedDBSCAN()
Provides the abstract algorithm for variance analysis based DBSCAN.

Method Detail

runInTime

protected void runInTime(Database<V> database)
                  throws IllegalStateException
Description copied from class: AbstractAlgorithm
The run method encapsulated in measure of runtime. An extending class needs not to take care of runtime itself.

Specified by:
runInTime in class AbstractAlgorithm<V extends RealVector<V,?>>
Parameters:
database - the database to run the algorithm on
Throws:
IllegalStateException - if the algorithm has not been initialized properly (e.g. the setParameters(String[]) method has been failed to be called).
See Also:
AbstractAlgorithm.runInTime(Database)

expandCluster

protected void expandCluster(Database<V> database,
                             Integer startObjectID,
                             Progress progress)
ExpandCluster function of DBSCAN.

Parameters:
database - the database to run the algorithm on
startObjectID - the object id of the database object to start the expansion with
progress - the progress object for logging the current status

setParameters

public String[] setParameters(String[] args)
                       throws ParameterException
Description copied from class: AbstractAlgorithm
Grabs all specified options from the option handler and sets the values for the flags AbstractAlgorithm.VERBOSE_FLAG and AbstractAlgorithm.TIME_FLAG. 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 overwritting this method taking advantage from the previously (in superclasses) defined options would be:

 {
   String[] 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 AbstractAlgorithm<V extends RealVector<V,?>>
Parameters:
args - parameters to set the attributes accordingly to
Returns:
String[] an array containing the unused parameters
Throws:
ParameterException - in case of wrong parameter-setting
See Also:
Parameterizable.setParameters(String[])

getAttributeSettings

public List<AttributeSettings> getAttributeSettings()
Description copied from class: AbstractParameterizable
Returns the settings of all options assigned to the option handler.

Specified by:
getAttributeSettings in interface Parameterizable
Overrides:
getAttributeSettings in class AbstractParameterizable
Returns:
the setting of the attributes of the parameterizable
See Also:
Parameterizable.getAttributeSettings()

preprocessorClass

public abstract Class<?> preprocessorClass()
Returns the class actually used as VarianceAnalysisPreprocessor.

Returns:
the class actually used as VarianceAnalysisPreprocessor

getResult

public ClustersPlusNoise<V> getResult()
Description copied from interface: Algorithm
Returns the result of the algorithm.

Specified by:
getResult in interface Algorithm<V extends RealVector<V,?>>
Specified by:
getResult in interface Clustering<V extends RealVector<V,?>>
Returns:
the result of the algorithm
See Also:
Algorithm.getResult()

Release 0.1 (2008-07-10_1838)