weighted-metapath2vec

Weighted Metapath2Vec Graph Embedding

https://github.com/morteza/weighted-metapath2vec

Science Score: 57.0%

This score indicates how likely this project is to be science-related based on various indicators:

  • CITATION.cff file
    Found CITATION.cff file
  • codemeta.json file
    Found codemeta.json file
  • .zenodo.json file
    Found .zenodo.json file
  • DOI references
    Found 1 DOI reference(s) in README
  • Academic publication links
  • Committers with academic emails
  • Institutional organization owner
  • JOSS paper metadata
  • Scientific vocabulary similarity
    Low similarity (11.1%) to scientific vocabulary

Keywords

graph-embedding machine-learning random-walk
Last synced: 6 months ago · JSON representation ·

Repository

Weighted Metapath2Vec Graph Embedding

Basic Info
  • Host: GitHub
  • Owner: morteza
  • License: mit
  • Language: Python
  • Default Branch: main
  • Homepage:
  • Size: 38.1 KB
Statistics
  • Stars: 5
  • Watchers: 1
  • Forks: 1
  • Open Issues: 0
  • Releases: 1
Topics
graph-embedding machine-learning random-walk
Created almost 4 years ago · Last pushed over 3 years ago
Metadata Files
Readme License Citation

README.md

Weighted-Metapath2Vec

Weighted-Metapath2Vec is a Python package for embedding heterogeneous graphs. It uses a weighted variant of metapath2vec to compute the node embeddings. The embeddings can be used for downstream machine learning.

The package is a work-in-progress. There are bugs, and example notebooks are missing. If you want to use this package, expect to make changes.

pre-commit

Installation

bash pip install weighted-metapath2vec

Usage

```python from weighted_metapath2vec import WeightedMetapath2VecModel

G = ... # Load a networkx graph as G

metapaths = [ ['Article', 'Author', 'Article'], ['Author', 'Article', 'Author'] ]

model = WeightedMetapath2VecModel(G, metapaths, walklength=3, nwalkspernode=20, embedding_dim=128)

nodeembeddings = model.fittransform()

... # downstream task ```

Contributing

Use GitHub to fork and submit pull requests.

Citation

Please cite this code as follows (BibTeX):

bibtex @software{Weighted_Metapath2Vec, author = {Ansarinia, Morteza and Cardoso-Leite, Pedro}, doi = {10.5281/zenodo.7096229}, month = {6}, title = {{Weighted Metapath2Vec Graph Embedding}}, url = {https://github.com/morteza/weighted-metapath2vec}, version = {v0.1.4}, year = {2022} }

Acknowledgements

This project is supported by the Luxembourg National Research Fund (ATTRACT/2016/ID/11242114/DIGILEARN and INTER Mobility/2017-2/ID/11765868/ULALA).

License

MIT License. See the LICENSE file.

Owner

  • Name: Morteza Ansarinia
  • Login: morteza
  • Kind: user
  • Location: Luxembourg

Postdoc; thinking about control in the brain

Citation (CITATION.CFF)

cff-version: 1.2.0
message: "If you use this package, please cite it as below."
authors:
- family-names: "Ansarinia"
  given-names: "Morteza"
  orcid: "https://orcid.org/0000-0001-8335-6704"
- family-names: "Cardoso-Leite"
  given-names: "Pedro"
  orcid: "https://orcid.org/0000-0002-2848-5527"
title: "Weighted Metapath2Vec Graph Embedding"
version: v0.1.4
doi: 10.5281/zenodo.7096229
date-released: 2022-06-19
url: "https://github.com/morteza/weighted-metapath2vec"

GitHub Events

Total
Last Year

Committers

Last synced: 7 months ago

All Time
  • Total Commits: 31
  • Total Committers: 1
  • Avg Commits per committer: 31.0
  • Development Distribution Score (DDS): 0.0
Past Year
  • Commits: 0
  • Committers: 0
  • Avg Commits per committer: 0.0
  • Development Distribution Score (DDS): 0.0
Top Committers
Name Email Commits
Morteza Ansarinia a****a@m****m 31
Committer Domains (Top 20 + Academic)
me.com: 1

Issues and Pull Requests

Last synced: 7 months ago

All Time
  • Total issues: 2
  • Total pull requests: 0
  • Average time to close issues: 9 months
  • Average time to close pull requests: N/A
  • Total issue authors: 2
  • Total pull request authors: 0
  • Average comments per issue: 1.0
  • Average comments per pull request: 0
  • Merged pull requests: 0
  • Bot issues: 0
  • Bot pull requests: 0
Past Year
  • Issues: 0
  • Pull requests: 0
  • Average time to close issues: N/A
  • Average time to close pull requests: N/A
  • Issue authors: 0
  • Pull request authors: 0
  • Average comments per issue: 0
  • Average comments per pull request: 0
  • Merged pull requests: 0
  • Bot issues: 0
  • Bot pull requests: 0
Top Authors
Issue Authors
  • Scrantu (1)
  • morteza (1)
Pull Request Authors
Top Labels
Issue Labels
documentation (2) enhancement (1)
Pull Request Labels

Packages

  • Total packages: 1
  • Total downloads:
    • pypi 7 last-month
  • Total dependent packages: 0
  • Total dependent repositories: 0
  • Total versions: 2
  • Total maintainers: 1
pypi.org: weighted-metapath2vec

A weighted alternative to metapath2vec for heterogenous graph embedding

  • Versions: 2
  • Dependent Packages: 0
  • Dependent Repositories: 0
  • Downloads: 7 Last month
Rankings
Dependent packages count: 6.6%
Forks count: 23.2%
Average: 25.4%
Stargazers count: 25.5%
Dependent repos count: 30.6%
Downloads: 41.1%
Maintainers (1)
Last synced: 7 months ago

Dependencies

environment.yml conda
  • poetry
  • python 3.9.*
pyproject.toml pypi
  • flake8 ^4 develop
  • ipykernel ^6 develop
  • pytest ^7 develop
  • flake8 ^4.0.1
  • gensim ^4.1
  • networkx ^2.8
  • python >=3.9,<3.11
  • scikit-learn ^1.0