Feature engineering and preprocessing · insight-1134draft — in review
Audit a monotonically constrained model with sweeps on real rows, because the constraint is only marginal
- Evidence type
- documented fact
- Difficulty
- medium
- Roles
- Data scientist, ML engineer
- Industries
- banking, aviation
Summary: situation, action, reason, boundary
Situation
A boosted model is trained with monotone constraints and the team states that price always lowers predicted demand.
Action
For a sample of real rows, sweep the constrained feature over a grid with the others fixed, assert the predictions never move the wrong way, and state in the report that other features moving at once is outside the guarantee.
Reason
The constraint guarantees monotonicity with respect to one feature holding the others fixed, not for combined changes, and it is unsupported for some model types.
Boundary
Pricing, credit and risk models where a directional rule is a business or regulatory requirement.
Symptom or risk
The claim is repeated beyond what is guaranteed; constraints are not available for categorical or multiclass cases and do not cover changes in several features at once.
Exceptions
Models with no directional rule to defend.
Trade-offs
Constraints regularize but can cost accuracy if the true relationship is not monotone in some segments.
Pitfalls
Checking only the partial dependence average, which does not reveal a violating row.
Lessons and concepts
Claims and their sources
scikit-learn's HistGradientBoosting monotonic constraints only marginally constrain feature effects, are not supported for multiclass classification and cannot be enforced on categorical features.