harthur / clustering

K-means and hierarchical clustering
http://harthur.github.com/clustering/demos/colors
MIT License
498 stars 92 forks source link

A couple of things I'd like to add #6

Open icambron opened 10 years ago

icambron commented 10 years ago

I have two features I'd like to add to hcluster, but I thought I'd run them by you before I ran off and built them. They are:

  1. Make it possible to directly provide my own distance matrices, instead of the features and distance measure. One thing I really like about hierarchical clustering is that you can use sets of distances that don't make sense in any space, so I'd like to leverage that like I can in SciPy. I'd love a suggestion on what the interface should look like though.
  2. Add Ward's linkage as a linkage option. The complication there is that it doesn't fit neatly into the existing code because it can't be computed for each cluster independently. (Also it looks hard and I'm bad at math, but I'll get there.)

What do you think?

harthur commented 10 years ago

These both sound awesome of course. I'm getting an API change request in #5 too, so I'll have to think a second about how it should look.