DBSCAN clustering algorithm class.
More...
#include <dbscan.h>
|
| | DBSCAN (std::vector< std::pair< double, double > > setOfPoints, double Eps, int64_t MinPts) noexcept |
| | constructor for the DBSCAN class
|
| int64_t | nextId (int64_t cluster_id) |
| bool | ExpandCluster (std::vector< std::pair< double, double > > setOfPoints, std::pair< double, double > point, int64_t cluster_id, double Eps, int64_t MinPts) |
| | ExpandCluster function.
|
| std::vector< std::pair< double, double > > | get_query (std::vector< std::pair< double, double > > setOfPoints, std::pair< double, double > point, double Eps) |
| | get_query function
|
| double | dist (std::pair< double, double > a, std::pair< double, double > b) |
| | dist function
|
| std::map< std::pair< double, double >, int64_t > | get_clusters () |
| | get_clusters function
|
| std::vector< std::pair< double, double > > | get_noise () |
| | get_noise function
|
DBSCAN clustering algorithm class.
◆ DBSCAN()
| DBSCAN::DBSCAN |
( |
std::vector< std::pair< double, double > > | setOfPoints, |
|
|
double | Eps, |
|
|
int64_t | MinPts ) |
|
inlineexplicitnoexcept |
constructor for the DBSCAN class
- Parameters
-
| setOfPoints | vector<pair<double,double>>: the input dataset |
| Eps | the input diameter |
| MinPts | the minimum points that a cluster should have to exist |
◆ dist()
| double DBSCAN::dist |
( |
std::pair< double, double > | a, |
|
|
std::pair< double, double > | b ) |
|
inline |
dist function
- Parameters
-
| a | the first input vector |
| b | the second input vector |
- Returns
- double: the euclidean distance of vector a and b
◆ ExpandCluster()
| bool DBSCAN::ExpandCluster |
( |
std::vector< std::pair< double, double > > | setOfPoints, |
|
|
std::pair< double, double > | point, |
|
|
int64_t | cluster_id, |
|
|
double | Eps, |
|
|
int64_t | MinPts ) |
ExpandCluster function.
- Parameters
-
| setOfPoints | the input dataset |
| point | the input point |
| cluster_id | the input cluster_id |
| Eps | the input diameter |
| MinPts | the minimum points that a cluster should have to exist |
◆ get_clusters()
| std::map< std::pair< double, double >, int64_t > DBSCAN::get_clusters |
( |
| ) |
|
|
inline |
get_clusters function
- Returns
- map<pair<double,double>>: the points and their assignments
◆ get_noise()
| std::vector< std::pair< double, double > > DBSCAN::get_noise |
( |
| ) |
|
|
inline |
get_noise function
- Returns
- vector<pair<double,double>>: the total points that exist as noise in the dataset
◆ get_query()
| std::vector< std::pair< double, double > > DBSCAN::get_query |
( |
std::vector< std::pair< double, double > > | setOfPoints, |
|
|
std::pair< double, double > | point, |
|
|
double | Eps ) |
|
inline |
get_query function
- Parameters
-
| setOfPoints | the input dataset |
| point | the input point |
| Eps | the input diameter |
◆ nextId()
| int64_t DBSCAN::nextId |
( |
int64_t | cluster_id | ) |
|
|
inline |
@ brief nextId function @ return int64_t: the next cluster id
The documentation for this class was generated from the following file:
- /Users/runner/work/AlgoPlus/AlgoPlus/src/machine_learning/clustering/DBSCAN/dbscan.h