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

Default weight to 1 for unweighted graph during n2v #789

Merged
merged 13 commits into from Jun 23, 2021

Conversation

nicaurvi
Copy link
Contributor

@nicaurvi nicaurvi commented May 18, 2021

  • Does this PR add any new dependencies?
  • Does this PR modify any existing APIs?
    • Is the change to the API backwards compatible?
  • Have you built the documentation (reference and/or tutorial) and verified the generated documentation is appropriate?

Reference Issues/PRs

What does this implement/fix? Briefly explain your changes.

Embedding methods should handle unweighted graphs by defaulting the weight to 1. N2v was not behaving in the same way as the spectral methods -- this PR will fix that.

Closes #800

Any other comments?

I also added an explicity list() when returning the labels with a corresponding test as networkx graph.nodes() returns a NodeView rather than a list.

@nicaurvi nicaurvi self-assigned this May 18, 2021
@netlify
Copy link

netlify bot commented May 18, 2021

❌ Deploy Preview for graspologic failed.

🔨 Explore the source changes: ef55b46

🔍 Inspect the deploy log: https://app.netlify.com/sites/graspologic/deploys/60d23d86834b26000741f48c

@nicaurvi nicaurvi requested a review from daxpryce May 18, 2021 19:17
graspologic/utils/utils.py Outdated Show resolved Hide resolved
graspologic/embed/n2v.py Outdated Show resolved Hide resolved
@nicaurvi nicaurvi requested a review from daxpryce May 18, 2021 20:58
@nicaurvi nicaurvi linked an issue Jun 21, 2021 that may be closed by this pull request
@nicaurvi nicaurvi requested a review from daxpryce June 21, 2021 20:48
@nicaurvi nicaurvi requested a review from daxpryce June 22, 2021 19:11
@nicaurvi nicaurvi merged commit c266aa3 into dev Jun 23, 2021
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.

[BUG] type error when running node2vec_embed
2 participants