optbinning
OptBinning: The Python Optimal Binning library
Decision gist · record as of 2026-08-14
Yes, if you need principled optimal binning with constraint support for feature engineering. The low install friction, permissive license, and active (though aging) maintenance make it a solid choice. However, verify that its mathematical programming approach and dependency footprint fit your performance and deployment constraints before committing to production use.AI-flagged interpretation of the facts on this page — verify before relying
Before you install
- Low install friction with a pure-wheel distribution.
- Maintenance status is aging—last commit was 292 days ago—but the repository remains active and not archived, with steady community interest (531 stars).
License · maintenance · safety
Apache Licence 2.0 (permissive) — Distributed under Apache 2.0 (permissive), allowing commercial and private use with minimal restrictions; you must retain license and copyright notices.
last release 2025-10-26 (292 days) · last repo commit 2026-02-14 · 531 stars
0 known vulnerabilities (OSV.dev, 2026-08-14) · 298,804 downloads/mo, #7,868 on PyPI
Alternatives
Verify before relying
pip install optbinning
import optbinning
# Requires numpy, scipy, scikit-learn, pandas, matplotlib, ortools, ropwr as runtime dependencies- Whether the mathematical programming formulation scales to very large datasets or high-dimensional problems.
- Performance characteristics and typical runtime for common binning scenarios.
- Specific constraint types supported beyond what the description excerpt mentions.
What it is and what it does
OptBinning is a Python library that solves the optimal binning problem—finding the best way to discretize a continuous or discrete numeric variable into bins to maximize predictive power or meet other objectives with respect to a target variable. It uses rigorous mathematical programming to handle binary, continuous, and multiclass targets, and incorporates constraints that go beyond simpler binning approaches.
The library depends on numpy, scipy, scikit-learn, pandas, matplotlib, ortools, and ropwr. It is designed for data scientists and researchers working on feature engineering, model preprocessing, and statistical analysis where controlled discretization of variables is needed.
Use it for
- Feature engineering in credit risk or classification models where binned variables improve interpretability and model performance.
- Discretizing continuous predictors in logistic regression or tree-based models with explicit constraints on bin counts or monotonicity.
- Exploratory data analysis to find natural or optimal breakpoints in a variable's relationship to a target outcome.
- Preprocessing for regulatory or compliance requirements that demand human-interpretable variable bins with documented thresholds.
Worth the install?
AI-flagged interpretation of the facts on this page. Verify before relying on it.
Yes, if you need principled optimal binning with constraint support for feature engineering.
The low install friction, permissive license, and active (though aging) maintenance make it a solid choice. However, verify that its mathematical programming approach and dependency footprint fit your performance and deployment constraints before committing to production use.
Install
optbinning on PyPI
Before you install
Low install friction with a pure-wheel distribution. Maintenance status is aging—last commit was 292 days ago—but the repository remains active and not archived, with steady community interest (531 stars).
License in practice
Distributed under Apache 2.0 (permissive), allowing commercial and private use with minimal restrictions; you must retain license and copyright notices.
Quickstart
pip install optbinning
import optbinning
# Requires numpy, scipy, scikit-learn, pandas, matplotlib, ortools, ropwr as runtime dependencies
Verify before relying
- Whether the mathematical programming formulation scales to very large datasets or high-dimensional problems.
- Performance characteristics and typical runtime for common binning scenarios.
- Specific constraint types supported beyond what the description excerpt mentions.
Package facts
| License | Apache Licence 2.0 permissive |
| Python support | Supports the current Python release >=3.7 |
| Install friction | Low. Pure-Python wheel |
| Runtime dependencies | 7 packagesmatplotlibnumpyortoolspandasropwrscikit-learnscipy |
| Maintenance | Aging 292 days since the last release |
| Last repo commit | |
| First released | |
| Downloads | 298,804 / month, #7,868 on PyPI 30-day window, as of 2026-08-14 |
| Known vulnerabilities | None known OSV.dev, checked 2026-08-14 |
| Classifiers | Intended Audience :: DevelopersIntended Audience :: EducationIntended Audience :: Science/ResearchLicense :: OSI Approved :: Apache Software LicenseProgramming Language :: Python :: 3Programming Language :: Python :: 3.10Programming Language :: Python :: 3.11Programming Language :: Python :: 3.12Programming Language :: Python :: 3.9Topic :: Scientific/Engineering :: MathematicsTopic :: Software Development :: LibrariesTopic :: Software Development :: Libraries :: Python Modules |
Evidence: optbinning-0.21.0-py3-none-any.whl
Tags
Let your AI agent find packages like this
Example. Real query, live index.
You found this page by searching. An agent finds it by wishing: SkillFed indexes 14,416 PyPI packages by what they can do, searchable in plain language.
wish › “optimal binning discretization”
- optbinningOptBinning discretizes numeric variables into bins optimally for…
- jenkspyComputes optimal class boundaries for numerical data using the…
- mapclassifyMapclassify implements classification schemes for choropleth maps,…
Give your agent the search over MCP, or paste the wish link into any chat.
More Libraries packages
urllib3 is an HTTP client library that provides thread-safe connection pooling, SSL/TLS verification, multipart file uploads, request retries, compression support, and proxy handling for Python applications.
Requests is a Python HTTP library that simplifies sending HTTP/1.1 requests with automatic handling of headers, authentication, cookies, and response parsing.
Pluggy provides a plugin system that lets you define hook specifications and register implementations to be called in sequence, enabling extensible Python applications without tight coupling.
Install it if you're building an extensible application or framework.
Provides parsing, arithmetic, and recurrence rule computation for dates and times, with timezone support and iCalendar RFC compliance.
Install it if you need to parse flexible date strings, compute relative dates, handle timezones, or work with recurrence rules—it's the de facto choice for these tasks.
Six provides utility functions to write Python code that runs on both Python 2.7 and Python 3.3+, smoothing over language differences between the two versions.
pytest is a testing framework that lets you write test functions using plain assert statements and automatically discovers and runs them, with detailed failure reporting.
See also optlang · jenkspy · ropwr · prtpy · py3dbp · nlopt · cvxopt · binpacking · cvxpy-base · munkres