← Back to all sparks
O

OptimalBinningWoE

INFRA · APIS
Velocity2.5

Optimal Binning and Weight of Evidence Framework for Modeling

OptimalBinningWoE spent two releases auditing a C++ engine that was crashing R sessions.

credit-scoringbinningcpp-enginenumerical-correctnessregression-testing
Current state
The package wraps 37 binning algorithms in C++, and the last two releases have been dedicated audits of that engine rather than new functionality. The 1.11.0 runtime audit found a segmentation fault in categorical binning that killed the R session for any predictor with no more levels than max_bins — with the default of five, that covers sex, marital status, region, and education. Earlier releases were CRAN compliance patches.
Where it's heading
The engineering practice is visibly maturing: a static audit in 1.10.0, then a runtime audit in 1.11.0 driven by address and undefined-behaviour sanitizers, a degenerate-input stress harness, and a golden-output regression suite of roughly 3,200 comparisons, with every fix pinned by a test that fails on the prior version. No public API has changed across either release. The package is buying back trust in results that were silently wrong or unreproducible.
Prediction
With the audit programme apparently complete across both static and runtime passes, the next release is more likely to resume feature work on the binning algorithms than to continue hardening.

Recent moves

  1. 5d ago

    v1.11.0 — Runtime audit: crash, hang, data-loss and reproducibility fixes

    A runtime audit fixing crashes, hangs, data loss, and reproducibility defects across the engine, each pinned by a regression test that fails on 1.10.0. The categorical segfault alone affected the most common predictor shapes, so users of the prior version should treat results as suspect.

    View source ↗
  2. 3mo ago

    v1.10.0 — C++ Engine Audit & Hardening

    The static half of the audit, covering all 36 algorithms with no public API changes. Notable fixes include monotonicity direction being hardcoded as ascending, which forced unnecessary merges whenever the trend ran negative.

    View source ↗
  3. 5mo ago

    CRAN fix: proper C++ stack unwinding in error paths

    A CRAN compliance patch replacing Rf_error with Rcpp::stop so C++ stacks unwind properly. Housekeeping that foreshadows the memory-safety focus of the later audits.

    View source ↗
  4. 6mo ago

    Fixes LTO link errors from One Definition Rule violations

    Wraps internal cache helper classes in anonymous namespaces to clear One Definition Rule violations flagged by CRAN's link-time optimization checks. Build-level only.

    View source ↗
  5. 6mo ago

    Removes sketch binning cache while chasing UBSAN errors

    Removes a caching class from the sketch binning algorithm and disables its tests while chasing persistent sanitizer errors. An early sign of the memory-safety problems the later audits addressed systematically.

    View source ↗