Skip to content

feat: implement Node2Vec #484

@rjurney

Description

@rjurney

There is an implementation of node2vec in the Apache 2 licensed project mercury-graph that is based on Spark MLlib Word2Vec. It works well when I test it on a few million nodes / edges, with Java 11 and 8 dimensions to the embedding, Spark 3.5.4 and GraphFrames 0.8.3.

The class mercury.graph.embeddings.SparkNode2Vec has a simple implementation that I want to copy and attribute to bring a GraphFrame.node2vec() method to GraphFrames. I will probably rewrite the code so it isn't a direct copy, but it looks like the simplest implementation possible and there is no reason to reproduce it.

Node2Vec will be a powerful feature of

The alternative method would be to pull the Mercury Graph project into GraphFrames and have a graphframes.mercury module that can call its methods. I prefer to copy / edit at this point, although a discussion with the Mercury team might be productive here.

Feedback appreciated :)

Metadata

Metadata

Labels

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions