XGBoost and LightGBM
Purpose
Use this skill for practical tabular machine learning workflows centered on XGBoost and LightGBM. The current folder is a standard skill entry point; add datasets, notebooks, scripts, or references later as needed.
When To Use
- The user has CSV, Excel, parquet, or database-exported tabular data and wants a predictive model.
- The user asks about XGBoost, LightGBM, GBDT, ranking, classification, regression, feature importance, SHAP, or hyperparameter tuning.
- The user wants to compare boosted-tree models against linear models, random forests, neural nets, or baseline heuristics.
Workflow
- Identify target column, prediction type, unit of analysis, time split needs, and leakage risks.
- Inspect the dataset schema and missingness before modeling.
- Establish a simple baseline metric before tuning.
- Use cross-validation or a time-aware split that matches the real deployment setting.
- Train a conservative first model, then tune only the parameters that matter for the observed failure mode.
- Report metrics, feature importance, leakage concerns, and next experiments.
Quick Defaults
| Task |
Default metric |
| Binary classification |
ROC-AUC plus precision/recall at an operating threshold |
| Multi-class classification |
macro F1 plus confusion matrix |
| Regression |
MAE plus RMSE |
| Imbalanced labels |
PR-AUC plus class-specific recall |
| Time-dependent data |
backtest or forward-chaining validation |
Common Mistakes
- Random split on time-dependent or user-level repeated data.
- Tuning before establishing a baseline.
- Reporting feature importance without checking leakage.
- Treating high validation score as enough without error analysis.
- Using SHAP explanations without confirming the split and preprocessing are valid.
Local Resources
Place reusable notebooks in notebooks/, scripts in scripts/, and modeling references in references/ if this skill grows.
1---2name: xgboost-lightgbm3description: Use when the user works with tabular machine learning using XGBoost, LightGBM, gradient boosting decision trees, feature importance, hyperparameter tuning, model validation, leakage checks, or structured-data prediction tasks.4---56# XGBoost and LightGBM78## Purpose910Use this skill for practical tabular machine learning workflows centered on XGBoost and LightGBM. The current folder is a standard skill entry point; add datasets, notebooks, scripts, or references later as needed.1112## When To Use1314- The user has CSV, Excel, parquet, or database-exported tabular data and wants a predictive model.15- The user asks about XGBoost, LightGBM, GBDT, ranking, classification, regression, feature importance, SHAP, or hyperparameter tuning.16- The user wants to compare boosted-tree models against linear models, random forests, neural nets, or baseline heuristics.1718## Workflow19201. Identify target column, prediction type, unit of analysis, time split needs, and leakage risks.212. Inspect the dataset schema and missingness before modeling.223. Establish a simple baseline metric before tuning.234. Use cross-validation or a time-aware split that matches the real deployment setting.245. Train a conservative first model, then tune only the parameters that matter for the observed failure mode.256. Report metrics, feature importance, leakage concerns, and next experiments.2627## Quick Defaults2829| Task | Default metric |30| --- | --- |31| Binary classification | ROC-AUC plus precision/recall at an operating threshold |32| Multi-class classification | macro F1 plus confusion matrix |33| Regression | MAE plus RMSE |34| Imbalanced labels | PR-AUC plus class-specific recall |35| Time-dependent data | backtest or forward-chaining validation |3637## Common Mistakes3839- Random split on time-dependent or user-level repeated data.40- Tuning before establishing a baseline.41- Reporting feature importance without checking leakage.42- Treating high validation score as enough without error analysis.43- Using SHAP explanations without confirming the split and preprocessing are valid.4445## Local Resources4647Place reusable notebooks in `notebooks/`, scripts in `scripts/`, and modeling references in `references/` if this skill grows.48