Join GitHub today
GitHub is home to over 28 million developers working together to host and review code, manage projects, and build software together.Sign up
WIP: Assign streamlines to an existing cluster map via QuickBundles #723
When there are just too many streamlines, you might want to only cluster a subset of those then assign the rest to their nearest cluster. To do so, we needed a way to assign streamlines to an existing
@Garyfallidis we have some decisions to make regarding this PR.
I don't like the way streamlines assignation is done right now.
qb = QuickBundles(threshold=12) clusters = qb.cluster(streamlines) # Use existing clusters to group `other_streamlines` # Note: `new_clusters` won't contain any element from `streamlines`. new_clusters = qb.assign(clusters, other_streamlines)
Maybe something like this, would be more user-friendly?
qb = QuickBundles(threshold=12, metric=some_metric) clusters = qb.cluster(streamlines) # Use existing clusters to assign `other_streamlines` to existing `clusters`. # Note: `new_clusters` *will* contain all elements from both `streamlines` and `other_streamlines`. clusters.assign(streamlines, metric=some_metric)