8 #ifndef MLPACK_METHODS_DBSCAN_DBSCAN_HPP 9 #define MLPACK_METHODS_DBSCAN_DBSCAN_HPP 14 #include <boost/dynamic_bitset.hpp> 44 template<
typename RangeSearchType = range::RangeSearch<>,
45 typename Po
intSelectionPolicy = RandomPo
intSelection>
70 template<
typename MatType>
71 size_t Cluster(
const MatType& data,
72 arma::mat& centroids);
82 template<
typename MatType>
83 size_t Cluster(
const MatType& data,
84 arma::Row<size_t>& assignments);
97 template<
typename MatType>
98 size_t Cluster(
const MatType& data,
99 arma::Row<size_t>& assignments,
100 arma::mat& centroids);
135 template<
typename MatType>
137 boost::dynamic_bitset<>& unvisited,
139 arma::Row<size_t>& assignments,
140 const size_t currentCluster,
141 const std::vector<std::vector<size_t>>& neighbors,
142 const std::vector<std::vector<double>>& distances,
143 const bool topLevel =
true);
150 #include "dbscan_impl.hpp"
DBSCAN (Density-Based Spatial Clustering of Applications with Noise) is a clustering technique descri...
double epsilon
Maximum distance between two points to be part of same cluster.
PointSelectionPolicy pointSelector
Instantiated point selection policy.
Linear algebra utility functions, generally performed on matrices or vectors.
size_t ProcessPoint(const MatType &data, boost::dynamic_bitset<> &unvisited, const size_t index, arma::Row< size_t > &assignments, const size_t currentCluster, const std::vector< std::vector< size_t >> &neighbors, const std::vector< std::vector< double >> &distances, const bool topLevel=true)
This function processes the point at index.
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 cl...
RangeSearchType rangeSearch
Instantiated range search policy.
Include all of the base components required to write MLPACK methods, and the main MLPACK Doxygen docu...
size_t minPoints
Minimum number of points to be in the epsilon-neighborhood (including itself) for the point to be a c...
DBSCAN(const double epsilon, const size_t minPoints, RangeSearchType rangeSearch=RangeSearchType(), PointSelectionPolicy pointSelector=PointSelectionPolicy())
Construct the DBSCAN object with the given parameters.