Khisto
Optimal Binning Histograms for Python
Khisto is a Python library for creating histograms using the Khiops optimal binning algorithm. Unlike standard histograms that use fixed-width bins or simple heuristics, Khisto automatically determines the optimal number of bins and their variable widths to best represent the underlying data distribution.
Documentation is available at khiopsml.github.io/khisto-python.
| Standard Gaussian | Heavy-tailed Pareto |
|---|---|
Installation
pip install khisto
With matplotlib support:
pip install "khisto[matplotlib]"
Quick Start
import numpy as np
import matplotlib.pyplot as plt
from khisto.matplotlib import hist
# Generate 10,000 samples from a Normal distribution
normal_data = np.random.normal(size=10000)
# Plot an adaptive histogram
n, bins, patches = hist(normal_data)
plt.show()
# Generate 10,000 samples from a Pareto distribution
long_tail_data = np.random.pareto(3, size=10000)
# Plot an adaptive histogram on logarithmic axes.
n, bins, patches = hist(long_tail_data)
plt.xscale("symlog")
plt.yscale("log")
plt.show()
Development
# Clone repository
git clone https://github.com/KhiopsML/khisto-python.git
cd khisto-python
# Install with dev dependencies
uv sync --group dev --extra all
# Run tests
uv run pytest
License
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distributions
Built Distributions
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 khisto-1.0.1-py3-none-win_arm64.whl.
File metadata
- Download URL: khisto-1.0.1-py3-none-win_arm64.whl
- Upload date:
- Size: 341.4 kB
- Tags: Python 3, Windows ARM64
- Uploaded using Trusted Publishing? Yes
- Uploaded via:
twine/7.0.0 CPython/3.13.14
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
d7063f867e4a27495a44fd288c7ef957554bcb6cc3c71a6d885eae5519d972f6
|
|
| MD5 |
05190de9f10b9d2385be8515ecaa811f
|
|
| BLAKE2b-256 |
bad35a4a9e81132db43b3c992fb3d850f53fc794f4e51a3a4f750ef26f45aa3b
|
Provenance
The following attestation bundles were made for khisto-1.0.1-py3-none-win_arm64.whl:
Publisher:
pack-pip.yaml on KhiopsML/khisto-python
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
khisto-1.0.1-py3-none-win_arm64.whl -
Subject digest:
d7063f867e4a27495a44fd288c7ef957554bcb6cc3c71a6d885eae5519d972f6 - Sigstore transparency entry: 2768843016
- Sigstore integration time:
-
Permalink:
KhiopsML/khisto-python@0e6c460cdd547bf72347e56cc29359d43974117a -
Branch / Tag:
refs/tags/v1.0.1 - Owner: https://github.com/KhiopsML
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
pack-pip.yaml@0e6c460cdd547bf72347e56cc29359d43974117a -
Trigger Event:
workflow_dispatch
-
Statement type:
File details
Details for the file khisto-1.0.1-py3-none-win_amd64.whl.
File metadata
- Download URL: khisto-1.0.1-py3-none-win_amd64.whl
- Upload date:
- Size: 341.4 kB
- Tags: Python 3, Windows x86-64
- Uploaded using Trusted Publishing? Yes
- Uploaded via:
twine/7.0.0 CPython/3.13.14
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
27a4a8d2f8a9f9525496e2c258532dd32221bd83171b8fabc4065604137d8796
|
|
| MD5 |
131a5d3c603d24da3df7fd3a4b598b19
|
|
| BLAKE2b-256 |
fe872651e46d4f4b73a191970c811a1e0f9f9305a16b35a77298e91359a1a883
|
Provenance
The following attestation bundles were made for khisto-1.0.1-py3-none-win_amd64.whl:
Publisher:
pack-pip.yaml on KhiopsML/khisto-python
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
khisto-1.0.1-py3-none-win_amd64.whl -
Subject digest:
27a4a8d2f8a9f9525496e2c258532dd32221bd83171b8fabc4065604137d8796 - Sigstore transparency entry: 2768842993
- Sigstore integration time:
-
Permalink:
KhiopsML/khisto-python@0e6c460cdd547bf72347e56cc29359d43974117a -
Branch / Tag:
refs/tags/v1.0.1 - Owner: https://github.com/KhiopsML
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
pack-pip.yaml@0e6c460cdd547bf72347e56cc29359d43974117a -
Trigger Event:
workflow_dispatch
-
Statement type:
File details
Details for the file khisto-1.0.1-py3-none-manylinux_2_24_x86_64.manylinux_2_28_x86_64.whl.
File metadata
- Download URL: khisto-1.0.1-py3-none-manylinux_2_24_x86_64.manylinux_2_28_x86_64.whl
- Upload date:
- Size: 1.0 MB
- Tags: Python 3, manylinux: glibc 2.24+ x86-64, manylinux: glibc 2.28+ x86-64
- Uploaded using Trusted Publishing? Yes
- Uploaded via:
twine/7.0.0 CPython/3.13.14
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
38f19643aea53183cc0ffd9c57de8825ba9283223a095f588e0cfbd867d7ea28
|
|
| MD5 |
017b83f7e3ac56232ac1ab0f8f889cfd
|
|
| BLAKE2b-256 |
1d633f997552d1c30eab2d99b03eb1a4cbd27c41a89ddad17948a9d1b342086f
|
Provenance
The following attestation bundles were made for khisto-1.0.1-py3-none-manylinux_2_24_x86_64.manylinux_2_28_x86_64.whl:
Publisher:
pack-pip.yaml on KhiopsML/khisto-python
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
khisto-1.0.1-py3-none-manylinux_2_24_x86_64.manylinux_2_28_x86_64.whl -
Subject digest:
38f19643aea53183cc0ffd9c57de8825ba9283223a095f588e0cfbd867d7ea28 - Sigstore transparency entry: 2768843143
- Sigstore integration time:
-
Permalink:
KhiopsML/khisto-python@0e6c460cdd547bf72347e56cc29359d43974117a -
Branch / Tag:
refs/tags/v1.0.1 - Owner: https://github.com/KhiopsML
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
pack-pip.yaml@0e6c460cdd547bf72347e56cc29359d43974117a -
Trigger Event:
workflow_dispatch
-
Statement type:
File details
Details for the file khisto-1.0.1-py3-none-manylinux_2_24_aarch64.manylinux_2_28_aarch64.whl.
File metadata
- Download URL: khisto-1.0.1-py3-none-manylinux_2_24_aarch64.manylinux_2_28_aarch64.whl
- Upload date:
- Size: 991.4 kB
- Tags: Python 3, manylinux: glibc 2.24+ ARM64, manylinux: glibc 2.28+ ARM64
- Uploaded using Trusted Publishing? Yes
- Uploaded via:
twine/7.0.0 CPython/3.13.14
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
1bf8bb19aa45f99c89099347bc489dfdc96a3d4b02c7c21815fefa989120ac6e
|
|
| MD5 |
14c8d8ec87df395a9f23b66065e37066
|
|
| BLAKE2b-256 |
326d9e782d5d0eefe5f74c0ff3a3ce7d5a7b81638e491cc6b86f751561669837
|
Provenance
The following attestation bundles were made for khisto-1.0.1-py3-none-manylinux_2_24_aarch64.manylinux_2_28_aarch64.whl:
Publisher:
pack-pip.yaml on KhiopsML/khisto-python
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
khisto-1.0.1-py3-none-manylinux_2_24_aarch64.manylinux_2_28_aarch64.whl -
Subject digest:
1bf8bb19aa45f99c89099347bc489dfdc96a3d4b02c7c21815fefa989120ac6e - Sigstore transparency entry: 2768843078
- Sigstore integration time:
-
Permalink:
KhiopsML/khisto-python@0e6c460cdd547bf72347e56cc29359d43974117a -
Branch / Tag:
refs/tags/v1.0.1 - Owner: https://github.com/KhiopsML
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
pack-pip.yaml@0e6c460cdd547bf72347e56cc29359d43974117a -
Trigger Event:
workflow_dispatch
-
Statement type:
File details
Details for the file khisto-1.0.1-py3-none-macosx_11_0_arm64.whl.
File metadata
- Download URL: khisto-1.0.1-py3-none-macosx_11_0_arm64.whl
- Upload date:
- Size: 699.2 kB
- Tags: Python 3, macOS 11.0+ ARM64
- Uploaded using Trusted Publishing? Yes
- Uploaded via:
twine/7.0.0 CPython/3.13.14
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
c99ad75ac933c859e8b73aea51c84d8375f23e1541adca129985b322a2682c4a
|
|
| MD5 |
294e860543f26c5891329a4556af46d5
|
|
| BLAKE2b-256 |
45eac95d63d8e0d3884c57c40ef89b2bd7780a51749d2a3f0e5698825684a89e
|
Provenance
The following attestation bundles were made for khisto-1.0.1-py3-none-macosx_11_0_arm64.whl:
Publisher:
pack-pip.yaml on KhiopsML/khisto-python
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
khisto-1.0.1-py3-none-macosx_11_0_arm64.whl -
Subject digest:
c99ad75ac933c859e8b73aea51c84d8375f23e1541adca129985b322a2682c4a - Sigstore transparency entry: 2768843049
- Sigstore integration time:
-
Permalink:
KhiopsML/khisto-python@0e6c460cdd547bf72347e56cc29359d43974117a -
Branch / Tag:
refs/tags/v1.0.1 - Owner: https://github.com/KhiopsML
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
pack-pip.yaml@0e6c460cdd547bf72347e56cc29359d43974117a -
Trigger Event:
workflow_dispatch
-
Statement type:
File details
Details for the file khisto-1.0.1-py3-none-macosx_10_9_x86_64.whl.
File metadata
- Download URL: khisto-1.0.1-py3-none-macosx_10_9_x86_64.whl
- Upload date:
- Size: 779.3 kB
- Tags: Python 3, macOS 10.9+ x86-64
- Uploaded using Trusted Publishing? Yes
- Uploaded via:
twine/7.0.0 CPython/3.13.14
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
e025272c0f15f6ea4f030664b18ec4551ebc0ffb69b3c21a4152b7c9df19c4b1
|
|
| MD5 |
00dbb39f1a7d0950c72056a95d484bfc
|
|
| BLAKE2b-256 |
210b58bcd13fac4e7cb1cad72b137f609b16a866172bc9fa967108e5baf7e11c
|
Provenance
The following attestation bundles were made for khisto-1.0.1-py3-none-macosx_10_9_x86_64.whl:
Publisher:
pack-pip.yaml on KhiopsML/khisto-python
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
khisto-1.0.1-py3-none-macosx_10_9_x86_64.whl -
Subject digest:
e025272c0f15f6ea4f030664b18ec4551ebc0ffb69b3c21a4152b7c9df19c4b1 - Sigstore transparency entry: 2768843106
- Sigstore integration time:
-
Permalink:
KhiopsML/khisto-python@0e6c460cdd547bf72347e56cc29359d43974117a -
Branch / Tag:
refs/tags/v1.0.1 - Owner: https://github.com/KhiopsML
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
pack-pip.yaml@0e6c460cdd547bf72347e56cc29359d43974117a -
Trigger Event:
workflow_dispatch
-
Statement type: