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
Close
Hashes for weighted-metapath2vec-0.1.3.tar.gz
Algorithm | Hash digest | |
---|---|---|
SHA256 | 5bfe31a0d5a7c7168456595f858b78a561167161db4069f0a4a7b879fbf6f49d |
|
MD5 | f72b89f69ac50cb547fb5be93e96139d |
|
BLAKE2b-256 | 0bbfdcca01ffe241b57560929dffc2c5087e330d4052b362f2066329e1b3299f |
Close
Hashes for weighted_metapath2vec-0.1.3-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | c9f56dae89031c32b6317a7f84a49d99cde1434ff5a5d24e8676d431908b529c |
|
MD5 | d66353028e94d4d9b15207bece118dad |
|
BLAKE2b-256 | 6d3abdee79fa92b3cb909928a1dbbaa3cf3cd02fcde05963a7552ef321ad65db |