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

Optimal_Clusters_GMM warning number of columns #45

Closed
FMKerckhof opened this issue Jan 30, 2023 · 2 comments
Closed

Optimal_Clusters_GMM warning number of columns #45

FMKerckhof opened this issue Jan 30, 2023 · 2 comments

Comments

@FMKerckhof
Copy link

Not sure if a bug or intended behavior, but when using ClusterR::Optimal_Clusters_GMM I get a warning the number of columns of the data should be larger than 'max_clusters' triggered by:

if (ncol(data) < max(max_clusters) && verbose) { warning("the number of columns of the data should be larger than the maximum value of 'max_clusters'", call. = F); cat(" ", '\n') }

However, from the examples I would assume we are trying to cluster observations rather than parameters? Hence shouldn't the number of rows be used to trigger this warning?

@mlampros
Copy link
Owner

@FMKerckhof yes that's true, based on the Armadillo documentation

The k parameter indicates the number of centroids; the number of samples in the data matrix should be much larger than k

give me a few days and I'll fix both the code and the documentation of the package

@mlampros
Copy link
Owner

mlampros commented Feb 1, 2023

I just updated the code, now it should show the warning if the number of clusters are bigger than the number of observations.
I'll close the issue for now, feel free to re-open it in case that the code does not work as expected.

@mlampros mlampros closed this as completed Feb 1, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants