-
Notifications
You must be signed in to change notification settings - Fork 27
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
distanceChanged is always True? #2
Comments
Hello @tombenj. I am aware of that issue, there is no guarantee for convergence. Because of that and because k-means in C# is very slow I decided to simply save the table on every iteration to a file and let the user exit. On the next run the file is loaded (if it is properly renamed) and k-means for that table is skipped and assumed to be finished. What should be implemented instead is a correct stopping criteria. For example: 1) The point-to-cluster assignment vector doesn't change or 2) Maximum number of iterations reached. Feel free to implement it and open a pull request. |
hello ~ where is the cpp version? |
|
I'm running the latest commit and
distanceChanged
in the below line in Kmeans.cs never changes to False sincetotalDistance
will never equallastDistance
. There's going to be a subtle difference. Am I wrong here or this should be the case that it continues to lookout even after small improvements such as3.0523720386810282E-06
?Example of output:
The text was updated successfully, but these errors were encountered: