dynnode2vec is a package to embed dynamic graphs
Project description
dynnode2vec
dynnode2vec
is a package to embed dynamic graphs.
It is the python implementation of S. Mahdavi, S. Khoshraftar, A. An: dynnode2vec: Scalable Dynamic Network Embedding. IEEE BigData 2018
Installation
pip install -U dynnode2vec
Usage
import pickle
from dynnode2vec.dynnode2vec import DynNode2Vec
from dynnode2vec.utils import create_dynamic_graph
# Create random graphs
graphs = create_dynamic_graph(
n_base_nodes=100, n_steps=50, base_density=0.05
)
# Instantiate dynnode2vec object
dynnode2vec = DynNode2Vec(
p=1.,
q=1.,
walk_length=10,
n_walks_per_node=20,
embedding_size=64
)
# Embed the dynamic graphs
embeddings = dynnode2vec.compute_embeddings(graphs)
# Save embeddings to disk
with open('example_embeddings.pkl', 'wb') as f:
pickle.dump(embeddings, f)
Parameters
-
DynNode2Vec
class:p
: Return hyper parameter (default: 1)q
: Inout parameter (default: 1)walk_length
: Number of nodes in each walk (default: 80)n_walks_per_node
: Number of walks per node (default: 10)embedding_size
: Embedding dimensions (default: 128)seed
: Number of workers for parallel execution (default: 1)parallel_processes
: Number of workers for parallel execution (default: 1)use_delta_nodes
: Number of workers for parallel execution (default: 1)
-
DynNode2Vec.fit
method:graphs
: list of nx.Graph (ordered by time)
TO DO
- remove pandas use in embeddings formatting
- code examples of synthetic and real-life uses
- get rid of Stellar Graph dependency
Releases
You can see the list of available releases on the GitHub Releases page.
License
This project is licensed under the terms of the MIT
license. See LICENSE for more details.
Citation
@misc{dynnode2vec,
author = {Paul-Emile Dugnat},
title = {dynnode2vec, a package to embed dynamic graphs},
year = {2022},
publisher = {GitHub},
journal = {GitHub repository},
howpublished = {\url{https://github.com/pedugnat/dynnode2vec}}
}
This project was generated with python-package-template
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
dynnode2vec-0.3.1.tar.gz
(10.7 kB
view details)
Built Distribution
File details
Details for the file dynnode2vec-0.3.1.tar.gz
.
File metadata
- Download URL: dynnode2vec-0.3.1.tar.gz
- Upload date:
- Size: 10.7 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: poetry/1.1.14 CPython/3.8.3 Darwin/21.6.0
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | e5da8081555af8a80570d1d3263502fa58dfc4e79fd6ee19433caaaa542381fe |
|
MD5 | 8e35a88bbb19151a7113de2d6536067e |
|
BLAKE2b-256 | b74bdb7a92026dee5c3d50245d4fb38e831546026110a78079bea61ee64dae88 |
File details
Details for the file dynnode2vec-0.3.1-py3-none-any.whl
.
File metadata
- Download URL: dynnode2vec-0.3.1-py3-none-any.whl
- Upload date:
- Size: 9.6 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: poetry/1.1.14 CPython/3.8.3 Darwin/21.6.0
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 955570aab2fa4dd519b168541021a73a8a40a93ab4ab3c08d414663800e3cd82 |
|
MD5 | 4005f9d74c0254752be0645f965b0b48 |
|
BLAKE2b-256 | b317c79a3103ed68fc0b1017bcd8915e9e76eeb588e855a13300f5cc57caaaa0 |