-
Notifications
You must be signed in to change notification settings - Fork 33
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
weighted projection of hypergraphs #534
Comments
Thanks for this comment, @Liyubov! We have a few options for weighted matrices (See the linalg section). It looks like NetworkX can convert weighted matrices to graphs with a |
@nwlandry I was thinking of not going through networkx, as if you go through networkx then it is essentially becomes not the higher-order feature anymore, but feature of the projection. the linalg section is great, and using it we can generated the initialy non-projected version using operations on tensor, we try to develop similar things here when we load and associate the tensor to the hypergraph and then make all operations with it... the difficulty with this approach is that it is actually then slow in python. so python may not be best? |
Hi @Liyubov thanks for the suggestion. What exact object would you like to see implemented with weights? We already have have NxN adjacency matrices at each order, optionally with weights for example: https://xgi.readthedocs.io/en/stable/api/linalg/xgi.linalg.hypergraph_matrix.html#xgi.linalg.hypergraph_matrix.adjacency_matrix Were you thinking of something like this? |
Hi @maximelucas there were several ideas regarding this. First and the main is that if we have weighted hypergraph, then when you are projecting it, depending on the type of projection you choose you can get various weights of the corresponding projected hypergraph. The idea of the method we wanted to propose develop further some ideas from this paper https://www.mdpi.com/1099-4300/25/6/923 We are currently working on trying to distinguish several types of projections of hypergraphs e.g. using line-graph projection of weighted hypergraph vs. clique-projection of weighted graph, which both bring two different results. Happy to explain more. |
Hi @Liyubov, thanks for the precisions! Maybe the easiest towards implementations is if you wanted to submit a PR and we take a look? If you prefer, you could also first share here a plan: how many different projections, in how many functions, with what specificities. Maybe we can then see how the existing functions could be used to implement those. |
As is shown here (already for unweighted graphs) If I understand well the description (correct me if I am wrong @maximelucas ) this matrix representation of hypergraph is not distinguishing between line graph and clique graph projections https://xgi.readthedocs.io/en/stable/api/linalg/xgi.linalg.hypergraph_matrix.html#xgi.linalg.hypergraph_matrix.adjacency_matrix We are developing more code and explanations here https://github.com/Liyubov/hypergraph_distances |
We have been discussing this with Nicholas briefly.
@nwlandry
At the moment there is one way to make the projection of the hypergraph:
https://xgi.readthedocs.io/en/stable/_modules/xgi/convert/graph.html
But when you want to really compare some higher-order properties of hypergraphs (even paths properties), you will need to look and make some weighted projections of hypergraphs.
There are some algorithms available for this, and I am happy to help with implementing them or discussing if you think this is something which can already be derived from your existing functionalities :)
The text was updated successfully, but these errors were encountered: