PyWLGK
Python implementation of the Weisfeiler-Lehman Graph Kernels (WLKs) method. This package is an alternative to FastWLK, GraKel, and other implementations of the WLKs method.
Installation
By design, PyWLGK is installable from PyPI and Anaconda. To install the package with pip, run the following command:
pip install pywlgk
or with conda (alternatively with mamba by replacing conda with mamba
conda install pywlgk
Usage
PyWLGK is designed to be easy to use. The following example shows how to use PyWLGK to compute the WLKs kernel between two graphs.
from pywlgk import wlk
import numpy as np
adjs = np.random.randint(0, 1, size=(2, 10, 10))
adjs = np.array(adjs + adjs.transpose(0, 2, 1), dtype=np.int32)
labels = np.ones((2, 10), dtype=np.int32)
wlk(adjs, labels, k=4)
PyWLGK takes as input a stack of adjacency matrices (adjs) and a stack of node labels (labels). The adjacency
matrices must be symmetric, whereas the labels can have any type. Additionally, one can specify a k to control how
many iterations of the kernel will be computed.
Release files for PyWLGK 1.0.1
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| pywlgk-1.0.1.tar.gz | 5.3 kB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| PyWLGK-1.0.1-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 11.5 kB
Release files / pywlgk-1.0.1.tar.gz
| Download URL | pywlgk-1.0.1.tar.gz |
|---|---|
| Size | 5.3 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
7b12472bcf19ec71065c8f9cc5449f56e8b5895138cfb560cfd3f4b66598a1e1
|
|
BLAKE2b-256 checksum How to use checksums |
9dbf696c8396f0b62747f2d02c0aba9e9ea9d08bfc88e271142535367c4a859d
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/5.1.1 CPython/3.8.20
|
Release files / PyWLGK-1.0.1-py3-none-any.whl
| Download URL | PyWLGK-1.0.1-py3-none-any.whl |
|---|---|
| Size | 6.3 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
c37991535c853751dbfe5d3b0044985a425e1e5e4c75bb9c3afeccc607a3597c
|
|
BLAKE2b-256 checksum How to use checksums |
a371bbe51430e1be4ae2ea8af2db26ec8a7129c30089a67848ba6cc180ddac72
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/5.1.1 CPython/3.8.20
|