Skip to content

Compute components_ in DBSCAN#6976

Merged
rapids-bot[bot] merged 1 commit intorapidsai:branch-25.08from
jcrist:dbscan-components
Jul 7, 2025
Merged

Compute components_ in DBSCAN#6976
rapids-bot[bot] merged 1 commit intorapidsai:branch-25.08from
jcrist:dbscan-components

Conversation

@jcrist
Copy link
Copy Markdown
Member

@jcrist jcrist commented Jul 7, 2025

This adds support for computing the components_ attribute of DBSCAN.

The attribute is only stored if calc_core_sample_indices=True (the default), since both are related to the core samples. The number of core samples is much smaller than the number of samples (sometimes it's 0), in practice this adds negligible time and space overhead, but will respect the existing switch if needed.

Fixes #6975.

This adds support for computing the `components_` attribute of `DBSCAN`.

The attribute is only stored if `calc_core_sample_indices=True` (the
default), since both are related to the core samples. The number of core
samples is much smaller than the number of samples (sometimes it's 0),
in practice this adds negligible time and space overhead, but will
respect the existing switch if needed.
@jcrist jcrist self-assigned this Jul 7, 2025
@jcrist jcrist requested a review from a team as a code owner July 7, 2025 17:57
@jcrist jcrist added the Cython / Python Cython or Python issue label Jul 7, 2025
@jcrist jcrist requested review from csadorf and viclafargue July 7, 2025 17:57
@jcrist jcrist added improvement Improvement / enhancement to an existing function non-breaking Non-breaking change cuml-accel Issues related to cuml.accel labels Jul 7, 2025
Copy link
Copy Markdown
Contributor

@csadorf csadorf left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Great!

@jcrist
Copy link
Copy Markdown
Member Author

jcrist commented Jul 7, 2025

/merge

@rapids-bot rapids-bot Bot merged commit 029c3cf into rapidsai:branch-25.08 Jul 7, 2025
71 of 72 checks passed
@jcrist jcrist deleted the dbscan-components branch July 7, 2025 19:01
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

cuml-accel Issues related to cuml.accel Cython / Python Cython or Python issue improvement Improvement / enhancement to an existing function non-breaking Non-breaking change

Projects

None yet

Development

Successfully merging this pull request may close these issues.

DBSCAN does not compute the components_ attribute

3 participants