{"id":18499414,"url":"https://github.com/morteza/weighted-metapath2vec","last_synced_at":"2025-07-29T18:16:22.730Z","repository":{"id":45301649,"uuid":"487502443","full_name":"morteza/weighted-metapath2vec","owner":"morteza","description":"Weighted Metapath2Vec Graph Embedding","archived":false,"fork":false,"pushed_at":"2022-11-08T21:07:19.000Z","size":39,"stargazers_count":6,"open_issues_count":0,"forks_count":1,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-04-03T18:07:39.325Z","etag":null,"topics":["graph-embedding","machine-learning","random-walk"],"latest_commit_sha":null,"homepage":"","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/morteza.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":"CITATION.CFF","codeowners":null,"security":null,"support":null}},"created_at":"2022-05-01T10:03:26.000Z","updated_at":"2024-04-27T18:06:28.000Z","dependencies_parsed_at":"2023-01-21T13:45:13.582Z","dependency_job_id":null,"html_url":"https://github.com/morteza/weighted-metapath2vec","commit_stats":null,"previous_names":[],"tags_count":2,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/morteza%2Fweighted-metapath2vec","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/morteza%2Fweighted-metapath2vec/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/morteza%2Fweighted-metapath2vec/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/morteza%2Fweighted-metapath2vec/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/morteza","download_url":"https://codeload.github.com/morteza/weighted-metapath2vec/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":247956552,"owners_count":21024570,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["graph-embedding","machine-learning","random-walk"],"created_at":"2024-11-06T13:45:57.968Z","updated_at":"2025-04-09T01:31:38.128Z","avatar_url":"https://github.com/morteza.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Weighted-Metapath2Vec\n\n**Weighted-Metapath2Vec** is a Python package for embedding heterogeneous graphs.\nIt uses a weighted variant of [metapath2vec](https://ericdongyx.github.io/metapath2vec/m2v.html) to compute the node embeddings.\nThe embeddings can be used for downstream machine learning.\n\n**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.\n\n[![pre-commit](https://img.shields.io/badge/pre--commit-enabled-brightgreen?logo=pre-commit\u0026logoColor=white)](https://github.com/pre-commit/pre-commit)\n\n\n## Installation\n\n```bash\npip install weighted-metapath2vec\n```\n\n## Usage\n\n```python\nfrom weighted_metapath2vec import WeightedMetapath2VecModel\n\nG = ...  # Load a networkx graph as G\n\nmetapaths = [\n    ['Article', 'Author', 'Article'],\n    ['Author', 'Article', 'Author']\n]\n\nmodel = WeightedMetapath2VecModel(G,\n                                  metapaths,\n                                  walk_length=3,\n                                  n_walks_per_node=20,\n                                  embedding_dim=128)\n\nnode_embeddings = model.fit_transform()\n\n...  # downstream task\n```\n\n## Contributing\n\nUse GitHub to fork and submit pull requests.\n\n## Citation\n\nPlease cite this code as follows (BibTeX):\n\n```bibtex\n@software{Weighted_Metapath2Vec,\n        author = {Ansarinia, Morteza and Cardoso-Leite, Pedro},\n        doi = {10.5281/zenodo.7096229},\n        month = {6},\n        title = {{Weighted Metapath2Vec Graph Embedding}},\n        url = {https://github.com/morteza/weighted-metapath2vec},\n        version = {v0.1.4},\n        year = {2022}\n}\n```\n\n## Acknowledgements\n\nThis project is supported by the Luxembourg National Research Fund (ATTRACT/2016/ID/11242114/DIGILEARN and INTER Mobility/2017-2/ID/11765868/ULALA).\n\n## License\n\nMIT License. See the [LICENSE](LICENSE) file.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmorteza%2Fweighted-metapath2vec","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fmorteza%2Fweighted-metapath2vec","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmorteza%2Fweighted-metapath2vec/lists"}