-
Notifications
You must be signed in to change notification settings - Fork 247
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
error in node2vec fit #60
Comments
I had the same error. Waiting for a response! |
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 |
Downgrade gensim to 3.8.3 works. |
I would wait for the fix. Thanks very much for looking into it! |
Solved in 4.2.0 |
TypeError: Word2Vec.init() got an unexpected keyword argument 'size' with node2vec 4.6 |
Can you tell me which
|
Fix for that is as follows. Replace the variable names in the Word2Vec call:
|
Before validating a fix, I want to reproduce, can you tell me with which version of |
Sorry about that :-D I was using: gensim 4.2.0 but encountered the problem while working with the struc2vec repo here. Basically a fork of your latest and then tried to get everything working in Python3 with the pr from @steenfatt. This is the link to the gensim 4.2.0 word2vec.py. |
I'll try to check it out in the weekend |
I can't find time to do this, I'd appreciate if anyone wants to contribute through a PR @MikeB2019x @p-dre |
I can do that.
<http://mindbridge.ai/>
Michael Bourassa
Data Scientist | *MindBridge*
+1 613-894-9189 <+1-613-894-9189>
Bourassa
mindbridge.ai
[image: twitter] <https://twitter.com/mindbridge_ai>
[image: linkedin] <https://www.linkedin.com/company/mindbridge-ai/>
[image: banner]
<https://www.mindbridge.ai/news/mindbridge-named-to-forbes-ai-50-list-of-most-promising-ai-companies>
…On Wed, Apr 12, 2023 at 2:53 AM Elior Cohen ***@***.***> wrote:
I can't find time to do this, I'd appreciate if anyone wants to contribute
through a PR @MikeB2019x <https://github.com/MikeB2019x> @p-dre
<https://github.com/p-dre>
—
Reply to this email directly, view it on GitHub
<#60 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/ALV3V75KJ5TLOS56ARVLG5LXAZGQPANCNFSM42DV7BSQ>
.
You are receiving this because you were mentioned.Message ID:
***@***.***>
|
@MikeB2019x I'd love to accept it! |
Hello,
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
stepimport 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!
The text was updated successfully, but these errors were encountered: