Skip to main content

Khisto

CI Docs Release Python License

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
Adaptive Gaussian histogram Adaptive Pareto histogram

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

BSD 3-Clause Clear License

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distributions

No source distribution files available for this release.See tutorial on generating distribution archives.

Built Distributions

If you're not sure about the file name format, learn more about wheel file names.

khisto-1.0.1-py3-none-win_arm64.whl (341.4 kB view details)

Uploaded Python 3Windows ARM64

khisto-1.0.1-py3-none-win_amd64.whl (341.4 kB view details)

Uploaded Python 3Windows x86-64

khisto-1.0.1-py3-none-manylinux_2_24_x86_64.manylinux_2_28_x86_64.whl (1.0 MB view details)

Uploaded Python 3manylinux: glibc 2.24+ x86-64manylinux: glibc 2.28+ x86-64

khisto-1.0.1-py3-none-manylinux_2_24_aarch64.manylinux_2_28_aarch64.whl (991.4 kB view details)

Uploaded Python 3manylinux: glibc 2.24+ ARM64manylinux: glibc 2.28+ ARM64

khisto-1.0.1-py3-none-macosx_11_0_arm64.whl (699.2 kB view details)

Uploaded Python 3macOS 11.0+ ARM64

khisto-1.0.1-py3-none-macosx_10_9_x86_64.whl (779.3 kB view details)

Uploaded Python 3macOS 10.9+ x86-64

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

Hashes for khisto-1.0.1-py3-none-win_arm64.whl
Algorithm Hash digest
SHA256 d7063f867e4a27495a44fd288c7ef957554bcb6cc3c71a6d885eae5519d972f6
MD5 05190de9f10b9d2385be8515ecaa811f
BLAKE2b-256 bad35a4a9e81132db43b3c992fb3d850f53fc794f4e51a3a4f750ef26f45aa3b

See more details on using hashes here.

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

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

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

Hashes for khisto-1.0.1-py3-none-win_amd64.whl
Algorithm Hash digest
SHA256 27a4a8d2f8a9f9525496e2c258532dd32221bd83171b8fabc4065604137d8796
MD5 131a5d3c603d24da3df7fd3a4b598b19
BLAKE2b-256 fe872651e46d4f4b73a191970c811a1e0f9f9305a16b35a77298e91359a1a883

See more details on using hashes here.

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

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

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

File hashes

Hashes for khisto-1.0.1-py3-none-manylinux_2_24_x86_64.manylinux_2_28_x86_64.whl
Algorithm Hash digest
SHA256 38f19643aea53183cc0ffd9c57de8825ba9283223a095f588e0cfbd867d7ea28
MD5 017b83f7e3ac56232ac1ab0f8f889cfd
BLAKE2b-256 1d633f997552d1c30eab2d99b03eb1a4cbd27c41a89ddad17948a9d1b342086f

See more details on using hashes here.

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

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file khisto-1.0.1-py3-none-manylinux_2_24_aarch64.manylinux_2_28_aarch64.whl.

File metadata

File hashes

Hashes for khisto-1.0.1-py3-none-manylinux_2_24_aarch64.manylinux_2_28_aarch64.whl
Algorithm Hash digest
SHA256 1bf8bb19aa45f99c89099347bc489dfdc96a3d4b02c7c21815fefa989120ac6e
MD5 14c8d8ec87df395a9f23b66065e37066
BLAKE2b-256 326d9e782d5d0eefe5f74c0ff3a3ce7d5a7b81638e491cc6b86f751561669837

See more details on using hashes here.

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

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file khisto-1.0.1-py3-none-macosx_11_0_arm64.whl.

File metadata

File hashes

Hashes for khisto-1.0.1-py3-none-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 c99ad75ac933c859e8b73aea51c84d8375f23e1541adca129985b322a2682c4a
MD5 294e860543f26c5891329a4556af46d5
BLAKE2b-256 45eac95d63d8e0d3884c57c40ef89b2bd7780a51749d2a3f0e5698825684a89e

See more details on using hashes here.

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

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file khisto-1.0.1-py3-none-macosx_10_9_x86_64.whl.

File metadata

File hashes

Hashes for khisto-1.0.1-py3-none-macosx_10_9_x86_64.whl
Algorithm Hash digest
SHA256 e025272c0f15f6ea4f030664b18ec4551ebc0ffb69b3c21a4152b7c9df19c4b1
MD5 00dbb39f1a7d0950c72056a95d484bfc
BLAKE2b-256 210b58bcd13fac4e7cb1cad72b137f609b16a866172bc9fa967108e5baf7e11c

See more details on using hashes here.

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

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

Release history Release notifications | RSS feed

This release

1.0.1 This release

6 files

1.0.0

6 files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page