Graph embeddings for downstream tasks
Project description
Graph-Embeddings
Graph embeddings for downstream tasks
Installation:
It’s advised to install graph-embeddings using a virtual env, inside the env use:
pip install graph-embeddings
Algorithms:
StackedNode2Vec
Computes the Node2Vec representation of each node in a set of graphs.
Example:
import networkx as nx
from graph_embeddings.algorithms import StackedNode2Vec
g1 = nx.DiGraph()
g2 = nx.DiGraph()
g1.add_edges_from([("A", "B"), ("B", "C"), ("C", "B"), ("B", "E")])
g2.add_edges_from([("A", "B"), ("B", "D"), ("D", "C"), ("C", "D")])
graphs = [g1, g2]
embedding_model = StackedNode2Vec()
embedding_model.fit(graphs)
embedding_model.get_embeddings() # ndarray with shape (2, 5, 128) - graphs, nodes, embedding_size
embedding_model.get_dense_embeddings() # ndarray with shape (2, 640) - graphs, nodes*embedding_size
Changelog
See the changelog for notes on the changes of graph-embeddings
Important links
Official source code repo: https://github.com/rodrigo-arenas/graph-embeddings/
Download releases: https://pypi.org/project/graph-embeddings/
Issue tracker: https://github.com/rodrigo-arenas/graph-embeddings/issues
Stable documentation: https://graph-embeddings.readthedocs.io/
Source code
You can check the latest development version with the command:
git clone https://github.com/rodrigo-arenas/graph-embeddings.git
Install the development dependencies:
pip install -r dev-requirements.txt
Check the latest in-development documentation: https://graph-embeddings.readthedocs.io/en/latest/
Contributing
Contributions are more than welcome! There are several opportunities on the ongoing project, so please get in touch if you would like to help out. Make sure to check the current issues and also the Contribution guide.
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 graph-embeddings-0.1.0.tar.gz.
File metadata
- Download URL: graph-embeddings-0.1.0.tar.gz
- Upload date:
- Size: 7.3 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.1 CPython/3.8.13
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
fbf4eb185b4030be008714edef50a10de5797132f42424b99c091c61d24a0eaf
|
|
| MD5 |
c521bef1a2017f1fa33551bcbb7d2f3b
|
|
| BLAKE2b-256 |
70936e4cc3b8dc275c1833627ab0f726234c4bc7edc9edab4f9398769679ec29
|
File details
Details for the file graph_embeddings-0.1.0-py3-none-any.whl.
File metadata
- Download URL: graph_embeddings-0.1.0-py3-none-any.whl
- Upload date:
- Size: 7.7 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.1 CPython/3.8.13
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
69bd298a5f590916bf66a4dde35faf5176d9013b1b177fdcfe7d62c4065ed28d
|
|
| MD5 |
c962c73a1dafe49f7f859e92ee503559
|
|
| BLAKE2b-256 |
bc2ac6eaea120f7c775d1c0db7a16dcae8f0ba992b8b2e24f81c42590122bc88
|