Metadata-Version: 2.1
Name: PyWLGK
Version: 1.0.0
Summary: Python implementation of Weisfeiler-Lehman Graph Kernels
License: MIT
Author: Roman Joeres
Author-email: joeres.roman@web.de
Requires-Python: >=3.8,<4.0
Classifier: License :: OSI Approved :: MIT License
Classifier: Programming Language :: Python :: 3
Classifier: Programming Language :: Python :: 3.8
Classifier: Programming Language :: Python :: 3.9
Classifier: Programming Language :: Python :: 3.10
Classifier: Programming Language :: Python :: 3.11
Classifier: Programming Language :: Python :: 3.12
Requires-Dist: numpy (>=1.24,<2.0)
Description-Content-Type: text/markdown

# 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:

```bash
pip install pywlgk
```

or with `conda` (alternatively with `mamba` by replacing `conda` with `mamba`

```bash
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.

```python
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.

