Skip to content
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

Bugfix: use subjects.index to generate node embeddings #1665

Merged
merged 1 commit into from Jun 10, 2020

Conversation

daokunzhang
Copy link
Contributor

@daokunzhang daokunzhang commented Jun 10, 2020

In the demo notebook demos/embeddings/keras-node2vec-embeddings.ipynb, demos/node-classification/attri2vec-node-classification.ipynb, demos/node-classification/keras-node2vec-node-classification.ipynb, node embeddings are generated by passing G.nodes() into the node generator. For example, in demos/embeddings/keras-node2vec-embeddings.ipynb, node embeddings are generated as

node_gen = Node2VecNodeGenerator(G, batch_size).flow(G.nodes())
node_embeddings = embedding_model.predict(node_gen, workers=4, verbose=1)

Though the order of G.nodes() is consistent with subjects, it is more desirable to use subjects.index to generate node embeddings to avoid confusing readers.

In this pull request, I replace the G.nodes() with subjects.index in the above three demo notebooks.

@review-notebook-app
Copy link

Check out this pull request on  ReviewNB

Review Jupyter notebook visual diffs & provide feedback on notebooks.


Powered by ReviewNB

@codeclimate
Copy link

codeclimate bot commented Jun 10, 2020

Code Climate has analyzed commit e0084b1 and detected 0 issues on this pull request.

View more on Code Climate.

@daokunzhang daokunzhang merged commit cf66dd8 into develop Jun 10, 2020
@daokunzhang daokunzhang deleted the bugfix/subject_index branch June 10, 2020 03:38
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants