Skip to content

Commit

Permalink
Feature/node2vec for issue Word2Vec in StellarGraph stellargraph#255 (s…
Browse files Browse the repository at this point in the history
…tellargraph#536)

This adds Node2Vec as an officially supported algorithm in StellarGraph using components within the library instead of the external library `gensim`.

The new implementation is in tensorflow/keras which allows for Node2Vec to be used in a similar way as other stellargraph pipelines, and in combination with other keras layers.

This adds...

Two new generator classes for use with a Node2Vec pipeline:
* `Node2VecNodeGenerator`
* `Node2VecLinkGenerator`

A new keras layer class for Node2Vec:
* `Node2Vec`

And two new demo notebooks:
* `keras-node2vec-node-classification`
* `keras-node2vec-embeddings`

Follow-up to address some documentation tweaks stellargraph#1534 

See stellargraph#255 

Co-authored-by: Yuriy Tyshetskiy <yuriy.tyshetskiy@data61.csiro.au>
Co-authored-by: kevin <kevin.jung@data61.csiro.au>
  • Loading branch information
3 people authored May 7, 2020
1 parent edcb8d9 commit 318cd9c
Show file tree
Hide file tree
Showing 24 changed files with 2,004 additions and 18 deletions.
3 changes: 3 additions & 0 deletions .buildkite/notebook-parameters.yml
Original file line number Diff line number Diff line change
Expand Up @@ -20,3 +20,6 @@ embedding_dimension: 5
# training of fewer models for demos/graph-classification/supervised-graph-classification.ipynb
folds: 2
num_restarts: 2
# a small number of random walks for demos/embeddings/stellargraph-keras-node2vec.ipynb
# and demos/node-classification/node2vec/stellargraph-keras-node2vec-node-classification.ipynb
walk_number: 2
2 changes: 1 addition & 1 deletion .buildkite/pipeline.yml
Original file line number Diff line number Diff line change
Expand Up @@ -83,7 +83,7 @@ steps:
<<: *timeout
key: "test-notebooks"
depends_on: "runner-3_6"
parallelism: 47
parallelism: 49
command: ".buildkite/steps/test-demo-notebooks.sh"
plugins:
<<: *plugins
Expand Down
13 changes: 13 additions & 0 deletions demos/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -210,6 +210,19 @@ These demos are displayed with detailed descriptions in the documentation: https
<td></td>
<td></td>
</tr>
<tr>
<td>Keras-Node2Vec</td>
<td></td>
<td></td>
<td></td>
<td></td>
<td></td>
<td><span title='via embedding vectors'><a href='node-classification/keras-node2vec-node-classification.ipynb'>via unsup.</a></span></td>
<td></td>
<td><a href='embeddings/keras-node2vec-embeddings.ipynb'>demo</a></td>
<td></td>
<td></td>
</tr>
<tr>
<td>Metapath2Vec</td>
<td>yes</td>
Expand Down
1 change: 1 addition & 0 deletions demos/embeddings/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@ These demos are displayed with detailed descriptions in the documentation: https
| [Node representation learning with Deep Graph Infomax](https://stellargraph.readthedocs.io/en/stable/demos/embeddings/deep-graph-infomax-embeddings.html) | [source](deep-graph-infomax-embeddings.ipynb) |
| [Node representation learning with GraphSAGE and UnsupervisedSampler](https://stellargraph.readthedocs.io/en/stable/demos/embeddings/graphsage-unsupervised-sampler-embeddings.html) | [source](graphsage-unsupervised-sampler-embeddings.ipynb) |
| [Node representations with GraphWave](https://stellargraph.readthedocs.io/en/stable/demos/embeddings/graphwave-embeddings.html) | [source](graphwave-embeddings.ipynb) |
| [Node2Vec representation learning with Stellargraph components](https://stellargraph.readthedocs.io/en/stable/demos/embeddings/keras-node2vec-embeddings.html) | [source](keras-node2vec-embeddings.ipynb) |
| [Node representation learning with Metapath2Vec](https://stellargraph.readthedocs.io/en/stable/demos/embeddings/metapath2vec-embeddings.html) | [source](metapath2vec-embeddings.ipynb) |
| [Node representation learning with Node2Vec](https://stellargraph.readthedocs.io/en/stable/demos/embeddings/node2vec-embeddings.html) | [source](node2vec-embeddings.ipynb) |
| [Node representation learning with Watch Your Step](https://stellargraph.readthedocs.io/en/stable/demos/embeddings/watch-your-step-embeddings.html) | [source](watch-your-step-embeddings.ipynb) |
Expand Down
Loading

0 comments on commit 318cd9c

Please sign in to comment.