Looking for a python sample of either. Constrained K-means (Balanced K-means) Capacitated Clustering (Capacitated K-means) I am looking for a way to set a maximum cluster size for a clustering algorithm.
Hi Emma,
Here are the steps you can follow to set a maximum cluster size for a clustering algorithm:
- Initialization: Randomly select initial centroids.
- Assignment with Constraints: Assign points to the nearest centroid while ensuring balanced or maximum cluster sizes.
- Update Centroids: Recompute the centroids based on the current assignments.
- Iteration: Repeat the assignment and update steps until convergence or a maximum number of iterations is reached.
In addition to this here are some research papers that you might find useful:
Constrained K-Means Clustering
Thanks
Rushda