下載正常安裝GraphVite不容易,如果你可以輕鬆安裝,的確是運氣很好。需要gcc版本,conda版本,機器環境剛好與作者相符合纔行。
然後運行,基本的示例
graphvite baseline quick start
如果PyTorch版本太低,會報錯
AttributeError: module 'torch' has no attribute ‘as_tensor'
如果PyTorch版本過高,會報錯
The NVIDIA driver on your system is too old (found version 10000).
正常情況:
------------- link prediction --------------
effective edges: 6644 / 6650
effective filter edges: 327429 / 327429
remaining edges: 6644 / 6644
AUC: 0.902055
[time] GraphApplication.evaluate: 5.94148 s
macro-F1@20%: 0.248511
micro-F1@20%: 0.394835
[time] GraphApplication.evaluate: 26.2803 s
save embeddings and name mappings to `line_blogcatalog.pkl`
[time] GraphApplication.save: 0.0316839 s
可以見到以20%數據做預測,效果還是不錯的,和論文基本一致。
數據是放在:xxx是你的user_name下面
/home/xxx/.graphvite/dataset/