Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Exposes views on the HDBSCAN cluster exemplars #229

Merged
merged 4 commits into from
Apr 15, 2022

Conversation

Craigacp
Copy link
Member

Description

Adds a get method for cluster exemplars in HDBSCAN which returns copies of the exemplars (as the vector is mutable), along with a method that returns the exemplar in terms of feature names.

Motivation

Fixes #217.

@Craigacp Craigacp added Oracle employee This PR is from an Oracle employee squash-commits Squash the commits when merging this PR labels Mar 30, 2022
@Craigacp
Copy link
Member Author

@geoffreydstewart would you mind looking over this?

Copy link
Member

@geoffreydstewart geoffreydstewart left a comment

Choose a reason for hiding this comment

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

These changes look good. I'm not sure if it's worth adding some minimal test coverage for the new getClusters method. The logic looks quite safe, but it could be instructive for the community. Additionally, there is an existing test deserializeHdbscanModelV42Test where we might consider asserting that calling the getMaxDistToEdge method on a ClusterExemplar from a v4.2 model returns Double.NEGATIVE_INFINITY.

@Craigacp
Copy link
Member Author

These changes look good. I'm not sure if it's worth adding some minimal test coverage for the new getClusters method. The logic looks quite safe, but it could be instructive for the community. Additionally, there is an existing test deserializeHdbscanModelV42Test where we might consider asserting that calling the getMaxDistToEdge method on a ClusterExemplar from a v4.2 model returns Double.NEGATIVE_INFINITY.

I've expanded the tests to cover those points.

@geoffreydstewart
Copy link
Member

The added coverage looks great.

Copy link
Member

@JackSullivan JackSullivan left a comment

Choose a reason for hiding this comment

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

Looks good to me

@Craigacp Craigacp merged commit 38d60e6 into oracle:main Apr 15, 2022
@Craigacp Craigacp deleted the public-cluster-exemplar branch April 15, 2022 17:33
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Oracle employee This PR is from an Oracle employee squash-commits Squash the commits when merging this PR
Projects
None yet
Development

Successfully merging this pull request may close these issues.

HDBscan clusterExemplars getter
3 participants