Namespaces | Classes | Functions
ML::HDBSCAN Namespace Reference

Namespaces

 Common
 
 detail
 
 HELPER
 

Classes

struct  FixConnectivitiesRedOp
 

Functions

template<typename value_idx = int64_t, typename value_t = float>
void build_linkage (const raft::handle_t &handle, const value_t *X, size_t m, size_t n, cuvs::distance::DistanceType metric, Common::HDBSCANParams &params, value_t *core_dists, Common::robust_single_linkage_output< value_idx, value_t > &out)
 
template<typename value_idx = int64_t, typename value_t = float>
void _fit_hdbscan (const raft::handle_t &handle, const value_t *X, size_t m, size_t n, cuvs::distance::DistanceType metric, Common::HDBSCANParams &params, value_idx *labels, value_t *core_dists, Common::hdbscan_output< value_idx, value_t > &out)
 

Function Documentation

◆ _fit_hdbscan()

template<typename value_idx = int64_t, typename value_t = float>
void ML::HDBSCAN::_fit_hdbscan ( const raft::handle_t &  handle,
const value_t *  X,
size_t  m,
size_t  n,
cuvs::distance::DistanceType  metric,
Common::HDBSCANParams params,
value_idx *  labels,
value_t *  core_dists,
Common::hdbscan_output< value_idx, value_t > &  out 
)

Condense branches of tree according to min cluster size

Extract labels from stability

Normalize labels so they are drawn from a monotonically increasing set starting at 0 even in the presence of noise (-1)

◆ build_linkage()

template<typename value_idx = int64_t, typename value_t = float>
void ML::HDBSCAN::build_linkage ( const raft::handle_t &  handle,
const value_t *  X,
size_t  m,
size_t  n,
cuvs::distance::DistanceType  metric,
Common::HDBSCANParams params,
value_t *  core_dists,
Common::robust_single_linkage_output< value_idx, value_t > &  out 
)

Constructs a linkage by computing mutual reachability, mst, and dendrogram. This is shared by HDBSCAN and Robust Single Linkage since the two algorithms differ only in the cluster selection and extraction.

Template Parameters
value_idx
value_t
Parameters
[in]handleraft handle for resource reuse
[in]Xdata points (size m * n)
[in]mnumber of rows
[in]nnumber of columns
[in]metricdistance metric to use
[in]paramshyper parameters
[in]core_distsbuffer for storing core distances (size m)
[out]outoutput container object

Mutual reachability graph

Construct MST sorted by weights

Perform hierarchical labeling