Model & method

OptiMPa predicts the compressive strength of a concrete mix from its ingredients and curing age. The model is an XGBoost regressor trained on the UCI Concrete Compressive Strength dataset. It runs in your browser: the trained trees are shipped with the page, and SHAP values are computed exactly with TreeSHAP.

Data

UCI Concrete Compressive Strength (I-Cheng Yeh, 1998): 1030 laboratory tests. After removing 25 exact duplicate rows, 1005 observations of 428 different mixes remain, most of them tested at several ages.

InputMinMaxUnit
Cement102540kg/m³
Blast Furnace Slag0359.4kg/m³
Fly Ash0200.1kg/m³
Water121.75247kg/m³
Superplasticizer032.2kg/m³
Coarse Aggregate8011145kg/m³
Fine Aggregate594992.6kg/m³
Curing Age1365days
Compressive strength2.3382.6MPa

The predictor warns when an input is outside these ranges, because the model is extrapolating there.

Method

Features.Besides the 8 raw inputs, the model gets the ratios that concrete technology says matter: water/cement (Abrams' law), water/binder, total binder, fine/coarse aggregate, and slag/cement and fly ash/cement.

No leakage between train and test. The same mix is tested at several ages, so a random split would put the same mix in both sets and overstate the accuracy. Rows are grouped by mix design: 799 rows (80% of the mixes) are used for tuning with 5-fold GroupKFold, and 206 rows from mixes the model has never seen are held out for the final test.

Tuning. 50 Optuna trials (seeded), minimising the grouped cross-validation RMSE.

Results

ModelCV R²CV RMSETest R²Test RMSE
Random Forest baseline (8 raw features)0.8605.860.8646.63
XGBoost (14 features, tuned)0.9004.930.9065.51

RMSE is in MPa. On mixes it has never seen, the model is typically within about ±5.5 MPa, so treat a prediction as an estimate for comparing mixes, not as a replacement for testing.

Predicted vs. actual strength on the held-out mixes
Predicted vs. actual strength, held-out mixes
SHAP summary: impact of each feature on the prediction
SHAP summary: curing age, w/b ratio, total binder and w/c ratio have the largest effect

Embodied carbon

The carbon of 1 m³ of concrete is each ingredient's mass (kg/m³) times its emission factor (kg CO₂e/kg), summed. This covers production of the materials (stages A1–A3, cradle to gate). Transport, reinforcement, formwork and later life stages are not included.

Materialkg CO₂e per kg
Cement (CEM I)0.912
Blast Furnace Slag (GGBS)0.083
Fly Ash0.004
Water0.000344
Superplasticizer1.88
Coarse Aggregate0.0075
Fine Aggregate0.0075

These are approximate generic values, mostly from the ICE database v3.0 (Circular Ecology, 2019). The superplasticizer value is from the EFCA admixture EPD. They are good for comparing mixes with each other. For an actual assessment, use the EPDs of the specific cement and materials.

Reference mix. The predictor compares your mix with the same mix where all binder is Portland cement (slag and fly ash replaced 1:1 by mass), keeping the binder content and w/b ratio. Both are run through the strength model, so you see the carbon saved and what it costs in predicted strength.

Limitations

  • One laboratory dataset of about 1000 tests. It has only cement, slag and fly ash as binders, so other binders (silica fume, calcined clay, limestone cement ...) can't be modelled.
  • Strength is predicted as a mean cylinder strength. The EN 206 class is an estimate (fck = fcm − 8 MPa), not a conformity check.
  • The carbon numbers use generic factors and cover the concrete only.

Tuned hyperparameters

n_estimators705
max_depth4
learning_rate0.0473
subsample0.677
colsample_bytree0.530
min_child_weight4
gamma0.762
reg_alpha1.04e-7
reg_lambda0.0958