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,Clustering<Model>>
              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<Model>>, ClusteringAlgorithm<Clustering<Model>,V>, Parameterizable
Direct Known Subclasses:
FourC, PreDeCon

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

Provides an abstract algorithm requiring a VarianceAnalysisPreprocessor.

Author:
Arthur Zimek

Field Summary
static OptionID DISTANCE_FUNCTION_ID
          OptionID for DISTANCE_FUNCTION_PARAM
protected  ClassParameter<LocallyWeightedDistanceFunction<V,?>> DISTANCE_FUNCTION_PARAM
          Parameter to specify the distance function to determine the distance between database objects, must extend AbstractLocallyWeightedDistanceFunction.
private  LocallyWeightedDistanceFunction<V,?> distanceFunction
          Holds the instance of the distance function specified by DISTANCE_FUNCTION_PARAM.
protected  String epsilon
          Holds the value of EPSILON_PARAM.
static OptionID EPSILON_ID
          OptionID for EPSILON_PARAM
private  PatternParameter EPSILON_PARAM
          Parameter to specify the maximum radius of the neighborhood to be considered, must be suitable to LocallyWeightedDistanceFunction.
private  int lambda
          Holds the value of LAMBDA_PARAM.
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
          Holds the value of MINPTS_PARAM.
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  Clustering<Model> 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, logger
 
Constructor Summary
protected ProjectedDBSCAN()
          Provides the abstract algorithm for variance analysis based DBSCAN, adding parameters EPSILON_PARAM, MINPTS_PARAM, LAMBDA_PARAM, and DISTANCE_FUNCTION_PARAM to the option handler additionally to parameters of super class.
 
Method Summary
protected  void expandCluster(Database<V> database, Integer startObjectID, FiniteProgress objprog, IndefiniteProgress clusprog)
          ExpandCluster function of DBSCAN.
 Clustering<Model> getResult()
          Retrieve the result.
abstract  Class<?> preprocessorClass()
          Returns the class actually used as VarianceAnalysisPreprocessor.
protected  Clustering<Model> runInTime(Database<V> database)
          The run method encapsulated in measure of runtime.
 List<String> setParameters(List<String> args)
          Calls the super method and instantiates distanceFunction according to the value of parameter DISTANCE_FUNCTION_PARAM and sets additionally the values of the parameters EPSILON_PARAM MINPTS_PARAM, and LAMBDA_PARAM.
 
Methods inherited from class de.lmu.ifi.dbs.elki.algorithm.AbstractAlgorithm
isTime, isVerbose, run, setTime, setVerbose
 
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.algorithm.clustering.ClusteringAlgorithm
run
 
Methods inherited from interface de.lmu.ifi.dbs.elki.algorithm.Algorithm
getDescription, setTime, setVerbose
 
Methods inherited from interface de.lmu.ifi.dbs.elki.utilities.optionhandling.Parameterizable
checkGlobalParameterConstraints, collectOptions, getParameters, shortDescription
 

Field Detail

DISTANCE_FUNCTION_ID

public static final OptionID DISTANCE_FUNCTION_ID
OptionID for DISTANCE_FUNCTION_PARAM


DISTANCE_FUNCTION_PARAM

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

Key: -projdbscan.distancefunction

Default value: LocallyWeightedDistanceFunction


distanceFunction

private LocallyWeightedDistanceFunction<V extends RealVector<V,?>,?> distanceFunction
Holds the instance of the distance function specified by DISTANCE_FUNCTION_PARAM.


EPSILON_ID

public static final OptionID EPSILON_ID
OptionID for EPSILON_PARAM


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


epsilon

protected String epsilon
Holds the value of EPSILON_PARAM.


LAMBDA_ID

public static final OptionID LAMBDA_ID
OptionID for LAMBDA_PARAM


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


lambda

private int lambda
Holds the value of LAMBDA_PARAM.


MINPTS_ID

public static final OptionID MINPTS_ID
OptionID for MINPTS_PARAM


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


minpts

protected int minpts
Holds the value of MINPTS_PARAM.


resultList

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


result

private Clustering<Model> 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.

Constructor Detail

ProjectedDBSCAN

protected ProjectedDBSCAN()
Provides the abstract algorithm for variance analysis based DBSCAN, adding parameters EPSILON_PARAM, MINPTS_PARAM, LAMBDA_PARAM, and DISTANCE_FUNCTION_PARAM to the option handler additionally to parameters of super class.

Method Detail

runInTime

protected Clustering<Model> 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,?>,Clustering<Model>>
Parameters:
database - the database to run the algorithm on
Returns:
the Result computed by this algorithm
Throws:
IllegalStateException - if the algorithm has not been initialized properly (e.g. the setParameters(String[]) method has been failed to be called).

expandCluster

protected void expandCluster(Database<V> database,
                             Integer startObjectID,
                             FiniteProgress objprog,
                             IndefiniteProgress clusprog)
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
objprog - the progress object for logging the current status

setParameters

public List<String> setParameters(List<String> args)
                           throws ParameterException
Calls the super method and instantiates distanceFunction according to the value of parameter DISTANCE_FUNCTION_PARAM and sets additionally the values of the parameters EPSILON_PARAM MINPTS_PARAM, and LAMBDA_PARAM.

The remaining parameters are passed to the distanceFunction.

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

preprocessorClass

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

Returns:
the class actually used as VarianceAnalysisPreprocessor

getResult

public Clustering<Model> getResult()
Description copied from interface: ClusteringAlgorithm
Retrieve the result.

Specified by:
getResult in interface Algorithm<V extends RealVector<V,?>,Clustering<Model>>
Specified by:
getResult in interface ClusteringAlgorithm<Clustering<Model>,V extends RealVector<V,?>>
Returns:
the result of the algorithm

Release 0.2.1 (2009-07-13_1605)