-
Notifications
You must be signed in to change notification settings - Fork 22
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
Question on the feature format for generated samples of ENZYMES dataset #11
Comments
Hi lizaitang, In our work, we used the degree of each node as the node features instead of the given node features of the original dataset. In order to use the node features of the original dataset, you can modify the code in Line 6 in 4d96334
Line 43 in 4d96334
for loading the node features of the dataset. After changing these, you could newly train the score models to generate both node features and the adjacency matrices. |
Dear Author, thank you very much for your quick reply! How can we modify the code to load node feature of the dataset? Change the init to zeros or ones? Or we dirrectly change x_tensor = init_features(config.data.init, adjs_tensor, config.data.max_feat_num) to the feature of the dataset?
|
You can change Line 43 in 4d96334
to take in graph_list as input and return the node features.To be specific, each graph in the graph_list is a networkx Graph with node features.
Or you could directly modify Line 6 in 4d96334
to obtain the original node features from the networkx Graph. Please refer to the networkx documentation for more details. FYI, the attributed graphs of the ENZYMES dataset are loaded by this function: |
Dear Author,
|
In the graph loader code: Line 131 in 4d96334
The node labels you are looking for are saved in g.nodes.data('label') (saved by Line 158 G.add_node(i + 1, label=data_node_label[i]) )
You may want to try |
Thanks for your reply, but if I want to generate graph with same format node features, shouldn't we use the feature instead of node labels? |
I think the node features you want to use for the classifier are contained in the label. |
Sorry to bother, but I try label, ```
|
First of all, the label contains other values other than 2 (please see https://github.com/harryjo97/GDSS/blob/master/dataset/ENZYMES/ENZYMES_node_labels.txt) Furthermore, if you want to use the node attributes in https://github.com/harryjo97/GDSS/blob/master/dataset/ENZYMES/ENZYMES_node_attributes.txt, Line 266 in 4d96334
by setting the node_attributes=True which will load the node attributes file bydata_node_att = np.loadtxt(path + name + '_node_attributes.txt', delimiter=',') in Line 131 in 4d96334
|
Dear Author, you paper really helps a lot, but I have a question that I want to pass the generated graph to some classifiers, but seems the node features generated by the GDSS is different from the original dataset in data scale. How can I solve it? Thanks
The text was updated successfully, but these errors were encountered: