DBSCAN (Density-Based Spatial Clustering of Applications with Noise) is a clustering technique described in the following paper: More...
Public Member Functions | |
DBSCAN (const double epsilon, const size_t minPoints, const bool batchMode=true, RangeSearchType rangeSearch=RangeSearchType(), PointSelectionPolicy pointSelector=PointSelectionPolicy()) | |
Construct the DBSCAN object with the given parameters. More... | |
template < typename MatType > | |
size_t | Cluster (const MatType &data, arma::mat ¢roids) |
Performs DBSCAN clustering on the data, returning number of clusters and also the centroid of each cluster. More... | |
template < typename MatType > | |
size_t | Cluster (const MatType &data, arma::Row< size_t > &assignments) |
Performs DBSCAN clustering on the data, returning number of clusters and also the list of cluster assignments. More... | |
template < typename MatType > | |
size_t | Cluster (const MatType &data, arma::Row< size_t > &assignments, arma::mat ¢roids) |
Performs DBSCAN clustering on the data, returning number of clusters, the centroid of each cluster and also the list of cluster assignments. More... | |
DBSCAN (Density-Based Spatial Clustering of Applications with Noise) is a clustering technique described in the following paper:
The DBSCAN algorithm iteratively clusters points using range searches with a specified radius parameter. This implementation allows configuration of the range search technique used and the point selection strategy by means of template parameters.
RangeSearchType | Class to use for range searching. |
PointSelectionPolicy | Strategy for selecting next point to cluster with. |
Definition at line 52 of file dbscan.hpp.
DBSCAN | ( | const double | epsilon, |
const size_t | minPoints, | ||
const bool | batchMode = true , |
||
RangeSearchType | rangeSearch = RangeSearchType() , |
||
PointSelectionPolicy | pointSelector = PointSelectionPolicy() |
||
) |
Construct the DBSCAN object with the given parameters.
The batchMode parameter should be set to false in the case where RAM issues will be encountered (i.e. if the dataset is very large or if epsilon is large). When batchMode is false, each point will be searched iteratively, which could be slower but will use less memory.
epsilon | Size of range query. |
minPoints | Minimum number of points for each cluster. |
batchMode | If true, all points are searched in batch. |
rangeSearch | Optional instantiated RangeSearch object. |
pointSelector | OptionL instantiated PointSelectionPolicy object. |
size_t Cluster | ( | const MatType & | data, |
arma::mat & | centroids | ||
) |
Performs DBSCAN clustering on the data, returning number of clusters and also the centroid of each cluster.
MatType | Type of matrix (arma::mat or arma::sp_mat). |
data | Dataset to cluster. |
centroids | Matrix in which centroids are stored. |
size_t Cluster | ( | const MatType & | data, |
arma::Row< size_t > & | assignments | ||
) |
Performs DBSCAN clustering on the data, returning number of clusters and also the list of cluster assignments.
If assignments[i] == SIZE_MAX, then the point is considered "noise".
MatType | Type of matrix (arma::mat or arma::sp_mat). |
data | Dataset to cluster. |
assignments | Vector to store cluster assignments. |
size_t Cluster | ( | const MatType & | data, |
arma::Row< size_t > & | assignments, | ||
arma::mat & | centroids | ||
) |
Performs DBSCAN clustering on the data, returning number of clusters, the centroid of each cluster and also the list of cluster assignments.
If assignments[i] == SIZE_MAX, then the point is considered "noise".
MatType | Type of matrix (arma::mat or arma::sp_mat). |
data | Dataset to cluster. |
assignments | Vector to store cluster assignments. |
centroids | Matrix in which centroids are stored. |