guillermo-navas-palencia/optbinning
Optimal binning: monotonic binning with constraints. Support batch & stream optimal binning. Scorecard modelling and counterfactual explanations.
What it solves
OptBinning provides a rigorous mathematical approach to the optimal binning problem. It allows users to discretize continuous variables into bins that maximize the relationship with a target variable (binary, continuous, or multiclass), while incorporating specific constraints to ensure the resulting bins are statistically sound and useful for predictive modeling.
How it works
The library uses a mathematical programming formulation to find the best split points for data. It supports several binning types, including 1D and 2D binning, and can handle streaming data or batch processing. It integrates with solvers like OR-Tools and ECOS to optimize the binning process. Once binned, it can transform data into metrics like Weight of Evidence (WoE) or event rates and perform statistical analysis (e.g., Gini index, Information Value) to validate the binning quality.
Who it’s for
It is designed for data scientists and ML engineers, particularly those working on scorecard modeling, risk assessment, and feature engineering for traditional machine learning models where interpretability and discretization are critical.
Highlights
- Flexible Target Types: Supports binary, continuous, and multiclass targets.
- Advanced Binning: Includes 1D and 2D optimal binning, as well as piecewise binning.
- Scorecard Integration: Built-in tools to create scorecards and generate counterfactual explanations.
- Data Stream Support: Capable of handling binning for streaming data.
- Statistical Validation: Provides comprehensive analysis tools for binning tables, including significance tests between bins.
Related
- Project
- Project
- Project
- Project
- Project