aditya-grover / node2vec

http://snap.stanford.edu/node2vec/
MIT License
2.61k stars 912 forks source link

node2vec on Zachary's karate club network #23

Closed saimmehmood closed 6 years ago

saimmehmood commented 6 years ago

After running the following command: python src/main.py --input graph/karate.edgelist --output emb/karate.emd

I am receiving this error: Walk iteration: 1 / 10 2 / 10 3 / 10 4 / 10 5 / 10 6 / 10 7 / 10 8 / 10 9 / 10 10 / 10 Traceback (most recent call last): File "src/main.py", line 104, in main(args) File "src/main.py", line 100, in main learn_embeddings(walks) File "src/main.py", line 87, in learn_embeddings model = Word2Vec(walks, size=args.dimensions, window=args.window_size, min_count=0, sg=1, workers=args.workers, iter=args.iter) TypeError: init() got an unexpected keyword argument 'iter'

tarunkumariitm commented 6 years ago

In src/main.py change line #87 to: model = Word2Vec(walks, size=args.dimensions, window=args.window_size, min_count=0, sg=1, workers=args.workers)

After that, add the following line: model.iter = args.iter

saimmehmood commented 6 years ago

Thank you @tarunkumariitm