diffeo / kodama

Fast hierarchical agglomerative clustering in Rust.
MIT License
91 stars 11 forks source link

Stop conditions #13

Closed Vagab closed 6 months ago

Vagab commented 6 months ago

Hi. I've been trying to use kodama and it's awesome in everything so far, thank you for this great library.

One thing I would love to see is something like stop conditions. To elaborate, here's an example of what linfa does to limit the number of steps. Now, my use case might be very contrived but we require a cluster to have a maximum size and that's currently not possible from what I saw.

As a reference, I think scipy allows you to just get a tree and do whatever with it. Not sure if that's something that would work here.

If that feature is something that you agree would be beneficial I can try to write something

BurntSushi commented 6 months ago

See: https://github.com/diffeo/kodama/issues/12#issuecomment-2090228505