Functions
ML::HDBSCAN::HELPER Namespace Reference

Functions

void compute_core_dists (const raft::handle_t &handle, const float *X, float *core_dists, size_t m, size_t n, raft::distance::DistanceType metric, int min_samples)
 Compute the core distances for each point in the training matrix. More...
 
void compute_inverse_label_map (const raft::handle_t &handle, HDBSCAN::Common::CondensedHierarchy< int, float > &condensed_tree, size_t n_leaves, HDBSCAN::Common::CLUSTER_SELECTION_METHOD cluster_selection_method, rmm::device_uvector< int > &inverse_label_map, bool allow_single_cluster, int max_cluster_size, float cluster_selection_epsilon)
 Compute the map from final, normalize labels to the labels in the CondensedHierarchy. More...
 

Function Documentation

◆ compute_core_dists()

void ML::HDBSCAN::HELPER::compute_core_dists ( const raft::handle_t &  handle,
const float *  X,
float *  core_dists,
size_t  m,
size_t  n,
raft::distance::DistanceType  metric,
int  min_samples 
)

Compute the core distances for each point in the training matrix.

Parameters
[in]handleraft handle for resource reuse
[in]Xarray (size m, n) on device in row-major format
[out]core_distsarray (size m, 1) of core distances
mnumber of rows in X
nnumber of columns in X
metricdistance metric to use
min_samplesminimum number of samples to use for computing core distances

◆ compute_inverse_label_map()

void ML::HDBSCAN::HELPER::compute_inverse_label_map ( const raft::handle_t &  handle,
HDBSCAN::Common::CondensedHierarchy< int, float > &  condensed_tree,
size_t  n_leaves,
HDBSCAN::Common::CLUSTER_SELECTION_METHOD  cluster_selection_method,
rmm::device_uvector< int > &  inverse_label_map,
bool  allow_single_cluster,
int  max_cluster_size,
float  cluster_selection_epsilon 
)

Compute the map from final, normalize labels to the labels in the CondensedHierarchy.

Parameters
[in]handleraft handle for resource reuse
[in]condensed_treethe Condensed Hierarchy object
[in]n_leavesnumber of leaves in the input data
[in]cluster_selection_methodcluster selection method
[out]inverse_label_maprmm::device_uvector of size 0. It will be resized during the computation
[in]allow_single_clusterallow single cluster
[in]max_cluster_sizemax cluster size
[in]cluster_selection_epsiloncluster selection epsilon