<?xml version="1.0" encoding="utf-8" standalone="yes"?><rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom"><channel><title>Interpretation, Tuning &amp; Deployment on DATATWEETS</title><link>https://datatweets.com/courses/gradient-boosting/interpretation-tuning-deployment/</link><description>Recent content in Interpretation, Tuning &amp; Deployment on DATATWEETS</description><generator>Hugo</generator><language>en</language><copyright>Copyright (c) 2025 Datatweets</copyright><lastBuildDate>Sun, 05 Jul 2026 09:00:00 +0200</lastBuildDate><atom:link href="https://datatweets.com/courses/gradient-boosting/interpretation-tuning-deployment/index.xml" rel="self" type="application/rss+xml"/><item><title>Lesson 1 - Feature Importance and Its Pitfalls</title><link>https://datatweets.com/courses/gradient-boosting/interpretation-tuning-deployment/lesson-1-feature-importance-and-its-pitfalls/</link><pubDate>Sun, 05 Jul 2026 09:00:00 +0200</pubDate><guid>https://datatweets.com/courses/gradient-boosting/interpretation-tuning-deployment/lesson-1-feature-importance-and-its-pitfalls/</guid><description>Open Module 4 by learning what XGBoost&amp;rsquo;s feature importances really measure. You will compute all three types the booster reports (weight, gain, and cover) on a real California Housing model and watch them disagree: gain crowns MedInc as the top feature (normalized 0.563) while weight and permutation both put Latitude first. You will then run scikit-learn&amp;rsquo;s permutation_importance on the held-out test set, where shuffling Latitude costs the most R2 (1.5858) and MedInc lands only third (0.4301), and learn why gain is biased, computed on training data, and silent about causation, so permutation importance is the more reliable tool for real conclusions.</description></item><item><title>Lesson 2 - Explaining Predictions with SHAP</title><link>https://datatweets.com/courses/gradient-boosting/interpretation-tuning-deployment/lesson-2-explaining-predictions-with-shap/</link><pubDate>Sun, 05 Jul 2026 09:00:00 +0200</pubDate><guid>https://datatweets.com/courses/gradient-boosting/interpretation-tuning-deployment/lesson-2-explaining-predictions-with-shap/</guid><description>Move from the feature-importance rankings of Lesson 1 to SHAP, a game-theoretic method that fairly attributes each prediction to its features. You will fit an XGBRegressor on the real California Housing data, compute exact SHAP values with shap.TreeExplainer, and verify the additivity property numerically (base value 2.072 plus a row&amp;rsquo;s SHAP contributions equals the model&amp;rsquo;s prediction, e.g. 0.460 for the first district). You will then read a global importance ranking from mean absolute SHAP (Latitude 0.563, Longitude 0.476, MedInc 0.406) and see why it disagrees with Lesson 1&amp;rsquo;s gain ranking, before breaking two individual districts down into their signed, plain-language feature contributions.</description></item><item><title>Lesson 3 - Hyperparameter Tuning with Optuna</title><link>https://datatweets.com/courses/gradient-boosting/interpretation-tuning-deployment/lesson-3-hyperparameter-tuning-with-optuna/</link><pubDate>Sun, 05 Jul 2026 09:00:00 +0200</pubDate><guid>https://datatweets.com/courses/gradient-boosting/interpretation-tuning-deployment/lesson-3-hyperparameter-tuning-with-optuna/</guid><description>Move beyond Module 2&amp;rsquo;s grid and random search and let Optuna&amp;rsquo;s Tree-structured Parzen Estimator (TPE) sampler tune XGBoost intelligently. Using a three-way train/validation/test split of the real California Housing data, you run a 30-trial study over six hyperparameters and land on max_depth 9, learning_rate 0.0352, subsample 0.9271, colsample_bytree 0.6613, reg_lambda 0.0878, and min_child_weight 4 (best validation RMSE 0.4535). Refitting that winner on train+validation and judging it once on the untouched test set gives a test RMSE of 0.4420, an honest improvement over the default-XGBoost baseline&amp;rsquo;s 0.4584 on the same split.</description></item><item><title>Lesson 4 - Saving, Serving, and Comparing Libraries</title><link>https://datatweets.com/courses/gradient-boosting/interpretation-tuning-deployment/lesson-4-saving-serving-and-comparing-libraries/</link><pubDate>Sun, 05 Jul 2026 09:00:00 +0200</pubDate><guid>https://datatweets.com/courses/gradient-boosting/interpretation-tuning-deployment/lesson-4-saving-serving-and-comparing-libraries/</guid><description>A model that only lives inside one Python session cannot serve anyone. In this lesson you persist Northwind&amp;rsquo;s tuned XGBoost model with the native, portable save_model (JSON/UBJ) and with joblib pickling, then load each back and confirm the reloaded model&amp;rsquo;s test-set predictions are byte-for-byte identical to the original. You wrap the saved model in a small predict_price() serving function that scores a new district, then train an equivalent LightGBM model on the same split: on this data the two are effectively tied, XGBoost at test RMSE 0.4696 and LightGBM at 0.4686. You finish with honest guidance on when to reach for XGBoost, LightGBM, or CatBoost.</description></item><item><title>Lesson 5 - Guided Project: From Model to Deployable Artifact</title><link>https://datatweets.com/courses/gradient-boosting/interpretation-tuning-deployment/lesson-5-guided-project-from-model-to-deployable-artifact/</link><pubDate>Sun, 05 Jul 2026 09:00:00 +0200</pubDate><guid>https://datatweets.com/courses/gradient-boosting/interpretation-tuning-deployment/lesson-5-guided-project-from-model-to-deployable-artifact/</guid><description>Bring Module 4 together by carrying a single model from training to a deployable artifact on the real California Housing dataset. You tune an XGBoost regressor with a small 25-trial Optuna study to a test RMSE of 0.4404 (R-squared 0.8520), explain it with SHAP (Latitude is the top feature by mean absolute SHAP, ahead of Longitude and MedInc), verify a local prediction reconstructs additively from its base value, then save the model and a JSON model card to a temp directory, reload both, confirm the reloaded predictions match the original exactly, and write a clean predict() serving function. You finish by drafting an honest model card that documents what the model predicts, its metrics, its top features, and its real limitations.</description></item></channel></rss>