error in node2vec fit
See original GitHub issueHello,
I ran the commands using the default data in the package and get the following error in the embed node step in the node2vec.fit
step
import networkx as nx
from node2vec import Node2Vec
graph = nx.fast_gnp_random_graph(n=100, p=0.5)
node2vec = Node2Vec(graph, dimensions=64, walk_length=30, num_walks=200, workers=4)
model = node2vec.fit(window=10, min_count=1, batch_words=4)
error
--------------------------------------------------------------------------- TypeError Traceback (most recent call last) <ipython-input-1-66dd459dbca1> in <module> 9 10 # Embed nodes ---> 11 model = node2vec.fit(window=10, min_count=1, batch_words=4) ~/anaconda3/envs/default/lib/python3.8/site-packages/node2vec/node2vec.py in fit(self, **skip_gram_params) 181 skip_gram_params['sg'] = 1 182 --> 183 return gensim.models.Word2Vec(self.walks, **skip_gram_params) TypeError: __init__() got an unexpected keyword argument 'size'
I have installed the required packages. Is there any step I missed?
Would appreciate a response!
Thank you!
Issue Analytics
- State:
- Created 2 years ago
- Reactions:3
- Comments:5 (2 by maintainers)
Top GitHub Comments
Yes, gensim has changed their interface, you can wither downgrade gensim to version less than 4 or wait for the weekedn and I’ll fix it as I noted in #59
Solved in 4.2.0