agglom_cluster icon indicating copy to clipboard operation
agglom_cluster copied to clipboard

Impose constraints on clustering

Open ghost opened this issue 5 years ago • 2 comments

Hi, Thanks for sharing this resource. I am just wondering if the module can impose some constraints on the cluster. Similar to "force certain nodes to always be clustered together" but the reverse. That is, forcing certain nodes not to be clustered together. Thanks

ghost avatar Jun 02 '20 23:06 ghost

This would be a good feature for the library imo.

The way I tackled this before was to pre-emptively cut, or decrease edge weights (sometimes to negative values), between nodes that I didn't want connected. Even though your neighbor of your neighbor might be connected, causing a grouping to include both of said nodes, it was the best way to adjust the model to represent "these two distinct items are unrelated" so that larger grouping might be a higher level concept that encompasses the two distinct sub-concepts if the grouping is large enough.

Another way to achieve a similar effect is to extend the class and overwrite quality_difference to account for disinterested elements.

To make it truly force unique clusters the combine_clusters method would need to be changed to account for this.

MSeal avatar Jun 03 '20 20:06 MSeal

thanks for your detailed response. I will look into it.

ghost avatar Jun 03 '20 23:06 ghost