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

Feature Request: Clustering Kmeans (hard and soft version) #69

Open
kenluck2001 opened this issue May 25, 2021 · 2 comments
Open

Feature Request: Clustering Kmeans (hard and soft version) #69

kenluck2001 opened this issue May 25, 2021 · 2 comments
Labels
model request Request for a new model / implementation

Comments

@kenluck2001
Copy link
Contributor

kenluck2001 commented May 25, 2021

There is no clustering apart from the EM for Gaussian mixtures already in the project. Hence, I would like to implement a kmeans algorithm both the hard clustering version which is common and the soft clustering derivation of the kmeans algorithm. Once I get a go-ahead, then I will proceed to raising a PR within the next few days.

The hard version of K-means will follow the implementation in this slide
image

The soft version of K-means will also follow the implementation in this slide
image

I have written up both efficient implementations before checking the contribution guide that specifies that there must be an issue opened. Please give your approval and I will raise the PR right away

@ddbourgin
Copy link
Owner

Thanks for this @kenluck2001! Yes, a K-means clustering model would be a great addition. If you decide to implement both hard and soft variants, I propose you do so within the same KMeans model object (you can choose which version to use via an arg at initialization: cluster_method={'hard', 'soft'}).

Also, as a reminder for each PR, please include tests against a standard implementation of the algorithm to help verify correctness :)

@ddbourgin ddbourgin added the model request Request for a new model / implementation label May 25, 2021
@kenluck2001
Copy link
Contributor Author

I have cleaned the code as well as required tests. The build of the project is hard as it enforces only Python 3.7. My system has lots of dependencies which I don't want to mess up. I will raise PR soon. Here is a snapshot of what to expect in my PR @ddbourgin
WORK.zip

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
model request Request for a new model / implementation
Projects
None yet
Development

No branches or pull requests

2 participants