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

getClusters in HDBSCAN transformed model #316

Closed
nsankar opened this issue Jan 5, 2023 · 2 comments
Closed

getClusters in HDBSCAN transformed model #316

nsankar opened this issue Jan 5, 2023 · 2 comments
Labels
question General question

Comments

@nsankar
Copy link

nsankar commented Jan 5, 2023

The question is how to get the cluster information from a transformed model in HDBSCAN ?

I have a transformed hdbscan model (linear transformation)

TransformTrainer transformed = new TransformTrainer(HDBSCANTrainer,transformations); TransformedModel transformedModel = (TransformedModel) transformed.train(dataset);

The transformedModel does not have a method to get clusters (getclusters).
I tried using getInnerModel as a normal HDBSCAN model as below. But the output is a empty list.
HdbscanModel hdbscanInner = (HdbscanModel) transformedModel.getInnerModel(); System.out.println(hdbscanInner.getClusters().size());

Wondering how to getClusters() from the transformed model . Kindy suggest.

@nsankar nsankar added the question General question label Jan 5, 2023
@Craigacp
Copy link
Member

Craigacp commented Jan 5, 2023

((HdbscanModel) transformedModel.getInnerModel()).getClusters() is the correct way to access the clusters. Maybe the HDBSCAN run assigned everything to noise?

@nsankar
Copy link
Author

nsankar commented Jan 5, 2023

ok. will check that

@nsankar nsankar closed this as completed Jan 11, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
question General question
Projects
None yet
Development

No branches or pull requests

2 participants