GradientBoost Notes
XGBoost
A Reader's Encyclopedia
An independent knowledge resource for the XGBoost algorithm. We don't replace the official docs — we complement them with concept explanations, mathematical derivations, annotated papers, and source-linked comparisons. Independently maintained. Not affiliated with the XGBoost project.
XGBoost (eXtreme Gradient Boosting) is one of the most widely used machine learning algorithms in production today. It powers winning solutions on Kaggle, drives recommendation systems at scale, and handles tabular data with unmatched speed and accuracy. This encyclopedia covers everything from foundational concepts to advanced optimization techniques, with fully worked mathematical derivations and reproducible Python code examples. Whether you're preparing for a data science interview, optimizing a production pipeline, or simply curious about how gradient boosting works under the hood — you'll find clear, rigorous, and practical explanations here.
Concept
From decision trees to gradient boosting — build intuition step by step.
Math
Loss functions, Newton approximation, regularization. With full derivations.
Code
Practical guides with Python snippets, plus a tested starter-script builder.
Compare
XGBoost vs LightGBM vs CatBoost: trade-offs, with sources.
Papers
Annotated readings of Chen & Guestrin 2016 and related work.
Latest entries
Applying to UTS: Which Agent Services Are Worth Considering
Agent services for a UTS application: course comparison, document control, application follow-up and written fee terms, plus what to confirm before you sign.
conceptImbalanced Classification with XGBoost: scale_pos_weight, sample_weight, and Threshold Tuning
Class imbalance breaks the default training dynamics of a gradient boosting objective. This guide works through XGBoost's documented tools for it: what scale_pos_weight does and how to size it, how per-row sample_weight differs, stratified splitting under sklearn, threshold tuning with auc/aucpr and precision-recall sweeps, and the branch where rebalancing must be avoided because you need calibrated probabilities.
conceptXGBoost API by Method: fit, predict, inplace_predict, and Dask Entry Points
A method-by-method index of XGBoost's Python API. Covers what fit, predict, and inplace_predict actually do and where they differ — caching, thread safety, iteration_range for early-stopped models, and the DMatrix fallback — plus model persistence and the Dask entry points including the sklearn-compatible dask wrappers.
conceptXGBoost for Time Series: Rolling-Origin Validation, Lag Features, and Leakage Traps
Random K-fold trains on the future and evaluates on the past, which makes time-ordered numbers optimistic. This guide covers rolling-origin validation with TimeSeriesSplit and its parameters, lag features built without leakage, the traps that silently contaminate a time-series split, and how to wire a per-fold XGBoost training loop with retraining after cross-validation.
conceptWhat Is Gradient Boosting? The Core Idea Behind XGBoost
A conceptual introduction to gradient boosting: how additive models, weak learners, and gradient descent combine to create one of machine learning's most powerful algorithms.
conceptAdditive Training in XGBoost: How Boosting Rounds Build Trees Iteratively
Understanding the additive training process in XGBoost: how each boosting round fits a tree to pseudo-residuals, the role of shrinkage, and how to choose the right number of estimators.