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.4.tar.gz
Algorithm | Hash digest | |
---|---|---|
SHA256 | b0a59acf3f1b25e1002e580ab56ba3fd42d0a859a43f2459cd423d0b674cc6c8 |
|
MD5 | ba679d5c7d3f2a32ee621999e0e2e4e4 |
|
BLAKE2b-256 | a57a2c8f44fa882f92366fcfe542c06fff0164207f9039ea17f90aa4fc3413e8 |
Close
Hashes for weighted_metapath2vec-0.1.4-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 079410485211ac9687e964b199915d5bf390ed1870be5b93b385178c1d176830 |
|
MD5 | 3c211409792fbae36d943db2eaa0736b |
|
BLAKE2b-256 | 2b4cfb6c63dabf5e04bda0e931d2175a3903a9245f3a106da19b28ee4622f25b |