Thanks!
Thanks!
Specifically this is work related to implementing large dataset support for the dedupe library[1]. It's valuable to be able to effectively de-duplicate messy datasets. That's about as much as I can share.
1. https://numpy.org/doc/stable/reference/generated/numpy.uniqu...
2. https://github.com/dedupeio/dedupe/blob/main/dedupe/clusteri...
The steps to the solution are something like:
- I need all distinct elements of X
- Oh, that's a quotient set (the partition) of X by a/the equivalence relation (`==`)
- so my algorithm must be reflexive (yeah, trivially), symmetric (not so helpful) and transitive - now this I can use (together with the symmetry)
It's generally easier if you know beforehand that it must be e.g. transitive.
Intuitively this doesn't make sense to me. You have a tree that has N leaves, and you have to perform a merge for each parent. There are however N-1 parents, so you'll still perform O(N) merges.