MLCrack

    CLASSICAL ML · INTERVIEW QUESTION

    Compare XGBoost, LightGBM, and CatBoost. When would you use each?

    🔴 advanced · Supervised Learning

    Hint: Think about training speed, handling of categorical features, and memory usage.

    Answer

    XGBoost: depth-wise growth by default with configurable policies including lossguide; uses exact greedy or approximate splits (histogram-based in recent versions). Supports GPU. Strong regularization options. Mature ecosystem. LightGBM: leaf-wise tree growth (faster convergence, risk of overfitting on small data), native histogram-based splits, GOSS (Gradient-based One-Side Sampling), EFB (Exclusive Feature Bundling). Training speed and memory depend on data, configuration, hardware and tuning budget. CatBoost: native ordered target encoding for categoricals (avoids target leakage), symmetric trees, ordered boosting (avoids prediction shift). A useful candidate for categorical-heavy data; benchmark against alternatives. Recommendations: LightGBM for speed on large data, CatBoost when many categorical features, XGBoost as a reliable default. All are strong tabular baselines. Compare them with linear models and suitable neural methods using the same splits, metrics, hardware and tuning budget; no method is universally best.