# 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.
Raw data
{
"_id": null,
"home_page": null,
"name": "PyWLGK",
"maintainer": "Roman Joeres",
"docs_url": null,
"requires_python": "<4.0.0,>=3.8",
"maintainer_email": null,
"keywords": "bioinformatics, computer-science, graph-kernels, machine-learning, python, wlgk, weisfeiler-lehman-graph-kernel",
"author": "Roman Joeres",
"author_email": null,
"download_url": "https://files.pythonhosted.org/packages/9d/bf/696c8396f0b62747f2d02c0aba9e9ea9d08bfc88e271142535367c4a859d/pywlgk-1.0.1.tar.gz",
"platform": null,
"description": "# PyWLGK\n\nPython implementation of the Weisfeiler-Lehman Graph Kernels (WLKs) method.\nThis package is an alternative to FastWLK, GraKel, and other implementations of the WLKs method.\n\n## Installation\n\nBy design, PyWLGK is installable from PyPI and Anaconda. To install the package with `pip`, run the following command:\n\n```bash\npip install pywlgk\n```\n\nor with `conda` (alternatively with `mamba` by replacing `conda` with `mamba`\n\n```bash\nconda install pywlgk\n```\n\n## Usage\n\nPyWLGK is designed to be easy to use. The following example shows how to use PyWLGK to compute the WLKs kernel between \ntwo graphs.\n\n```python\nfrom pywlgk import wlk\nimport numpy as np\n\nadjs = np.random.randint(0, 1, size=(2, 10, 10))\nadjs = np.array(adjs + adjs.transpose(0, 2, 1), dtype=np.int32)\nlabels = np.ones((2, 10), dtype=np.int32)\nwlk(adjs, labels, k=4)\n```\n\nPyWLGK takes as input a stack of adjacency matrices (`adjs`) and a stack of node labels (`labels`). The adjacency \nmatrices must be symmetric, whereas the labels can have any type. Additionally, one can specify a `k` to control how \nmany iterations of the kernel will be computed.\n",
"bugtrack_url": null,
"license": "MIT",
"summary": "Python package computing Weisfeiler-Lehman graph kernels",
"version": "1.0.1",
"project_urls": null,
"split_keywords": [
"bioinformatics",
" computer-science",
" graph-kernels",
" machine-learning",
" python",
" wlgk",
" weisfeiler-lehman-graph-kernel"
],
"urls": [
{
"comment_text": "",
"digests": {
"blake2b_256": "a371bbe51430e1be4ae2ea8af2db26ec8a7129c30089a67848ba6cc180ddac72",
"md5": "7f8601ea710bbc24277b5bc628ae2f45",
"sha256": "c37991535c853751dbfe5d3b0044985a425e1e5e4c75bb9c3afeccc607a3597c"
},
"downloads": -1,
"filename": "PyWLGK-1.0.1-py3-none-any.whl",
"has_sig": false,
"md5_digest": "7f8601ea710bbc24277b5bc628ae2f45",
"packagetype": "bdist_wheel",
"python_version": "py3",
"requires_python": "<4.0.0,>=3.8",
"size": 6272,
"upload_time": "2024-10-17T17:19:24",
"upload_time_iso_8601": "2024-10-17T17:19:24.607687Z",
"url": "https://files.pythonhosted.org/packages/a3/71/bbe51430e1be4ae2ea8af2db26ec8a7129c30089a67848ba6cc180ddac72/PyWLGK-1.0.1-py3-none-any.whl",
"yanked": false,
"yanked_reason": null
},
{
"comment_text": "",
"digests": {
"blake2b_256": "9dbf696c8396f0b62747f2d02c0aba9e9ea9d08bfc88e271142535367c4a859d",
"md5": "cfa9d4989aaede09c06530512b6c6230",
"sha256": "7b12472bcf19ec71065c8f9cc5449f56e8b5895138cfb560cfd3f4b66598a1e1"
},
"downloads": -1,
"filename": "pywlgk-1.0.1.tar.gz",
"has_sig": false,
"md5_digest": "cfa9d4989aaede09c06530512b6c6230",
"packagetype": "sdist",
"python_version": "source",
"requires_python": "<4.0.0,>=3.8",
"size": 5266,
"upload_time": "2024-10-17T17:19:25",
"upload_time_iso_8601": "2024-10-17T17:19:25.903881Z",
"url": "https://files.pythonhosted.org/packages/9d/bf/696c8396f0b62747f2d02c0aba9e9ea9d08bfc88e271142535367c4a859d/pywlgk-1.0.1.tar.gz",
"yanked": false,
"yanked_reason": null
}
],
"upload_time": "2024-10-17 17:19:25",
"github": false,
"gitlab": false,
"bitbucket": false,
"codeberg": false,
"lcname": "pywlgk"
}