k-means-constrained icon indicating copy to clipboard operation
k-means-constrained copied to clipboard

Possible to specify custom distance matrix?

Open amks1 opened this issue 3 years ago • 3 comments

Is it possible with this implementation to cluster using a custom distance matrix?

amks1 avatar Jan 19 '22 17:01 amks1

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

joshlk avatar Jan 19 '22 18:01 joshlk

Thanks. Sorry if this is a dumb question, but are the cluster centers chosen from the set of input points?

amks1 avatar Jan 19 '22 20:01 amks1

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.

bibblybobblyben avatar Nov 22 '23 15:11 bibblybobblyben