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

Feature/attri2vec #470

Merged
merged 83 commits into from Oct 10, 2019
Merged

Feature/attri2vec #470

merged 83 commits into from Oct 10, 2019

Conversation

@daokunzhang
Copy link
Collaborator

daokunzhang commented Aug 8, 2019

In this branch, I implemented the attri2vec model and evaluate its performance in inferring the representations of out-of-sample nodes through the out-of-sample link prediction task.

I made following three changes:

  1. I added the stellargraph/demos/embeddings/stellargraph-attri2vec-DBLP.ipynb file, which shows the work flow for training attri2vec on in-sample subgraphs, and inferring the representations of out-of-sample nodes, following by the out-of-sample link prediction experiments.

  2. I added the attri2vecLinkGenerator class to the stellargraph/stellargraph/mapper/link_mappers.py, which is used to generate batches of (feature of target node, id of context node, label of node pair) lists for training the attri2vec model.

  3. I changed the stellargraph/demos/embeddings/README.md file, by adding the description for the attri2vec demo.

daokunzhang added 3 commits Aug 7, 2019
…e a batch of (feature of target node, index of context node, label of node pair) pairs per iteration, for training the attri2vec model
…on out-of-sample node link prediction.
@daokunzhang

This comment has been minimized.

Copy link
Collaborator Author

daokunzhang commented on ad12870 Aug 8, 2019

Just for testing, please ignore it.

daokunzhang added 8 commits Aug 8, 2019
@daokunzhang daokunzhang requested review from adocherty and PantelisElinas Aug 8, 2019
@CLAassistant

This comment has been minimized.

Copy link

CLAassistant commented Aug 8, 2019

CLA assistant check
All committers have signed the CLA.

@review-notebook-app

This comment has been minimized.

Copy link

review-notebook-app bot commented Aug 8, 2019

Check out this pull request on ReviewNB: https://app.reviewnb.com/stellargraph/stellargraph/pull/470

You'll be able to see notebook diffs and discuss changes. Powered by ReviewNB.

@codeclimate

This comment has been minimized.

Copy link

codeclimate bot commented Aug 8, 2019

Code Climate has analyzed commit e70c557 and detected 12 issues on this pull request.

Here's the issue category breakdown:

Category Count
Complexity 10
Duplication 2

Note: there is 1 critical issue.

View more on Code Climate.

@PantelisElinas

This comment has been minimized.

Copy link
Contributor

PantelisElinas commented Aug 12, 2019

Hi @daokunzhang

please update the code to wrap attri2vec into a layer, write unit tests, and update documentation so we can review.

Regards,

P.

@daokunzhang

This comment has been minimized.

Copy link
Collaborator Author

daokunzhang commented Aug 22, 2019

Hi @PantelisElinas ,

I have made following updates for the code:

  1. Write a Attri2Vec class in file stellargraph/stellargraph/layer/attri2vec.py to wrap attri2vec in a layer, and update the stellargraph/stellargraph/layer/init.py file to help import Attri2Vec from the package stellargraph.layer.

  2. Write a Attri2VecNodeGenerator class at file stellargraph/stellargraph/mapper/node_mappers.py to predict node representations with the learned attri2vec model.

  3. Rewrite the demo file --stellargraph/demos/embeddings/stellargraph-attri2vec-DBLP.ipynb-- with the updated layers and mappers.

  4. Write the unit test for Attri2Vec class at file stellargraph/tests/layer/test_attri2vec.py, the unit test for Attri2VecLinkGenerator at file stellargraph/tests/test_linkmappers.py, the unit test for Attri2VecNodeGenerator at file stellargraph/tests/test_nodemappers.py

  5. Update the stellargraph/docs/api.txt file to add the index to the new added class: Attri2Vec, Attri2VecLinkGenerator, Attri2VecNodeGenerator.

Best regards!
Daokun

@daokunzhang daokunzhang force-pushed the feature/attri2vec branch from 2bac75a to 63f0a3b Oct 1, 2019
@daokunzhang

This comment has been minimized.

Copy link
Collaborator Author

daokunzhang commented Oct 1, 2019

Hi @PantelisElinas,

Please check the latest update. I have fixed the typos and added the unit test for the get_index_for_nodes function. I also deleted the attri2vec DBLP embedding learning and node classification demos.

If you need more changes, please let me know.

Best regards!
Daokun

@PantelisElinas PantelisElinas added the ml label Oct 9, 2019
Copy link
Contributor

PantelisElinas left a comment

Hi @daokunzhang

I think it looks ok and we should merge into develop.

What do you think @youph?

Regards,

P.

@PantelisElinas PantelisElinas merged commit f2f6c99 into develop Oct 10, 2019
3 checks passed
3 checks passed
buildkite/stellargraph Build #1593 passed (20 minutes, 58 seconds)
Details
coverage/coveralls First build on feature/attri2vec at 85.14%
Details
license/cla Contributor License Agreement is signed.
Details
@youph youph deleted the feature/attri2vec branch Nov 4, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
3 participants
You can’t perform that action at this time.