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.0-py3-none-win_arm64.whl (341.4 kB view details)

Uploaded Python 3Windows ARM64

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

Uploaded Python 3Windows x86-64

khisto-1.0.0-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.0-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.0-py3-none-macosx_11_0_arm64.whl (699.2 kB view details)

Uploaded Python 3macOS 11.0+ ARM64

khisto-1.0.0-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.0-py3-none-win_arm64.whl.

File metadata

  • Download URL: khisto-1.0.0-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.0-py3-none-win_arm64.whl
Algorithm Hash digest
SHA256 bac76748caef9103ebf4c901fefc4bdfc41dae6d0fede66f7e6262a403aaeaf3
MD5 292f428f6b205776130ccddee703b6f6
BLAKE2b-256 6c794bf4d0c34a4b1a789fe85e24ab5612bc80b5ea53fb50bdec9897715c7223

See more details on using hashes here.

Provenance

The following attestation bundles were made for khisto-1.0.0-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.0-py3-none-win_amd64.whl.

File metadata

  • Download URL: khisto-1.0.0-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.0-py3-none-win_amd64.whl
Algorithm Hash digest
SHA256 efc96d16dbeaf9e6d583a79ad5c56d026580787bc077b4fe6ec289a1570fae38
MD5 f8b9255b4ef1b05ccaf226739be56649
BLAKE2b-256 28d1149ba691d4019ab3ee566a05d59bffe56dfa3e2d0bff020480a649f5de62

See more details on using hashes here.

Provenance

The following attestation bundles were made for khisto-1.0.0-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.0-py3-none-manylinux_2_24_x86_64.manylinux_2_28_x86_64.whl.

File metadata

File hashes

Hashes for khisto-1.0.0-py3-none-manylinux_2_24_x86_64.manylinux_2_28_x86_64.whl
Algorithm Hash digest
SHA256 28a9404f4c27caa4117df35e9f664e8ec9bae12d6a941395b64ce4484ea9bc25
MD5 ac40536bcea0c714a349111f30384f41
BLAKE2b-256 9001ecd052a86bebf6c499623ab3fc93e92dae4e8f831297b1a7eb466af73cee

See more details on using hashes here.

Provenance

The following attestation bundles were made for khisto-1.0.0-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.0-py3-none-manylinux_2_24_aarch64.manylinux_2_28_aarch64.whl.

File metadata

File hashes

Hashes for khisto-1.0.0-py3-none-manylinux_2_24_aarch64.manylinux_2_28_aarch64.whl
Algorithm Hash digest
SHA256 e120f30d59a35664a3118b7957153f0f1927d8d55712bc5bae5cc24017e1e66e
MD5 782c44357c17b6a5c4ca3dfbe502abd5
BLAKE2b-256 8450e299967d87cfd30f6184910669a42bd61f1cb3c68fea088d1bec514fd245

See more details on using hashes here.

Provenance

The following attestation bundles were made for khisto-1.0.0-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.0-py3-none-macosx_11_0_arm64.whl.

File metadata

File hashes

Hashes for khisto-1.0.0-py3-none-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 9dc21c11d62cbf386e49c79b0b15fa2f1453165c9d20850701fe02bf4ca695a4
MD5 27b34b3f4d44b0f9a98f2aaff2aafbb6
BLAKE2b-256 f0c1e7a0fdcbc27d6e37c036f9195795bcb4ebe5f7ea9a65d43576487631e13c

See more details on using hashes here.

Provenance

The following attestation bundles were made for khisto-1.0.0-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.0-py3-none-macosx_10_9_x86_64.whl.

File metadata

File hashes

Hashes for khisto-1.0.0-py3-none-macosx_10_9_x86_64.whl
Algorithm Hash digest
SHA256 b5479460f9f07b883663ebbab3cd05a53c3ed4270bbbb9bcafb6845677acfc5c
MD5 7a348856d26732f2ddf9932e326f224c
BLAKE2b-256 585c52636c7d12c70858f9c6b4004b32e7d91aba5a5cf3ae7d8c49006a373e6e

See more details on using hashes here.

Provenance

The following attestation bundles were made for khisto-1.0.0-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

1.0.1

6 files

This release

1.0.0 This release

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