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

如何加入节点特征呢 #1

Open
ZhongFa1999 opened this issue Oct 14, 2022 · 3 comments
Open

如何加入节点特征呢 #1

ZhongFa1999 opened this issue Oct 14, 2022 · 3 comments

Comments

@ZhongFa1999
Copy link

非常感谢您的贡献,如果我将数据集从MUTAG换成PROTEINS,如何将node_attributes加入数据集呢?再次感谢!

@bright2311
Copy link
Owner

非常感谢您的贡献,如果我将数据集从MUTAG换成PROTEINS,如何将node_attributes加入数据集呢?再次感谢!

From Line 256 int the main code,
X, A, labels = data
X represents node feature matrix and A adjacency matrix .

I think this tip would help you.

Give me a reply If it works.

@ZhongFa1999
Copy link
Author

图片
Sorry, I didn't express my meaning clearly. I want to use GAT on other data sets, such as PROTEINS. There are "PROTEINS_node_attributes.txt" in this dataset, I want to add it to the training in the graph to improve the training effect. How to modify the "load_data" function to add it to the graph. That's my confusion .Thanks!

@bright2311
Copy link
Owner

I think you should modidy Line 81-87.

Read the node features from "PROTEINS_node_attributes.txt" and assign them to the corresponding nodes in order.

Gs[node2graph[c] - 1].add_node(c, attr_dict=node_label)

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