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, raft::distance::DistanceType metric, Common::HDBSCANParams ¶ms, 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, raft::distance::DistanceType metric, Common::HDBSCANParams ¶ms, value_idx *labels, value_t *core_dists, Common::hdbscan_output< value_idx, value_t > &out) |
void ML::HDBSCAN::_fit_hdbscan | ( | const raft::handle_t & | handle, |
const value_t * | X, | ||
size_t | m, | ||
size_t | n, | ||
raft::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)
void ML::HDBSCAN::build_linkage | ( | const raft::handle_t & | handle, |
const value_t * | X, | ||
size_t | m, | ||
size_t | n, | ||
raft::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.
value_idx | |
value_t |
[in] | handle | raft handle for resource reuse |
[in] | X | data points (size m * n) |
[in] | m | number of rows |
[in] | n | number of columns |
[in] | metric | distance metric to use |
[in] | params | hyper parameters |
[in] | core_dists | buffer for storing core distances (size m) |
[out] | out | output container object |
Mutual reachability graph
Construct MST sorted by weights
Perform hierarchical labeling