cynricfu / MAGNN

Metapath Aggregated Graph Neural Network for Heterogeneous Graph Embedding
398 stars 69 forks source link

what does etype_list mean? #42

Closed chengchuncc closed 8 months ago

chengchuncc commented 1 year ago

when I run the run_DBLP, I am confused what does "etypes_list = [[0, 1], [0, 2, 3, 1], [0, 4, 5, 1]]" mean. I see the closed question #5. But I also want to know where the code define the edge index number.

cynricfu commented 1 year ago

It is kind of hard-coded following some rules. For DBLP, the node types author, paper, term, conference are indexed as 0, 1, 2, 3, respectively, as in preprocess_DBLP.ipynb. Therefore, the edge types are indexed as below following the order. 0 represents author-paper 1 represents paper-author 2 represents paper-term 3 represents term-paper 4 represents paper-conference 5 represents conference-paper