What is XGBoost and why is it popular?

Answer

XGBoost (Extreme Gradient Boosting) is an optimized gradient boosting framework known for speed, performance, and winning countless Kaggle competitions. It builds an ensemble of decision trees sequentially, with each tree correcting the residuals of the previous. Key advantages: regularization (L1/L2 built-in), sparsity-awareness (handles missing values natively), parallelized tree building, tree pruning (depth-first then prunes), and support for custom loss functions. It works excellently on structured/tabular data and is often the baseline before trying neural networks.