Learn/Course 05
Classical ML · weeks 7

Trees, forests & gradient boosting

A marketplace must catch rare fraud without blocking trustworthy sellers.

Opening production brief

A measurable problem, before a model.

Users

Operators, product owners, and people affected by the trees & boosting decision.

Data

impurity gain, bagging, feature subsampling, pseudo-residuals with version, owner, event time, and availability contracts.

Constraints

A marketplace must catch rare fraud without blocking trustworthy sellers. Every solution must state latency, cost, capacity, and fallback limits.

Success

Offline evidence plus a deployable resolution: Calibrated random-forest and XGBoost baselines with cost-sensitive thresholds.

CHAPTER 1

Frame and baseline

Turn the production problem into explicit data, metric, and baseline contracts.

  1. 01

    Trees as learned decision rules

    A tree learns readable local rules; constraints keep those rules from becoming a lookup table.

    65–90 min · checkpoint · deterministic lab
  2. 02

    Random forests and diversity

    A forest is strong when its trees are individually useful and collectively disagree in the right ways.

    65–90 min · checkpoint · deterministic lab
CHAPTER 2

Build and stress

Formalize the machinery, test counterexamples, and expose system limits.

  1. 03

    Gradient boosting as error correction

    Boosting learns by repeatedly asking: what structured error remains?

    65–90 min · checkpoint · deterministic lab
  2. 04

    XGBoost: regularized boosting at scale

    XGBoost scales boosting by turning gradient statistics into regularized decisions about leaves and splits.

    65–90 min · checkpoint · deterministic lab
CHAPTER 3

Resolve and operate

Join model behavior to architecture, observability, rollout, and rollback.

  1. 05

    Calibrating and explaining ensembles

    Calibrate probabilities for decisions, and read explanations as model accounting—not causal proof.

    65–90 min · checkpoint · deterministic lab
  2. HW

    Rare-fraud ensemble decision system

    Compare a tree, forest, gradient boosting, and XGBoost with temporal validation and operational thresholding.

    Rubric · staged hints · reference resolution
Prerequisite guidance

1 concepts make this faster.

Prerequisites are guidance, never hard gates.

C04Classical baselinesA justified baseline across regression, Naive Bayes, kNN, and SVM.
Ready to work the problem?

Trees as learned decision rules

Start lesson 01