A subgraph matching programming library.
Project description
openGraphMatching
A Python Graph/Subgraph Matching programming library. Based on openGraphMatching and the framework provided, you can develop and test different subgraph matching algorithms efficiently. What's more, since the codebase is Python-based, algorithms with neural networks can be integrated easily with traditional subgraph matching algorithms.
Read our report for more information.(Not provided now)
Usage
Prerequisite pytorch>=1.6, networkx, pytorch-geometric, deepsnap
The NaiveMatch is the minium implementation of subgraph matching algorithm.
Here is the demo code for running GraphQL algorithm:
import openGraphMatching.matcher as matcher
# Prepare query graph q and target graph G in advance. q and G are networkx instance.
m = matcher.GQLMatcher(G) # Initialize the object with targer graph G
m.is_subgraph_match(q) # Run the check match process
Quickstart
- Clone this repository:
git clone https://github.com/chang2000/openGraphMatching - Install all prerequisite
pip install openGraphMatchingto install this package.- Go to
examplesand enjoy~
Misc
-
Validate the correctness of algorithm.
- We use HPRD (9460 nodes, 34998 edges) to validate the correctness considering the time consuming and program performance.
- We provides 200 quries(dense, 16 nodes).
- A correctness checker is implemented in
utils.py. - Expected result of all the matching are provided in
expected.res. Refer to the datasetvalidatefor more information.
-
The data format of the datasets
-
For each
.graphfile, the first line will always bet x ywherexandyare two int indicates the number of nodes and edges -
Vertex data
v v_id v_label v_degree
-
-
Edge data
e v_id v_id
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 openGraphMatching-0.1.6.tar.gz.
File metadata
- Download URL: openGraphMatching-0.1.6.tar.gz
- Upload date:
- Size: 16.4 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/3.2.0 pkginfo/1.6.1 requests/2.25.0 setuptools/50.3.1.post20201107 requests-toolbelt/0.9.1 tqdm/4.51.0 CPython/3.8.5
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
875c4e93a3bc09acc0c33a30842d25d4f7879a376ac4b4f7a2bc876206ccf546
|
|
| MD5 |
2f68440cd0523c9eae88a8f07a716dc7
|
|
| BLAKE2b-256 |
8e2f1571b7cca4b9fb77ca68216671c5ed91062b4b7a008743118a5d1cad0a40
|
File details
Details for the file openGraphMatching-0.1.6-py3-none-any.whl.
File metadata
- Download URL: openGraphMatching-0.1.6-py3-none-any.whl
- Upload date:
- Size: 23.2 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/3.2.0 pkginfo/1.6.1 requests/2.25.0 setuptools/50.3.1.post20201107 requests-toolbelt/0.9.1 tqdm/4.51.0 CPython/3.8.5
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
42cbd0921d08d9c74d643239788364756fd479c4e2c73f5abb9514e5cc972e8d
|
|
| MD5 |
e08c868bb38245371956e319683d0aa2
|
|
| BLAKE2b-256 |
7c6c3d299d0640d5a0975ea8e472ecf1de3e619995b04be176d2a33d679dd549
|