de.aitools.dm.clustering.algorithms
Class DBScan

java.lang.Object
  extended by de.aitools.dm.clustering.algorithms.ASoftClusterer
      extended by de.aitools.dm.clustering.algorithms.AClusterer
          extended by de.aitools.dm.clustering.algorithms.DBScan
All Implemented Interfaces:
Clusterer, SoftClusterer

public final class DBScan
extends AClusterer

This class is experimental at best. As you can see, it uses deprecated classes. It is also not tested well and I do not provide support for it. It has passes some basic tests (see the test folder). It also seemed to work on some real dataset.

The DBScanConfiguration is, however, not finished. The algorithm has two parameters, the number of neighborhood points needed to label a point as a Core Point, and the range which defines what the neighborhood is.

In short: The algorithm labels all points with at least coreMinNeighbors other points within neighborhoodProximity as core points. All other points with a core point in their neighborhood are called border points. The remaining points are called noise. Clusters are formed by connecting core points with all other core points in their neighborhood and the assigning the border points to the nearest cluster.

The cluster label 0 is reserved for the noise points.

There are some ways to calculate one or both parameters from the data (for which the DBScanConfiguration interface was created). This is, however, not finished. Not even partly.

You can use this implementation to try things out. But if you plan to use it seriously, I would recommend to reimplement it.

Version:
$Id: DBScan.java,v 1.2 2011/11/09 13:40:46 hoppe Exp $
Author:
johannes.kiesel(/\t)uni-weimar.de

Nested Class Summary
 class DBScan.DBScanAllParameters
          TODO
static interface DBScan.DBScanConfiguration
          TODO
 class DBScan.DBScanGraphAverageSlopeOutlierDetector
          TODO
static interface DBScan.DBScanGraphKneeDetector
          TODO
 class DBScan.DBScanSearchProximity
          TODO
 
Field Summary
 
Fields inherited from interface de.aitools.dm.clustering.Clusterer
DEFAULT_SEED
 
Constructor Summary
DBScan(Configuration configuration)
          TODO
DBScan(Proximity<Vector> proximityMeasure)
          TODO
 
Method Summary
 int[] cluster(Vector[] data)
           
 int[] cluster(Vector[] data, int coreMinNeighbors)
          TODO
 int[] cluster(Vector[] data, int coreMinNeighbors, DBScan.DBScanGraphKneeDetector neighborhoodProximityDetector)
          TODO
 int[] cluster(Vector[] data, int coreMinNeighbors, double neighborhoodProximity)
          TODO
static void main(java.lang.String[] args)
           
 void setClusterConfiguration(DBScan.DBScanConfiguration configuration)
          TODO
 void setProximityMeasure(Proximity<Vector> proximityMeasure)
          Sets the proximity measure to be used for clustering.
 
Methods inherited from class de.aitools.dm.clustering.algorithms.AClusterer
cluster, cluster, cluster, clusterSoft
 
Methods inherited from class de.aitools.dm.clustering.algorithms.ASoftClusterer
clusterSoft, clusterSoft, clusterSoft, getBiggestRange
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

DBScan

public DBScan(Proximity<Vector> proximityMeasure)
TODO

Parameters:
proximityMeasure -

DBScan

public DBScan(Configuration configuration)
TODO

Parameters:
configuration -
Method Detail

setProximityMeasure

public void setProximityMeasure(Proximity<Vector> proximityMeasure)
Sets the proximity measure to be used for clustering.

Parameters:
proximityMeasure - The measure to use.

setClusterConfiguration

public void setClusterConfiguration(DBScan.DBScanConfiguration configuration)
TODO

Parameters:
configuration -

cluster

public int[] cluster(Vector[] data)
Specified by:
cluster in interface Clusterer
Specified by:
cluster in class AClusterer

cluster

public int[] cluster(Vector[] data,
                     int coreMinNeighbors,
                     double neighborhoodProximity)
TODO

Parameters:
data -
coreMinNeighbors -
neighborhoodProximity -
Returns:

cluster

public int[] cluster(Vector[] data,
                     int coreMinNeighbors)
TODO

Parameters:
data -
coreMinNeighbors -
Returns:

cluster

public int[] cluster(Vector[] data,
                     int coreMinNeighbors,
                     DBScan.DBScanGraphKneeDetector neighborhoodProximityDetector)
TODO

Parameters:
data -
coreMinNeighbors -
neighborhoodProximityDetector -
Returns:

main

public static void main(java.lang.String[] args)
Parameters:
args -