|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.apache.commons.math3.ml.clustering.Clusterer<T>
org.apache.commons.math3.ml.clustering.DBSCANClusterer<T>
T
- type of the points to clusterpublic class DBSCANClusterer<T extends Clusterable>
DBSCAN (density-based spatial clustering of applications with noise) algorithm.
The DBSCAN algorithm forms clusters based on the idea of density connectivity, i.e. a point p is density connected to another point q, if there exists a chain of points pi, with i = 1 .. n and p1 = p and pn = q, such that each pair <pi, pi+1> is directly density-reachable. A point q is directly density-reachable from point p if it is in the ε-neighborhood of this point.
Any point that is not density-reachable from a formed cluster is treated as noise, and will thus not be present in the result.
The algorithm requires two parameters:
Constructor Summary | |
---|---|
DBSCANClusterer(double eps,
int minPts)
Creates a new instance of a DBSCANClusterer. |
|
DBSCANClusterer(double eps,
int minPts,
DistanceMeasure measure)
Creates a new instance of a DBSCANClusterer. |
Method Summary | |
---|---|
List<Cluster<T>> |
cluster(Collection<T> points)
Performs DBSCAN cluster analysis. |
double |
getEps()
Returns the maximum radius of the neighborhood to be considered. |
int |
getMinPts()
Returns the minimum number of points needed for a cluster. |
Methods inherited from class org.apache.commons.math3.ml.clustering.Clusterer |
---|
distance, getDistanceMeasure |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public DBSCANClusterer(double eps, int minPts) throws NotPositiveException
The euclidean distance will be used as default distance measure.
eps
- maximum radius of the neighborhood to be consideredminPts
- minimum number of points needed for a cluster
NotPositiveException
- if eps < 0.0
or minPts < 0
public DBSCANClusterer(double eps, int minPts, DistanceMeasure measure) throws NotPositiveException
eps
- maximum radius of the neighborhood to be consideredminPts
- minimum number of points needed for a clustermeasure
- the distance measure to use
NotPositiveException
- if eps < 0.0
or minPts < 0
Method Detail |
---|
public double getEps()
public int getMinPts()
public List<Cluster<T>> cluster(Collection<T> points) throws NullArgumentException
cluster
in class Clusterer<T extends Clusterable>
points
- the points to cluster
NullArgumentException
- if the data points are null
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |