About The Project
IKPyKit (Isolation Kernel Python toolKit) is an intuitive Python library designed for a variety of machine learning tasks including kernel similarity calculation, anomaly detection, clustering, and change detection—all powered by the innovative Isolation Kernel (IK) . Isolation Kernel is a data-dependent kernel that measures similarity by isolating data points using an isolation mechanism. It uniquely adapts to the data distribution, with the property that points in sparse regions are more similar than those in dense regions. Notably, it requires no learning or closed-form expression, making it efficient and scalable.
Why use Isolation Kernel?
- Data-Dependent Similarity: Unlike traditional kernels (e.g., Gaussian, Laplacian), Isolation Kernel adapts to the structure of the data rather than assuming a fixed similarity function.
- Handles Sparse and Dense Regions: Isolation Kernel effectively accounts for varying data densities, making it ideal for datasets with non-uniform distributions.
- No Learning Required: It eliminates the need for training or parameter tuning, simplifying implementation while reducing computational cost.
- Effective in High Dimensions: It uniquely addresses the curse of dimensionality, being the only known measure capable of finding exact nearest neighbors in high-dimensional spaces.
- Versatile Applications: Isolation Kernel has been successfully applied to tasks like anomaly detection, clustering, and processing stream data, graph data, trajectory data, and more.
Learn more about its history and development on the IsolationKernel GitHub page.
Why use IKPyKit?
IKPyKit is specifically built to harness the power of Isolation Kernel, providing specialized algorithms for a wide range of data types and tasks. Its seamless integration with the scikit-learn API allows easy adoption and compatibility with scikit-learn tools.
- Tailored for Isolation Kernel: IKPyKit directly leverages the unique properties of Isolation Kernel for efficient and effective machine learning solutions.
- Efficient and User-Friendly: Designed for simplicity and performance, IKPyKit offers an intuitive interface built on the scikit-learn API.
- Support for Diverse Data Types: It supports graph data, group data, stream data, time series, and trajectory data, making it versatile for various domains.
- Comprehensive Resources: Users benefit from rich documentation and examples to quickly understand and apply the library’s features.
- Ideal for Research and Industry: IKPyKit is suitable for both academic research and industrial applications, providing scalable and cutting-edge tools for modern machine learning challenges.
Installation & Dependencies
Recommended installation (with uv):
Install uv first: https://docs.astral.sh/uv/getting-started/
uv pip install ikpykit
If you prefer classic pip:
pip install ikpykit
For more installation options, including dependencies and additional features, check out our Installation Guide.
Example
# Anomaly Detection using inne.
import numpy as np
from ikpykit.anomaly import INNE
X = np.array([[-1.1, 0.2], [0.3, 0.5], [0.5, 1.1], [100, 90]])
clf = INNE(contamination=0.25).fit(X)
clf.predict([[0.1, 0.3], [0, 0.7], [90, 85]])
Implemented Algorithms
Summary
| Algorithms | Kernel Similarity | Anomaly Detection | Clustering | Change Detection |
|---|---|---|---|---|
| Point Data | IsoKernel (AAAI'19, SIGKDD'18) | IForest (ICDM'08, TKDD'12) INNE (CIJ'18) IDKD (TKDE'22) |
IDKC (IS'23) PSKC (TKDE'23) IKAHC (PR'23) |
|
| Graph Data | IsoGraphKernel (AAAI'21) | IKGOD (SIAM'23) | ||
| Group Data | IsoDisKernel (SIGKDD'20) | IKGAD (TKDE'22) | ||
| Stream Data | STREAMKHC (SIGKDD'22) | ICID (JAIR'24) | ||
| Time Series | IKTOD (VLDB'22) | |||
| Trajectory Data | IKAT (JAIR'24) | TIDKC (ICDM'23) |
(i) Isolation Kernel:
| Abbr | Algorithm | Application | Publication |
|---|---|---|---|
| IsoDisKernel | Isolation Distribution Kernel | Distribution similarity calculating | SIGKDD2020 |
| IsoKernel | Isolation Kernel | IK feature mapping and similarity calculating | AAAI2019, SIGKDD2018 |
(ii) Point Anomaly Detection:
| Abbr | Algorithm | Application | Publication |
|---|---|---|---|
| IDKD | Isolation Distributional Kernel for point anomaly detections | Anomaly Detection | TKDE2022 |
| INNE | Isolation-based anomaly detection using nearest-neighbor ensembles | Anomaly Detection | CIJ2018 |
| IForest | Isolation forest | Anomaly Detection | ICDM2008, TKDD2012 |
(iii) Point Clustering:
| Abbr | Algorithm | Application | Publication |
|---|---|---|---|
| IDKC | Kernel-based Clustering via Isolation Distributional Kernel | Point Clustering | IS2023 |
| IKAHC | Isolation Kernel for Agglomerative Hierarchical Clustering | Hierarchical Clustering | PR2023 |
| PSKC | Point-set Kernel Clustering | Point Clustering | TKDE2023 |
(iv) Graph Mining:
| Abbr | Algorithm | Application | Publication |
|---|---|---|---|
| IKGOD | Subgraph Centralization: A Necessary Step for Graph Anomaly Detection | Graph Anomaly Detection | SIAM2023 |
| IsoGraphKernel | Isolation Graph Kernel | Graph IK embedding and similarity calculating | AAAI2021 |
(v) Group Mining:
| Abbr | Algorithm | Application | Publication |
|---|---|---|---|
| IKGAD | Isolation Distributional Kernel for group anomaly detections | Group Anomaly Detection | TKDE2022 |
(vi) Stream Mining:
| Abbr | Algorithm | Application | Publication |
|---|---|---|---|
| ICID | Detecting change intervals with isolation distributional kernel | Change Intervals Detection | JAIR2024 |
| STREAMKHC | Streaming Hierarchical Clustering Based on Point-Set Kernel | Online Hierarchical Clustering | SIGKDD2022 |
(vii) Trajectory Mining:
| Abbr | Algorithm | Application | Publication |
|---|---|---|---|
| IKAT | Isolation Distribution Kernel for Trajectory Anomaly Detections | Trajectory Anomaly Detection | JAIR2024 |
| TIDKC | Distribution-based Trajectory Clustering | Trajectory Clustering | ICDM2023 |
(viii) Time Series Mining:
| Abbr | Algorithm | Application | Publication |
|---|---|---|---|
| IKTOD | Isolation distribution kernel for Time Series Anomaly Detection | Anomaly Detection | VLDB2022 |
Features
IKPyKit provides a set of key features designed to make machine learning tasks easy and efficient. For a detailed overview, see the User Guides.
Examples and tutorials
Explore our extensive list of examples and tutorials to get you started with IKPyKit. You can find them here.
How to contribute
Primarily, IKPyKit development consists of adding and creating new algorithms, new validation strategies, or improving the performance of the current code. However, there are many other ways to contribute:
- Submit a bug report or feature request on GitHub Issues.
- Contribute a Jupyter notebook to our examples.
- Write unit or integration tests for our project.
- Answer questions on our issues, Stack Overflow, and elsewhere.
- Translate our documentation into another language.
- Write a blog post, tweet, or share our project with others.
For more information on how to contribute to IKPyKit, see our Contribution Guide.
Visit our authors section to meet all the contributors to IKPyKit.
Citation
If you use IKPyKit for a scientific Publication, we would appreciate citations to the Publication software.
BibTeX:
@software{IKPyKit,
author = {Xin Han, Yixiao Ma, Ye Zhu, and Kaiming Ting},
title = {IKPyKit:A Python Library for Isolation Kernel Toolkit},
version = {0.1.0},
month = {3},
year = {2025},
license = {BSD-3-Clause},
url = {https://github.com/IsolationKernel/ikpykit}
}
License
Metadata
Release files for ikpykit 0.4.0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| ikpykit-0.4.0.tar.gz | 22.9 MB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| ikpykit-0.4.0-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 45.7 MB
Release files / ikpykit-0.4.0.tar.gz
| Download URL | ikpykit-0.4.0.tar.gz |
|---|---|
| Size | 22.9 MB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
bb49e7ee2b93c797ff70122e04305417366f9369e8c44311309573808df03f10
|
|
BLAKE2b-256 checksum How to use checksums |
16f803315328d0acd79eff9d148c54e8960ac4d3f9f71bdfe41b560b134c59da
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/7.0.0 CPython/3.13.14
|
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Aug 16, 2026.
Transparency logRelease files / ikpykit-0.4.0-py3-none-any.whl
| Download URL | ikpykit-0.4.0-py3-none-any.whl |
|---|---|
| Size | 22.7 MB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
ba7d470631c6f3abe936b07f7b5c1e2e333d9f1b9e305082bac89e7aa513624e
|
|
BLAKE2b-256 checksum How to use checksums |
df3b18fdafdc137a0fbc26752882cdf0a4629a964b48f8c94affabb398ed8361
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/7.0.0 CPython/3.13.14
|
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Aug 16, 2026.
Transparency log