|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.apache.commons.math3.stat.clustering.DBSCANClusterer<T>
T
- type of the points to clusterDBSCANClusterer
instead
@Deprecated public class DBSCANClusterer<T extends Clusterable<T>>
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:
Note: as DBSCAN is not a centroid-based clustering algorithm, the resulting
Cluster
objects will have no defined center, i.e. Cluster.getCenter()
will
return null
.
Nested Class Summary | |
---|---|
private static class |
DBSCANClusterer.PointStatus
Deprecated. Status of a point during the clustering process. |
Field Summary | |
---|---|
private double |
eps
Deprecated. Maximum radius of the neighborhood to be considered. |
private int |
minPts
Deprecated. Minimum number of points needed for a cluster. |
Constructor Summary | |
---|---|
DBSCANClusterer(double eps,
int minPts)
Deprecated. Creates a new instance of a DBSCANClusterer. |
Method Summary | |
---|---|
List<Cluster<T>> |
cluster(Collection<T> points)
Deprecated. Performs DBSCAN cluster analysis. |
private Cluster<T> |
expandCluster(Cluster<T> cluster,
T point,
List<T> neighbors,
Collection<T> points,
Map<Clusterable<T>,DBSCANClusterer.PointStatus> visited)
Deprecated. Expands the cluster to include density-reachable items. |
double |
getEps()
Deprecated. Returns the maximum radius of the neighborhood to be considered. |
int |
getMinPts()
Deprecated. Returns the minimum number of points needed for a cluster. |
private List<T> |
getNeighbors(T point,
Collection<T> points)
Deprecated. Returns a list of density-reachable neighbors of a point . |
private List<T> |
merge(List<T> one,
List<T> two)
Deprecated. Merges two lists together. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
private final double eps
private final int minPts
Constructor Detail |
---|
public DBSCANClusterer(double eps, int minPts) throws NotPositiveException
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
Method Detail |
---|
public double getEps()
public int getMinPts()
public List<Cluster<T>> cluster(Collection<T> points) throws NullArgumentException
Note: as DBSCAN is not a centroid-based clustering algorithm, the resulting
Cluster
objects will have no defined center, i.e. Cluster.getCenter()
will
return null
.
points
- the points to cluster
NullArgumentException
- if the data points are nullprivate Cluster<T> expandCluster(Cluster<T> cluster, T point, List<T> neighbors, Collection<T> points, Map<Clusterable<T>,DBSCANClusterer.PointStatus> visited)
cluster
- Cluster to expandpoint
- Point to add to clusterneighbors
- List of neighborspoints
- the data setvisited
- the set of already visited points
private List<T> getNeighbors(T point, Collection<T> points)
point
.
point
- the point to look forpoints
- possible neighbors
private List<T> merge(List<T> one, List<T> two)
one
- first listtwo
- second list
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |