-
Notifications
You must be signed in to change notification settings - Fork 2k
MachineLearning.KMeans: Balanced clustering #390
Comments
Hi there, Right now the framework doesn't offer any mechanism to create clusters of the same size. However, this problem seems highly interesting. I will probably be adding a method for this task in the next few days. Regards, |
It seems in fact that a balanced k-means algorithm can be implemented using the Munkres / Hungarian algorithm for solving minimum-cost assignment problems, which would also be an excellent addition to the framework. I will be adding a possible version for this modified k-means in the next minutes! |
I've just committed a Balanced K-Means implementation. You can either compile the framework from the source code right now or wait until a new pre-release NuGet package is generated. Regards, |
Awesome! Thanks a lot for such a quick response and even quicker solution. |
Fixed in 3.5.0. |
Is there any tweak/configuration/settings/example that shows how to calculate clusters of same size using your Framework? If not, is this included in your plans for next releases?
Right now the only thing that I have managed to do is repeat the Learn method using different random seeds for the initial position of the centroid set, until (eventually) a balanced solution is found. Obviously this solution is not optimal at all. Despite the fact that the solutions found are not repeatable and the execution times vary.
Thanks.
The text was updated successfully, but these errors were encountered: