gasteigerjo / ppnp

PPNP & APPNP models from "Predict then Propagate: Graph Neural Networks meet Personalized PageRank" (ICLR 2019)
https://www.daml.in.tum.de/ppnp
MIT License
317 stars 54 forks source link

How to use this project for my own data #11

Closed 2danlin closed 3 years ago

2danlin commented 3 years ago

Besides, could you please tell me how to use this project for my own data? Specifically, what is the format of the data provided by you? Thank you so much.

gasteigerjo commented 3 years ago

The models as used in simple_example_pytorch.ipynb use a SparseGraph. This class is just a simple Python class wrapping NumPy matrices or sparse SciPy CSR matrices. The class description explains how to use this with your own data.

Alternatively, you can use the networkx_to_sparsegraph function to convert a NetworkX graph to a SparseGraph.