Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Impose constraints on clustering #18

Open
ghost opened this issue Jun 2, 2020 · 2 comments
Open

Impose constraints on clustering #18

ghost opened this issue Jun 2, 2020 · 2 comments

Comments

@ghost
Copy link

ghost commented Jun 2, 2020

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

@MSeal
Copy link
Owner

MSeal commented Jun 3, 2020

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.

@ghost
Copy link
Author

ghost commented Jun 3, 2020

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant