What are monotonic constraints in XGBoost / LightGBM and when do you use them?
hardAnswer
- You can force the prediction to be non-decreasing (or non-increasing) in a specified feature.
- Useful for regulatory / business constraints: 'credit score shouldn't decrease when income goes up', 'insurance premium shouldn't drop when age increases'.
- The algorithm restricts split choices during growth to preserve monotonicity.
- Adds slight bias for a big interpretability + trust win.
- Configured via in each library.
Check yourself — multiple choice
- They speed up training
- Force predictions to be monotonic in a feature — useful for regulatory / trust constraints
- They only apply to regression
- They replace regularization
Monotone constraints enforce direction of effect per feature — great for regulated domains.
#xgboost#lightgbm#gradient-boosting#interpretability
Practise Supervised Learning
215 interview questions in this topic.
Related questions
- Rule of thumb: when do you pick XGBoost vs LightGBM vs CatBoost?
- What did XGBoost bring on top of vanilla GBM?
- What are LightGBM's key innovations vs XGBoost?
- Which XGBoost hyperparameters have the biggest impact, and in what tuning order?
- How do you handle class imbalance in XGBoost / LightGBM?
- How do XGBoost, LightGBM, and CatBoost each handle categorical features?