FastGCN
FastGCN copied to clipboard
Error in transformRedditGraph2NPZ.py
I download the reddit data from snap and unzip it, and run
python transformRedditGraph2NPZ.py
Then it shows the following error message.
Traceback (most recent call last): File "transformRedditGraph2NPZ.py", line 69, in
transferRedditDataFormat("reddit","reddit.npz") File "transformRedditGraph2NPZ.py", line 46, in transferRedditDataFormat train_ids = [n for n in G.nodes() if not G.node[n]['val'] and not G.node[n]['test']] File "transformRedditGraph2NPZ.py", line 46, in train_ids = [n for n in G.nodes() if not G.node[n]['val'] and not G.node[n]['test']] KeyError: 'val'
Is there a bug? Or is it because of other issues? Thanks.
Probably due to the data difference. There is no "val" feature in your data. I believe you can solve it by editing some part of the codes. Thanks.
I think this is due to networkx version and fix it by degrading to networkx 1.10.0, as mentioned in #3
thanks ZW-ZHAGN
If anyone directly use transformRedditGraph2NPZ.py feats[:, 0] = np.log(feats[:, 0] + 1.0) should be midified