Skip to content
Quantoros

Does a positive XGBoost monotonic constraint require a strictly increasing prediction at every input value?

Classic MLLevel: IntermediateXGBoost · Monotonic constraints

Does a positive XGBoost monotonic constraint require a strictly increasing prediction at every input value?

Hints
  • Distinguish increasing from nondecreasing.
  • Trees naturally have constant leaves.

Answer

No: it enforces a nondecreasing response with other features fixed. Tree predictions can be piecewise constant; flat intervals satisfy the constraint.

Source and licence: XGBoost · Monotonic constraints · Apache-2.0 · answer: Quantoros editorial

Related questions