When retrieving clusters with the first-k method, there is some surprising behavior for edge cases.
- If there are more root nodes than
k, all roots are returned as clusters, so there are more than k clusters.
- If there are fewer than 'k', each leaf is a cluster, but this still leaves fewer than 'k' clusters.
The solution is probably to simply warn the user when the number of clusters returned isn't exactly 'k'.
When retrieving clusters with the
first-kmethod, there is some surprising behavior for edge cases.k, all roots are returned as clusters, so there are more than k clusters.The solution is probably to simply warn the user when the number of clusters returned isn't exactly 'k'.