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

__check_convergence passes too easily. #6

Open
JonLevy opened this issue Sep 7, 2023 · 0 comments
Open

__check_convergence passes too easily. #6

JonLevy opened this issue Sep 7, 2023 · 0 comments

Comments

@JonLevy
Copy link

JonLevy commented Sep 7, 2023

Per its docstring, __check_convergence, "Ensure[s] that each cluster center is within the tolerance level of the last centroid." And it, returns a boolean that is "True if the cluster centers have converged, False otherwise."

This is not true. In fact, it returns an integer that is equal to the number of clusters centers that have converged within the given tolerance. The k_pod function uses __check_convergence such that if it evaluates True (i.e., at least one cluster center has converged), then iteration ends. This prematurely terminates the algorithm.

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

1 participant