de.lmu.ifi.dbs.elki.algorithm.clustering
Class AbstractProjectedDBSCAN<R extends Clustering<Model>,V extends NumberVector<V,?>>

java.lang.Object
  extended by de.lmu.ifi.dbs.elki.algorithm.AbstractAlgorithm<R>
      extended by de.lmu.ifi.dbs.elki.algorithm.clustering.AbstractProjectedDBSCAN<R,V>
Type Parameters:
V - the type of NumberVector handled by this Algorithm
All Implemented Interfaces:
Algorithm, ClusteringAlgorithm<R>, InspectionUtilFrequentlyScanned, Parameterizable
Direct Known Subclasses:
FourC, PreDeCon

public abstract class AbstractProjectedDBSCAN<R extends Clustering<Model>,V extends NumberVector<V,?>>
extends AbstractAlgorithm<R>
implements ClusteringAlgorithm<R>

Provides an abstract algorithm requiring a VarianceAnalysisPreprocessor.


Nested Class Summary
static class AbstractProjectedDBSCAN.Parameterizer<V extends NumberVector<V,?>,D extends Distance<D>>
          Parameterization class.
 
Field Summary
private  LocallyWeightedDistanceFunction<V> distanceFunction
          Holds the instance of the distance function specified by INNER_DISTANCE_FUNCTION_ID.
protected  DoubleDistance epsilon
          Holds the value of EPSILON_ID.
static OptionID EPSILON_ID
          Parameter to specify the maximum radius of the neighborhood to be considered, must be suitable to LocallyWeightedDistanceFunction.
static OptionID INNER_DISTANCE_FUNCTION_ID
          Parameter distance function
private  int lambda
          Holds the value of LAMBDA_ID.
static OptionID LAMBDA_ID
          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_ID.
static OptionID MINPTS_ID
          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  ModifiableDBIDs noise
          Holds a set of noise.
static OptionID OUTER_DISTANCE_FUNCTION_ID
          Parameter to specify the distance function to determine the distance between database objects, must extend LocallyWeightedDistanceFunction .
private  ModifiableDBIDs processedIDs
          Holds a set of processed ids.
private  List<ModifiableDBIDs> resultList
          Holds a list of clusters found.
 
Constructor Summary
AbstractProjectedDBSCAN(DoubleDistance epsilon, int minpts, LocallyWeightedDistanceFunction<V> distanceFunction, int lambda)
          Constructor.
 
Method Summary
protected  void expandCluster(LocallyWeightedDistanceFunction.Instance<V> distFunc, RangeQuery<V,DoubleDistance> rangeQuery, DBID startObjectID, FiniteProgress objprog, IndefiniteProgress clusprog)
          ExpandCluster function of DBSCAN.
 TypeInformation[] getInputTypeRestriction()
          Get the input type restriction used for negotiating the data query.
abstract  String getLongResultName()
          Return the long result name.
abstract  String getShortResultName()
          Return the short result name.
 Clustering<Model> run(Database database, Relation<V> relation)
           
 
Methods inherited from class de.lmu.ifi.dbs.elki.algorithm.AbstractAlgorithm
getLogger, makeParameterDistanceFunction, run
 
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
 

Field Detail

OUTER_DISTANCE_FUNCTION_ID

public static final OptionID OUTER_DISTANCE_FUNCTION_ID
Parameter to specify the distance function to determine the distance between database objects, must extend LocallyWeightedDistanceFunction .

Key: -projdbscan.distancefunction

Default value: LocallyWeightedDistanceFunction


INNER_DISTANCE_FUNCTION_ID

public static final OptionID INNER_DISTANCE_FUNCTION_ID
Parameter distance function


EPSILON_ID

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

Key: -projdbscan.epsilon


LAMBDA_ID

public static final OptionID LAMBDA_ID
Parameter to specify the intrinsic dimensionality of the clusters to find, must be an integer greater than 0.

Key: -projdbscan.lambda


MINPTS_ID

public static final OptionID MINPTS_ID
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


distanceFunction

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


epsilon

protected DoubleDistance epsilon
Holds the value of EPSILON_ID.


lambda

private int lambda
Holds the value of LAMBDA_ID.


minpts

protected int minpts
Holds the value of MINPTS_ID.


resultList

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


noise

private ModifiableDBIDs noise
Holds a set of noise.


processedIDs

private ModifiableDBIDs processedIDs
Holds a set of processed ids.

Constructor Detail

AbstractProjectedDBSCAN

public AbstractProjectedDBSCAN(DoubleDistance epsilon,
                               int minpts,
                               LocallyWeightedDistanceFunction<V> distanceFunction,
                               int lambda)
Constructor.

Parameters:
epsilon - Epsilon
minpts - MinPts parameter
distanceFunction - Outer distance function
lambda - Lambda value
Method Detail

run

public Clustering<Model> run(Database database,
                             Relation<V> relation)
                      throws IllegalStateException
Throws:
IllegalStateException

getLongResultName

public abstract String getLongResultName()
Return the long result name.

Returns:
Long name for result

getShortResultName

public abstract String getShortResultName()
Return the short result name.

Returns:
Short name for result

expandCluster

protected void expandCluster(LocallyWeightedDistanceFunction.Instance<V> distFunc,
                             RangeQuery<V,DoubleDistance> rangeQuery,
                             DBID startObjectID,
                             FiniteProgress objprog,
                             IndefiniteProgress clusprog)
ExpandCluster function of DBSCAN.

Parameters:
distFunc - Distance query to use
rangeQuery - Range query
startObjectID - the object id of the database object to start the expansion with
objprog - the progress object for logging the current status

getInputTypeRestriction

public TypeInformation[] getInputTypeRestriction()
Description copied from class: AbstractAlgorithm
Get the input type restriction used for negotiating the data query.

Specified by:
getInputTypeRestriction in interface Algorithm
Specified by:
getInputTypeRestriction in class AbstractAlgorithm<R extends Clustering<Model>>
Returns:
Type restriction

Release 0.4.0 (2011-09-20_1324)