Node2Vec
node2vec算法Aditya Grover,Jure Leskovec和Vid Kocijan的Python3实现。
安装
pip install node2vec
用法
import networkx as nx
from node2vec import Node2Vec
# Create a graph
graph = nx . fast_gnp_random_graph ( n = 100 , p = 0.5 )
# Precompute probabilities and generate walks - **ON WINDOWS ONLY WORKS
1