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

Error when the number of components is zero #1

Open
zhiyintan opened this issue Nov 3, 2024 · 2 comments
Open

Error when the number of components is zero #1

zhiyintan opened this issue Nov 3, 2024 · 2 comments

Comments

@zhiyintan
Copy link

When length of self.component_vectors = 0 (hdbscan_min_cluster_size/hdbscan_min_samples is set too large)

IndexError: list index out of range

return self.component_vectors[i]

@eichinflo
Copy link
Collaborator

Thank you for bringing this to our attention! In your opinion: What would be the expected behavior if a representation of a non-existent component is requested here? Thinking about it, throwing a more expressive error message is probably the correct behavior.

What I am also concerned about is the naming of the function as "representation" here refers to the cluster centroid and not a c-tf-idf representation. I think I'll rename this and also add a function to the SCA class that offers the same functionality of exposing the cluster centroids.

eichinflo added a commit that referenced this issue Jan 8, 2025
decomposition.ClusterDecomposer.get_component_repr
method to avoid errors when no components are found.

Adressing issue #2: We've added functionalityto the
`SCA` initialization method to allow for custom tokenizers.
We've alos added respective test cases and notes in the README.
@eichinflo
Copy link
Collaborator

I've just added some lines to address the first part of this.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants