AutoCarver — supervised, robust binning for tabular data

AutoCarver turns raw numeric, categorical and ordinal columns into a few human-readable bins, chosen by their association with your target and kept only if they hold on a held-out dev sample. One API covers binary, multiclass, ordinal and continuous targets.

Titanic Age before and after BinaryCarver: 84 raw values, then 3 buckets with a monotonic survival rate
pip install autocarver

Start here: the Quick Start (a runnable Titanic example), then Carvers Examples, and the Comparison with other binning libraries with optbinning and KBinsDiscretizer.

  • Searched, not eyeballed — a dynamic-programming search ranks candidate groupings by Tschuprow’s T (default) or Cramér’s V (Combinations).

  • Robust by construction — a grouping is kept only if its buckets and target-rate order hold on a dev sample or cross-validation folds (Viability testing).

  • Auditable — per-bin statistics, the full carving history, and manual edits that transform applies like any carved bin (Features).