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

will a cluster with one object be considered as hyper edge ? #198

Open
Pierre-sirris opened this issue Feb 28, 2024 · 1 comment
Open

will a cluster with one object be considered as hyper edge ? #198

Pierre-sirris opened this issue Feb 28, 2024 · 1 comment

Comments

@Pierre-sirris
Copy link

Hello, we are using your library and we have a question regarding its assumptions, to be sure if it's by design or a possible issue.

When constructing hypergraph from clusters of different layers, will a cluster with one object be considered as hyper edge ? In the below figure will red cluster be considered as an edge ?

Screenshot 2024-02-28 at 10 39 39

Consider a scenario where there are 24 objects represented with is ids from 100 to 123. There are two layers

  1. Layer 1 with 7 clusters
  2. Layer 2 with 6 clusters.
    When a hypergraph is constructed for the above setup, ideally number of hyper edges will be equal to total number of clusters (in this case the hypergraph should have 13 hyper edges). But the Kahypar library generates hypergraph with 10 hyper edges.
    When we look at edges for each node, clusters of single object are not considered as edge. In the below figure you can see the clusters of each layer and edges mapped to each cluster.
    In the edge-node mapping you can observe that for objects with ids 114,116,123 their clusters with single element are not considered.
Screenshot 2024-02-28 at 10 40 34

Is this expected ?

@SebastianSchlag
Copy link
Member

Hi @Pierre-sirris,

thanks for reaching out. Your observation is correct. KaHyPar ignores hyperedges that only contain a single vertex. This is by design, because a hyperedge containing a single vertex can never be cut and therefore these hyperedges are not relevant during partitioning - so ignoring them does not impact the partitioning quality.

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

2 participants