[QST] KmeansPlusPlus Should Scale Probabilities by Sample Weights
Nobody has claimed this yet.
- Dominant language
- Cuda
- Stars
- 854
- Forks
- 236
- Avg merge
- 3d 3h
- Merged PRs (30d)
- 62
Description
It looks like KMeansPlusPlus initialization does not account for the sample weights while sampling centroids. We might need to add the appropriate scaling factor to correctly account for points' importances.
Corresponding line in scikit-learn where the scaling is done:
https://github.com/scikit-learn/scikit-learn/blob/2ff996e74ec4c4ab27208f9a67cba42a8c97833b/sklearn/cluster/_kmeans.py#L263
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Locate the KMeansPlusPlus initialization and compare its centroid-sampling behavior with the linked scikit-learn implementation, especially the referenced scaling line. Confirm the change by checking that sample weights affect centroid sampling probabilities as intended.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- scikit-learn
- Domain
- machine-learning
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 45/100