← All work

Interpretable ML

Carbon Footprint Prediction — A Comparative, Interpretable ML Study

Nine regressors benchmarked to predict an individual's carbon emissions from behavior — where disciplined preprocessing turned a middling model into a CatBoost regressor with MAE 66.4 (44% below the runner-up), and SHAP explained why.

RoleCo-author · 3-person teamWhen2026ContextTechnical report · Universitas Indonesia
0.9920
R² · CatBoost (best of 9)
66.37
MAE · 44% below runner-up
9
Models benchmarked
10k
Individual records

The problem

Individuals account for roughly half of greenhouse-gas emissions, yet most carbon modeling targets factories and regions, not people. We asked a narrower, more useful question: from someone’s everyday behavior — how they travel, eat, shop, heat their home — can we predict their carbon footprint accurately, cheaply, and explainably enough to hand back actionable advice?

“Explainable” and “cheap” were first-class constraints, not afterthoughts. The target was a model light enough for modest hardware and transparent enough to tell a person which habit to change.

The data

10,000 records of individual behavior — 20 features (7 numerical, 13 categorical) predicting a continuous CarbonEmission target. The hard parts were all in the categoricals:

  • Heavy missingness where it mattered: Vehicle Type was absent for ~67% of records — too central to drop, too sparse to impute blindly.
  • Multi-valued fields: Recycling and Cooking_With held lists (“recycles paper and metal”), not single categories.
  • Weak linear signal: the correlation heatmap put almost every feature at |r| < 0.2 against the target — a clear signal that linear models would flounder and the value lived in non-linear interactions.

That last finding set the entire strategy: engineer the categoricals richly, then let tree ensembles find the interactions.

Approach & reasoning

Instead of reaching for a model first, we built the preprocessing around what the EDA told us:

  • Ordinal encoding for naturally-ordered categoricals (air-travel frequency never → very frequently, waste-bag size, transport mode, heating source) — preserving order the trees can split on.
  • Multi-label one-hot for the list-valued fields, so Recycling = [Paper, Metal] becomes separate signals. (This is exactly what later let SHAP attribute emissions to specific materials.)
  • Feature consolidation — merging redundant appliance flags (Airfryer, Grill) into one via logical OR to cut noise.
  • Missingness as signal — encoding absent Vehicle Type as its own value rather than dropping or guessing.

Then we benchmarked nine regressors on identical splits — Linear Regression and SVR, Random Forest, the gradient-boosting family (XGBoost, LightGBM, CatBoost), and an MLP — so the winner would be earned, not assumed.

Results

After the enhanced preprocessing, CatBoost led on every metric:

ModelMAEMSE
CatBoost66.378,297.930.9920
LightGBM117.7524,441.530.9765
Neural Network (MLP)122.8027,883.480.9732
XGBoost127.5428,190.970.9729
Gradient Boosting169.6951,754.100.9502
Linear Regression168.0465,542.200.9370
Random Forest229.0687,627.970.9157
Decision Tree343.64210,728.160.7973
Support Vector Regressor667.32762,675.950.2665

Two things are worth reading carefully:

1. The MAE gap is the real story. On R², CatBoost (0.9920) edges LightGBM (0.9765) by a hair. But on mean absolute error it’s 66.4 vs 117.8 — a 44% reduction — and on MSE roughly a third. When models cluster on R², MAE is the honest tiebreaker, and CatBoost wins it decisively.

2. Preprocessing, not model choice, delivered most of the gain. The same models, before vs after the pipeline:

ModelR² beforeR² afterΔ
CatBoost0.93240.9920+0.0596
LightGBM0.92430.9765+0.0522
XGBoost0.91070.9729+0.0622
Neural Network (MLP)0.75620.9732+0.2170
Linear Regression0.75890.9370+0.1781

CatBoost’s MAE fell from 199.5 to 66.4 — by two-thirds — purely from better data handling. The lesson I’d defend anywhere: feature engineering is usually where regression problems are won.

We report the two headline metrics in the usual way:

R2=1i(yiy^i)2i(yiyˉ)2,MAE=1niyiy^i.R^2 = 1 - \frac{\sum_i (y_i - \hat{y}_i)^2}{\sum_i (y_i - \bar{y})^2}, \qquad \mathrm{MAE} = \frac{1}{n}\sum_i \lvert y_i - \hat{y}_i \rvert.

Interpretability — SHAP

A number isn’t an insight, so we ran SHAP on the final CatBoost model to turn it into advice:

  • Vehicle monthly distance dominates — by a wide margin the single largest driver of predicted emissions.
  • Air-travel frequency is next: “very frequently” pushes emissions up sharply; “never” pulls them down.
  • Consumer habits (new clothes per month, waste volume) matter at the margin, and electric vehicles land near neutral while petrol nudges emissions upward.

That maps cleanly onto real advice — drive less, fly less — which was the entire point: a model a person can act on.

Honest limitations

Writing this up truthfully matters more than inflating it:

  • The 0.9920 headline comes from a single 80/20 split, not cross-validation. The one cross-validated figure in the study is R² 0.991 (5-fold), and it belongs to a separate stacking regressor (RF + XGBoost + CatBoost → Ridge) that generalized well (hold-out RMSE 97.7). If I revisited this, k-fold CV on the headline model would be the first fix.
  • CatBoost’s R² lead over LightGBM is small — which is precisely why I lead with MAE, where the win is unambiguous.
  • Hyperparameters and the dataset citation should be pinned down for full reproducibility.

Reflection

The result I actually care about isn’t 0.9920 — it’s the shape of the gain: a middling pipeline became a strong one through preprocessing discipline, and SHAP made the black box say something a person could use. Rigorous benchmarking paired with interpretability is how I try to approach every modeling problem.