-
Notifications
You must be signed in to change notification settings - Fork 6
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
Edgelist #5
Comments
There might be two possible solutions:
If the solution 2 is still not working, could you please paste your edge list here? e.g., the first 10 lines of your edge list. |
I did changed the graph-format to edgelist. Below is the edgelist |
Please see my attempt below:
Note that, if you run an Attributed Network Embedding (ANE) method, e.g., '-method abrw', you should also provide the corresponding attributes. Otherwise, you may get the error message as you provided above.
Note that, you may need to set '--ABRW-topk 5', because the graph is too small. The number specified here should be larger than the number of nodes in the graph. |
Thank you for the detailed code and explanation. I tried using it with the provided edge list and attribute list. I believe what caused the error is that I tried to add attributes to nodes that are not in my edgelist |
I tried to run the ABRW method by creating the graph using edgelist. But I encountered an error when reading the attribute file
self.g_u.read_node_attr(attribute_file) File "\model\libnrl\graph.py", line 83, in read_node_attr self.G.nodes[vec[0]]['attr'] = np.array([float(x) for x in vec[1:]]) File "C:\Users\Administrator\Anaconda3\lib\site-packages\networkx\classes\reportviews.py", line 178, in __getitem__ return self._nodes[n] KeyError: '98'
But the code works fine when I used adjacency list to create the graph. Do you have any suggestion
The text was updated successfully, but these errors were encountered: