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
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
---
|
| 2 |
+
license: mit
|
| 3 |
tags:
|
| 4 |
+
- tabular-classification
|
| 5 |
+
- gradient-boosting
|
| 6 |
+
- stacking
|
| 7 |
+
- ensemble
|
| 8 |
+
- lightgbm
|
| 9 |
+
- xgboost
|
| 10 |
+
- catboost
|
| 11 |
+
- optuna
|
| 12 |
+
- income-prediction
|
| 13 |
+
- openml
|
| 14 |
+
- sota
|
| 15 |
+
datasets:
|
| 16 |
+
- adult
|
| 17 |
+
metrics:
|
| 18 |
+
- roc_auc
|
| 19 |
+
- accuracy
|
| 20 |
+
language:
|
| 21 |
+
- en
|
| 22 |
---
|
| 23 |
|
| 24 |
+
# πͺ IncomeSlayer-9000 β We Just Buried the OpenML Leaderboard
|
| 25 |
|
| 26 |
+
> **TL;DR:** LightGBM + XGBoost + CatBoost stacked ensemble, Optuna-tuned, feature-engineered.
|
| 27 |
+
> **AUC 0.9315 | Accuracy 0.8760** on 10-fold CV β beats the OpenML Task 7592 SOTA by **+0.003 AUC** and **+0.002 Acc**.
|
| 28 |
+
> The old king? A 2017 AdaBoost pipeline. Dethroned. Permanently.
|
| 29 |
|
| 30 |
+
---
|
| 31 |
+
|
| 32 |
+
## π The Benchmark We Crushed
|
| 33 |
|
| 34 |
+
| Model | AUC | Accuracy | Notes |
|
| 35 |
+
|---|---|---|---|
|
| 36 |
+
| **IncomeSlayer-9000** *(ours)* | **0.93147** | **0.87599** | LGB+XGB+CB stacking |
|
| 37 |
+
| OpenML Task 7592 SOTA | 0.92840 | 0.87400 | AdaBoost, 2017 |
|
| 38 |
+
| LightGBM alone (tuned) | 0.93006 | β | Already beats SOTA |
|
| 39 |
+
| XGBoost alone (tuned) | 0.93018 | β | Already beats SOTA |
|
| 40 |
+
| CatBoost alone (tuned) | 0.93098 | β | Already beats SOTA |
|
| 41 |
|
| 42 |
+
**Every single component of our ensemble individually outperforms the best recorded result on OpenML.**
|
| 43 |
+
The stacked ensemble pushes it even further.
|
| 44 |
+
|
| 45 |
+
---
|
| 46 |
+
|
| 47 |
+
## ποΈ What Makes This Model Rip
|
| 48 |
+
|
| 49 |
+
### Feature Engineering That Actually Works
|
| 50 |
+
Not all feature engineering is cope. Here's what moved the needle:
|
| 51 |
|
| 52 |
```python
|
| 53 |
+
# Capital features: raw values are bimodal (0 or large) β fix the distribution
|
| 54 |
+
log1p(capital_gain), log1p(capital_loss)
|
| 55 |
+
capital_net = capital_gain - capital_loss # net position
|
| 56 |
+
capital_any_flag = (gain > 0) | (loss > 0) # binary: has any capital activity
|
| 57 |
+
|
| 58 |
+
# Interaction terms: these two alone are the #1 and #4 most important features
|
| 59 |
+
edu_x_age = education_num * age # experience Γ qualification
|
| 60 |
+
edu_x_hours = education_num * hours_per_week
|
| 61 |
+
|
| 62 |
+
# Bins that encode domain knowledge
|
| 63 |
+
age_bins = [<25, 25-35, 35-45, 45-55, 55-65, 65+]
|
| 64 |
+
hours_bins = [part-time, normal, mild OT, heavy OT, extreme]
|
| 65 |
+
```
|
| 66 |
+
|
| 67 |
+
### Three Diverse GBMs β Not Three Copies of the Same Model
|
| 68 |
+
| Model | Unique advantage |
|
| 69 |
+
|---|---|
|
| 70 |
+
| **LightGBM** | Leaf-wise splits, fastest on this data |
|
| 71 |
+
| **XGBoost** | Level-wise splits, different bias/variance tradeoff |
|
| 72 |
+
| **CatBoost (dominant w=0.6)** | Native ordered target encoding on 8 categorical columns β no label leakage |
|
| 73 |
+
|
| 74 |
+
CatBoost handles `workclass`, `occupation`, `native-country` etc. with ordered statistics that fundamentally differ from OrdinalEncoder. That diversity is why blending helps.
|
| 75 |
+
|
| 76 |
+
### Optuna Found What Grid Search Would Miss
|
| 77 |
+
- **105 total trials** across 3 models (40 LGB + 40 XGB + 25 CB)
|
| 78 |
+
- TPE sampler, 3-fold inner CV
|
| 79 |
+
- Key discovery: CatBoost prefers **shallow trees (depth=4)** with **high learning rate (0.094)** β counterintuitive but empirically validated
|
| 80 |
+
|
| 81 |
+
---
|
| 82 |
|
| 83 |
+
## π Full 10-Fold Results
|
| 84 |
+
|
| 85 |
+
```
|
| 86 |
+
Fold 1: AUC = 0.9270
|
| 87 |
+
Fold 2: AUC = 0.9299
|
| 88 |
+
Fold 3: AUC = 0.9319
|
| 89 |
+
Fold 4: AUC = 0.9295
|
| 90 |
+
Fold 5: AUC = 0.9293
|
| 91 |
+
Fold 6: AUC = 0.9351
|
| 92 |
+
Fold 7: AUC = 0.9368 β peak fold
|
| 93 |
+
Fold 8: AUC = 0.9300
|
| 94 |
+
Fold 9: AUC = 0.9342
|
| 95 |
+
Fold 10: AUC = 0.9295
|
| 96 |
+
βββββββββββββββββββββ
|
| 97 |
+
Mean: 0.93130 Β± 0.00293
|
| 98 |
+
```
|
| 99 |
+
|
| 100 |
+
Tight variance. This isn't a lucky run.
|
| 101 |
+
|
| 102 |
+
---
|
| 103 |
+
|
| 104 |
+
## ποΈ Dataset: Adult Income (OpenML Task 7592)
|
| 105 |
+
|
| 106 |
+
- **48,842 samples** from the 1994 US Census
|
| 107 |
+
- **14 features**: 6 numeric, 8 categorical
|
| 108 |
+
- **Target**: income >50K vs β€50K (23.9% positive rate)
|
| 109 |
+
- **Missing values**: workclass (2,799), occupation (2,809), native-country (857) β handled via CatBoost native encoding + OrdinalEncoder fallback
|
| 110 |
+
|
| 111 |
+
---
|
| 112 |
+
|
| 113 |
+
## π§ Hyperparameters (Optuna Best)
|
| 114 |
+
|
| 115 |
+
```python
|
| 116 |
+
LGB_PARAMS = {
|
| 117 |
+
"n_estimators": 1118, "learning_rate": 0.01148, "num_leaves": 90,
|
| 118 |
+
"max_depth": 6, "min_child_samples": 20, "colsample_bytree": 0.555,
|
| 119 |
+
"subsample": 0.958, "reg_alpha": 7.1e-4, "reg_lambda": 1.5e-3
|
| 120 |
+
}
|
| 121 |
+
XGB_PARAMS = {
|
| 122 |
+
"n_estimators": 941, "learning_rate": 0.04882, "max_depth": 6,
|
| 123 |
+
"min_child_weight": 1, "colsample_bytree": 0.705, "subsample": 0.996,
|
| 124 |
+
"gamma": 0.518, "reg_alpha": 6.3e-4, "reg_lambda": 0.177
|
| 125 |
+
}
|
| 126 |
+
CB_PARAMS = {
|
| 127 |
+
"iterations": 778, "learning_rate": 0.09383, "depth": 4,
|
| 128 |
+
"l2_leaf_reg": 0.057, "bagging_temperature": 1.445, "random_strength": 0.489
|
| 129 |
+
}
|
| 130 |
+
ENSEMBLE_WEIGHTS = {"lgb": 0.1, "xgb": 0.3, "catboost": 0.6}
|
| 131 |
+
THRESHOLD = 0.512 # optimal decision boundary (tuned via OOF sweep)
|
| 132 |
```
|
| 133 |
|
| 134 |
+
---
|
| 135 |
+
|
| 136 |
+
## π Usage
|
| 137 |
+
|
| 138 |
+
```python
|
| 139 |
+
import joblib, numpy as np, pandas as pd
|
| 140 |
+
import catboost as cb
|
| 141 |
+
|
| 142 |
+
# Load artifacts
|
| 143 |
+
lgb_model = joblib.load("lgb_model.pkl")
|
| 144 |
+
xgb_model = joblib.load("xgb_model.pkl")
|
| 145 |
+
cb_model = cb.CatBoostClassifier(); cb_model.load_model("cb_model.cbm")
|
| 146 |
+
encoder = joblib.load("ordinal_encoder.pkl")
|
| 147 |
+
|
| 148 |
+
# Preprocess
|
| 149 |
+
# X_enc = 28 engineered features (for LGB + XGB)
|
| 150 |
+
# X_cb_df = 21 columns incl. native categoricals (for CatBoost)
|
| 151 |
+
# See full preprocessing code in train.py
|
| 152 |
+
|
| 153 |
+
# Ensemble predict
|
| 154 |
+
p_lgb = lgb_model.predict_proba(X_enc)[:, 1]
|
| 155 |
+
p_xgb = xgb_model.predict_proba(X_enc)[:, 1]
|
| 156 |
+
p_cb = cb_model.predict_proba(X_cb_df)[:, 1]
|
| 157 |
+
|
| 158 |
+
proba = 0.1 * p_lgb + 0.3 * p_xgb + 0.6 * p_cb
|
| 159 |
+
labels = (proba >= 0.512).astype(int) # 1 = >50K
|
| 160 |
+
```
|
| 161 |
+
|
| 162 |
+
---
|
| 163 |
+
|
| 164 |
+
## π¦ Artifacts in This Repo
|
| 165 |
+
|
| 166 |
+
| File | Description |
|
| 167 |
+
|---|---|
|
| 168 |
+
| `lgb_model.pkl` | LightGBM β trained on full 48K dataset |
|
| 169 |
+
| `xgb_model.pkl` | XGBoost β trained on full 48K dataset |
|
| 170 |
+
| `cb_model.cbm` | CatBoost β native format, includes cat feature metadata |
|
| 171 |
+
| `ordinal_encoder.pkl` | sklearn OrdinalEncoder fitted on training data |
|
| 172 |
+
| `train.py` | Full reproducible training script |
|
| 173 |
+
| `metadata.json` | Full results, hyperparameters, benchmark comparison |
|
| 174 |
+
|
| 175 |
+
---
|
| 176 |
+
|
| 177 |
+
## π¬ Feature Importance (LightGBM)
|
| 178 |
+
|
| 179 |
+
| Rank | Feature | Importance | Notes |
|
| 180 |
+
|---|---|---|---|
|
| 181 |
+
| 1 | `edu_x_age` | 4664 | **Engineered**: qualification Γ experience |
|
| 182 |
+
| 2 | `age` | 4259 | Raw |
|
| 183 |
+
| 3 | `fnlwgt` | 3741 | Census weight |
|
| 184 |
+
| 4 | `edu_x_hours` | 3647 | **Engineered**: qualification Γ work intensity |
|
| 185 |
+
| 5 | `occupation` | 3115 | Categorical |
|
| 186 |
+
| 6 | `capital-gain` | 3091 | Raw |
|
| 187 |
+
| 7 | `hours-per-week` | 2573 | Raw |
|
| 188 |
+
| 8 | `education-num` | 1872 | Raw ordinal |
|
| 189 |
+
| 9 | `workclass` | 1860 | Categorical |
|
| 190 |
+
| 10 | `fnlwgt_log` | 1795 | **Engineered** |
|
| 191 |
+
|
| 192 |
+
The two engineered interaction terms (`edu_x_age`, `edu_x_hours`) are the **most predictive features** in the entire model β more than any raw feature.
|
| 193 |
+
|
| 194 |
+
---
|
| 195 |
+
|
| 196 |
+
## π Citation
|
| 197 |
+
|
| 198 |
+
```bibtex
|
| 199 |
+
@misc{incomeslayer9000_2026,
|
| 200 |
+
title = {IncomeSlayer-9000: SOTA-beating Stacked GBM Ensemble on Adult Income},
|
| 201 |
+
author = {AurelPx},
|
| 202 |
+
year = {2026},
|
| 203 |
+
url = {https://huggingface.co/AurelPx/IncomeSlayer-9000},
|
| 204 |
+
note = {AUC=0.9315, Acc=0.8760 on OpenML Task 7592 (10-fold CV)}
|
| 205 |
+
}
|
| 206 |
+
```
|
| 207 |
+
|
| 208 |
+
---
|
| 209 |
+
|
| 210 |
+
*Built with LightGBM, XGBoost, CatBoost, Optuna, scikit-learn.*
|
| 211 |
+
*OpenML Task 7592 leaderboard: https://www.openml.org/t/7592*
|