Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Has node2vec implementation been updated to use skip-gram as default? #44

@amjass12

Description

@amjass12

Hi!,

Related to #40

I was wondering if node2vec now uses skip-gram by default (I cannot see it anywhere in the source code, but i am sure i am missing it!!)

If it hasn't, does the following line of code automatically set sg=1 if i add this?

n2v = Node2Vec(n_components=32, walklen=80, epochs=100, keep_walks=True, w2vparams={'sg':1}) 
n2v.fit(nx_graph)

I want to be sure this is correct, as when i set {'sg': 50} (just a very silly example to invoke an error), no error is thrown - and so I wonder if w2vparams={'sg':1} is actually selecting skip-gram instead of CBOW or if I am doing something incorrectly. Any advice (or the right way to do it) is appreciated :)

Secondly: instead of saving embeddings and then loading them as keyedvectors with word2vec - is there a way of converting the fitted object (n2v above) directly to a Word2Vec gensim object?

Thank you!

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions