Creating my Own Dataset #4461
-
Hello, I just have a question on how to create my own dataset. What i have is a MATLAB .mat file which contains the following struct: A = each cell contains an adjacency matrix That is it, i do not have any more features then that; 43,000 graphs, node labels, and a corresponding graph label. My original path was to run a for loop and convert each graph to networkx:
And then
And then of course have a separate series or list for the graph labels. Then I would perform a for loop and convert each using
From the data that i have, is this the best way to do that? I want the best format for my data to have PyG be successful in this endeavor, because Stellargraph failed in this attempt. I am trying to perform a regression where x = a graph, and y = the label. If i have to do 2 classes thats fine, but i would like to attempt this first. Please help! Thank you in advance. |
Beta Was this translation helpful? Give feedback.
Replies: 2 comments 5 replies
-
One issue with the current approach is that you are using integers as features, while NNs require features of floating point type. As such, I recommend to convert your feature index to a one-hot representation via |
Beta Was this translation helpful? Give feedback.
-
So I think i figured out the first challenge
Where
Is there a way to convert this to a dataset that i can save and not have to constantly do this? |
Beta Was this translation helpful? Give feedback.
So I think i figured out the first challenge
Where
tg_graphs
is: