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

weighted projection of hypergraphs #534

Open
Liyubov opened this issue Apr 18, 2024 · 2 comments
Open

weighted projection of hypergraphs #534

Liyubov opened this issue Apr 18, 2024 · 2 comments

Comments

@Liyubov
Copy link

Liyubov commented Apr 18, 2024

We have been discussing this with Nicholas briefly.
@nwlandry

At the moment there is one way to make the projection of the hypergraph:

  • the projection is unweighted graph, which essentially makes sense when you want to analyze some structural properties of hypergraphs but not all of them:

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 :)

@nwlandry
Copy link
Collaborator

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 weight attribute --- is this what you were picturing? If you have an idea for the particular matrix (The clique motif matrix, for example) we can easily add the option to output this as a weighted graph. Great idea and thanks for the suggestion!

@Liyubov
Copy link
Author

Liyubov commented Apr 23, 2024

@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...

https://github.com/Liyubov/hypergraph_structures/blob/main/code%20notebooks/hyper_graph_motif_counting_rewriting_numpy_ipynb_txt.ipynb

the difficulty with this approach is that it is actually then slow in python. so python may not be best?

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