k-means-constrained
k-means-constrained copied to clipboard
Possible to specify custom distance matrix?
Is it possible with this implementation to cluster using a custom distance matrix?
No it does not. But if you want to hack your own solution you can try changing this line: https://github.com/joshlk/k-means-constrained/blob/eda40741431286a71bff72c59077287d1376fd31/k_means_constrained/k_means_constrained_.py#L402
Thanks. Sorry if this is a dumb question, but are the cluster centers chosen from the set of input points?
Hi - thanks for your work building this package. I have also come across the question of trying to implement a custom distance metric in the clustering so have opened a PR to address it. Happy to be corrected if this is not a desirable change in the main package.