← → Navigate slides · click the left/right side
r Replay the current slide animation
t Light/dark · f Fullscreen · ? This help panel
Every figure is cited from execution outputs (results/) — none invented
A record of reframing the assigned problem in business terms and validating decisions with data — a report organized around the decision it must support
I reframed the assigned construction-cost prediction task as a business problem I would own.
Construction Estimation Data — 1,000 rows × 6 columns, train 800 / test 200 (random_state=42)
| Column | Meaning | Notes |
|---|---|---|
| Material_Cost | Material cost | 5% missing (54 rows) |
| Labor_Cost | Labor cost | 5% missing (51 rows) |
| Profit_Rate | Profit rate (10·15·20·25·30%) | Discrete values |
| Discount_or_Markup | Discount (−) / markup (+) adjustment | — |
| Policy_Reason | Reason for policy adjustment | Confirmed uninformative → excluded from modeling |
| Total_Estimate | Final estimated amount | Prediction target y |
Only the three findings that informed decisions are reported here. See the analysis notebook for the full EDA.
Material_Cost 0.80 = strongest correlation — informs feature selection and coefficient interpretation
Each of four numeric columns has 5% missing values → a signal that the handling strategy determines performance (slides 5–6)
The maximum error when recalculated with the stated formula is effectively zero → deterministic data without noise. The challenge is data quality rather than discovering the relationship.
Large amounts correspond to large projects (valid observations) → the decision was to retain them and explain them with the model instead of removing them
Preprocessing designs a representation that models can learn from — three decisions.
For the 5% missing values (Material: 54 rows; Labor: 51), deletion or formula-based reconstruction was possible. I retained imputation because real data have gaps and missing rows often cannot be discarded in practice. The cost of that choice is measured and reported next.
All imputation medians and scalers are fitted on 800 training rows, then applied unchanged to test data. Fitting on the full dataset before splitting would leak test information. No such violations occur in the pipeline.
Domain knowledge of the formula yields Total_Base_Cost, Cost_Ratio, and Profit_Amount. Their contribution is measured experimentally: LR +1.91%, RF +5.82% (ablation, 4→7 features).
A realistic preprocessing choice was made, and its cost was quantified.
933.34 and 6,925.35: reproduction with 4 original features / 4,043.42: selected 7-feature track — all use the same split (random_state=42)
With the same split (rs=42), adding only 5% missingness and median imputation raises RMSE from 933 to 6,925. Imputation accounts for most of the error, rather than factors such as feature-derivation order (confirmed by the red-team reproduction).
Prioritize data collection and consistency — preventing missingness at source over model complexity. With complete data, a linear model alone can reach RMSE ~933.
Baseline → Compare → Improve. This time, the baseline won.
5-fold CV
R² 0.9673 ± 0.0124
RMSE 3,104.07 ± 592.65
MAE 1,081.00
5-fold CV
R² 0.9403 ± 0.0133
RMSE 4,242.82 ± 447.79
MAE 2,803.35
27 combinations × 5-fold
best: n_estimators 200 · max_depth 20 · min_samples_split 2
CV RMSE 4,226.53 (improvement +16)
A broader comparison gave the same result: Poly(deg2) 4,014.37 · Ridge 4,043.43 · GBR 4,396.09 — best improvement +0.7% at most (measured on the combined 7-feature leaderboard)
Final model: Linear Regression, 200-row holdout. The numbers also need an interpretation.
Errors are uneven and concentrated in a small number of imputed rows — the spike near zero and heavy tails in the residual distribution below support this. Operational rule: review previously missing records individually.
Actual execution output — bottom two panels of data/dashboard.png (actual vs. predicted · residual distribution)
Training and validation learning curves converge; errors in imputed rows also explain the gap between CV (3,104) and holdout (4,043) → no overfitting identified. The gap was checked using the principle that a large train/test discrepancy warrants investigation.
Actual execution output — learning curves from the modeling notebook (LR · tuned RF)
All eight classic models measured on reconstructed complete data, with the same 800/200 split — Test RMSE.
| Model | Test RMSE | MAE | R² |
|---|---|---|---|
| Polynomial (deg2) | 0.00 | 0.00 | 1.000000 |
| Linear | 933.34 | 624.79 | 0.996983 |
| Lasso | 933.34 | 624.79 | 0.996983 |
| Ridge | 933.37 | 624.83 | 0.996982 |
| ElasticNet | 936.53 | 628.11 | 0.996962 |
| XGBoost | 1,254.60 | 965.76 | 0.994548 |
| RandomForest | 2,710.37 | 2,097.05 | 0.974555 |
| DecisionTree | 5,019.12 | 3,856.49 | 0.912744 |
The formula contains the quadratic interaction (M+L)×PR → degree 2 recovers the generating formula (recalculation error 1.1×10⁻¹¹).
All bootstrap 95% CIs (2,000 resamples) overlap [~800, ~1,065]. Ranking them by decimal-place differences is not meaningful.
Hold Ridge fixed and expand only the feature set from 4 to 8 — Test RMSE changes dramatically.
Trees improved only slightly in the same experiment (RF 2,710→2,394). Linear models benefit most from the derived features.
Measured recovered coefficients: Material 1.192 (theory 1.197) · Labor 1.190 (1.197) · Profit_Rate 474.494 (474.751) · Discount 1.000 (exact) — the model recovered the formula
| Feature set | Ridge | RandomForest | XGBoost |
|---|---|---|---|
| FS0 (4 features) | 933.37 | 2,710.37 | 1,254.60 |
| FS1 (+total) | 933.35 | 2,412.07 | 981.20 |
| FS2 (+domain) | 0.11 | 2,430.22 | 1,011.47 |
| FS3 (+formula approximation) | 0.09 | 2,393.88 | 865.78 |
933.37 → 0.11 — once the multiplication term is known, regression becomes arithmetic.
knowledge injection (domain knowledge) differs from test leakage: features are calculated per row without training-set statistics.
Five methods were run following deep-research recommendations (105 agents, citations checked). The MLX transformer was built locally on a MacMini M4 Pro (Apple Silicon). Four original features; Test RMSE.
TabPFN’s 197.39 is conditional — 1,000 rows fall within its sweet spot (≤10k). At 36,733 real-world rows, subsampling is required and the rankings reverse (next slide).
| Model | RMSE | MAE | R² | Training (s) |
|---|---|---|---|---|
| TabPFN v2 | 197.39 | 71.39 | 0.999865 | 8.46 |
| MLX TF (PLE) | 223.90 | 162.46 | 0.999826 | 9.04 |
| MLX TF (linear) | 423.23 | 300.88 | 0.999380 | 5.47 |
| MLP sklearn | 992.71 | 763.56 | 0.996587 | 13.37 |
| LLM LoRA | 3,571.01 | 2,745.30 | 0.955830 | 181.04 |
“PLE embeddings underperform, contrary to the literature” — plausible but incorrect
Adversarial verification found an implementation defect: shared per-feature projections erased feature identity. After correction, the literature’s recommendation was reproduced. Implementation details can determine conclusions about a method
The same methods applied to 36,733 UCI gas-turbine rows (2011–15) — NOx prediction RMSE (mg/m³), the same models with two splits.
| Model | E1 random | E2 future-period | Gap |
|---|---|---|---|
| Ridge | 7.560 | 10.119 | +2.56 |
| Linear | 7.559 | 10.127 | +2.57 |
| RandomForest | 3.910 | 12.645 | +8.74 |
| MLX-PLE | 4.030 | 12.700 | +8.67 |
| TabPFN v2 | 3.715 | 12.838 | +9.12 |
| XGBoost | 3.899 | 13.055 | +9.16 |
| Polynomial | 5.577 | 22.472 | +16.90 |
The 7 models shown represent both splits (all 11 are in results/gasturbine). Polynomial: synthetic RMSE 0.00 (formula recovery) becomes 22.47, the worst result — on real future-period data, polynomial regression falters without a generating formula
TabPFN 3.715 and XGB 3.899 lead on E1. On E2, both fall to around 12–13, while Ridge leads at 10.119. XGB moves from CV 3.78 to Test 13.06, quantifying the added optimism of random CV.
Against the success criterion (≤5 mg/m³), E2 falls short. Even measured oracle bias correction yields 7.681, still missing the criterion. The proposed response is annual retraining and drift monitoring (Ridge RMSE by year: 2014 8.62 → 2015 11.39).
Model selection considered performance, interpretability, and practical use together.
① Best holdout performance (4,043) ② Coefficients provide explanations: read the effect of a 1-won material-cost increase directly ③ Minimal retraining and deployment costs. Experiments showed that the added complexity of trees did not pay off on this data.
① Early estimate review — immediate output from four inputs, with average error MAE ≈1,407 ② Budget simulation — profit-rate and discount scenarios (coefficient-based what-if analysis) ③ Risk assessment — prioritize large prediction/actual gaps (residual tails at ±20,000); flag imputed records separately.
Tuning improves RMSE by +16; eliminating missingness improves it by ≈3,000 → invest next in data collection and consistency. Real gas-turbine data additionally require a response to temporal drift, including retraining frequency.
With many peers solving the same task, ambiguous claims were checked proactively through six adversarial lenses. Every answer is backed by measured evidence.