ML Case Labs — Validation, Boosting, Segmentation, Pipelines
Back to M2 — Boosting + Calibrated Evaluation

RF vs XGB/LGBM Case Walkthrough

Outcome: compare RF vs boosting on campaign data. Curated video (6:04, verified 2026-09-24 via yt-dlp): Random Forest vs XGBoost: Which One Should You Actually Use? (IvyProSchool) Watch: https://www.youtube.com/watch?v=HKtHezjnncQ Notes: Bagging vs boosting framing; RF vs XGB use cases, performance + data-handling comparison. Apply to campaign-response data: compare, then calibrate before deciding. Key moments: 0:00 Intro; 0:33 Bagging vs Boosting; 1:16 RF use case; 1:49 XGB use case; 2:26 Performance; 3:02 Data handling; 4:15 Final comparison; 5:31 Best approach.

6 minutesVideo LessonPDF notes
🎯 Free Guest Mode: You are learning for free. Sign in to save your completion progress and quiz answers.
Loading progress...

Key moments

  1. Campaign Data and Baseline — Review the marketing campaign response dataset structure and establish the initial evaluation metrics.
  2. Random Forest Implementation — Train a Random Forest classifier and analyze baseline precision, recall, and feature importances.
  3. XGBoost Training and Tuning — Configure XGBoost with residual gradient learning, scale_pos_weight, and early stopping.
  4. LightGBM Histogram Optimization — Implement LightGBM leaf-wise training and benchmark computational speed against prior models.
  5. Comparative Model Selection — Compare PR-AUC curves, top-decile lift, and deployment latency tradeoffs across all three algorithms.
PDF notes

Frequently asked questions

Why does LightGBM train faster than XGBoost on marketing tabular datasets?

LightGBM discretizes continuous features into histogram bins and uses leaf-wise splitting, avoiding continuous value sort operations during split candidate evaluation.

When is Random Forest preferred over XGBoost or LightGBM?

Random Forest is preferred when minimal hyperparameter tuning time is available, when data contains noisy outliers, or when embarrassingly parallel training is prioritized.

How should scale_pos_weight be set for imbalanced campaign targeting?

Set scale_pos_weight to the ratio of negative non-responder instances to positive responder instances (negative_count / positive_count).

How was this lesson?

Your feedback helps us refine explanations and catch bugs.