A weighted alternative to metapath2vec for heterogenous graph embedding
Project description
Weighted-Metapath2Vec
Weighted-Metapath2Vec is a Python package to embed heterogeneous graphs. The algorithm uses a weighted alternative to Metapath2vec to compute the embeddings. The embeddings can be used for downstream machine learning.
Installation
pip install weighted-metapath2vec
Usage
from weighted_metapath2vec import WeightedMetapath2VecModel
... # Load a networkx graph as G
metapaths = [
['Article', 'Author', 'Article'],
['Author', 'Article', 'Author']
]
model = WeightedMetapath2VecModel(G,
metapaths,
walk_length=3,
n_walks_per_node=20,
embedding_dim=128)
node_embeddings = model.fit_transform()
... # downstream task
Contributing
Use GitHub to fork and submit pull requests.
License
MIT License. See the LICENSE file.
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file weighted-metapath2vec-0.1.4.tar.gz.
File metadata
- Download URL: weighted-metapath2vec-0.1.4.tar.gz
- Upload date:
- Size: 4.4 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: poetry/1.1.13 CPython/3.10.4 Darwin/21.5.0
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
b0a59acf3f1b25e1002e580ab56ba3fd42d0a859a43f2459cd423d0b674cc6c8
|
|
| MD5 |
ba679d5c7d3f2a32ee621999e0e2e4e4
|
|
| BLAKE2b-256 |
a57a2c8f44fa882f92366fcfe542c06fff0164207f9039ea17f90aa4fc3413e8
|
File details
Details for the file weighted_metapath2vec-0.1.4-py3-none-any.whl.
File metadata
- Download URL: weighted_metapath2vec-0.1.4-py3-none-any.whl
- Upload date:
- Size: 4.8 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: poetry/1.1.13 CPython/3.10.4 Darwin/21.5.0
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
079410485211ac9687e964b199915d5bf390ed1870be5b93b385178c1d176830
|
|
| MD5 |
3c211409792fbae36d943db2eaa0736b
|
|
| BLAKE2b-256 |
2b4cfb6c63dabf5e04bda0e931d2175a3903a9245f3a106da19b28ee4622f25b
|