Research question
Can a model predict the strength of a concrete recipe absent from training?
The UCI dataset contains 1,030 observations and 428 exact seven-ingredient recipes. A recipe may appear at several curing ages. A random-row split can expose the same recipe in training and testing, answering a different question from prediction on unseen recipes.
MaterialSense combines a small scientific machine-learning benchmark with an interface for inspecting predictions, intervals, and warnings. It makes the evaluation assumptions and limits visible alongside the results.
Data: I-Cheng Yeh, UCI Concrete Compressive Strength. Seven ingredient quantities and curing age. No new lab measurements were collected. Dataset and attribution (CC BY 4.0).
System architecture
Recipes are identified by the seven ingredient quantities. Age remains a predictor but is excluded from the grouping key. For each seed, recipes are split 60/20/20 into training, calibration, and test sets. Five-fold GroupKFold within training selects among a mean baseline, Ridge, RandomForest, and GradientBoosting. Calibration and test recipes are excluded from model selection.
One project, three architectural views
Follow the experimental partitioning, then the application and its evidence trail.
01 Study design
01 · Data identity
- UCISource records1,030 observations · 8 inputs
- Group keyExact recipe7 ingredient quantities, excluding age
- 42–51Recipe-group split428 recipes · 10 prespecified resplits
02 · Evaluation topology
- 60%Train & select5-fold GroupKFold · mean, Ridge, RF, GBDTFit model and preprocessing here
- 20%CalibrateGroup-maximum residual and CQR scoresNominal 90% target
- 20%Held-out testPoint error, coverage, width, warningNo tuning on test data
Recipe membership stays separate across all three partitions. Age remains a predictor. The row-random protocol is only a separate diagnostic.
02 Local application
01 · Local input and feature preparation
- InputMix + curing ageSeven ingredients (kg/m³) and age (days)
- FeaturesInput transformationRaw / selected engineered point-model inputs; standardized raw inputs for KNN
02 · Three parallel signals
- Point estimateFitted regressorPredicted compressive strength (MPa)
- UncertaintyResidual / CQRNominally calibrated prediction bounds
- Novelty5-neighbor distanceThreshold fixed from training distances
03 · Local Streamlit interface
- A/BPinned recipe comparisonAge-response exploration and interval switching
- CSVInspect & exportMeasured-data view and result export
The portfolio hosts the recorded interface and saved evidence only. Warning, point estimate and interval are distinct signals, not engineering certification.
03 Evidence chain
01 · Prespecified study
- 42–51ConfigurationSeeds, splits, estimators and fixed warning quantiles
- RunRecorded outputsPer-seed metrics, calibration, prediction and overlap records
- SHA-256Evidence identityManifest and checksums for published evidence
02 · Public surfaces
- GitHubPublic sourceRunnable study, data attribution and verification script
- PortfolioResearch case studyEvidence plots, tables, local recording and scope
The original private archive and trained models are not deployed. The Wu 2019 predictions are an exploratory frozen-model assessment, not harmonized external validation.
The evaluation must distinguish recipe overlap from complete duplicate rows, row-weighted error from group-balanced error, and statistical novelty from known distribution shift. The grouped and random-row protocols use different test observations, so their metric difference cannot isolate a causal effect of leakage.
Benchmark evidence
Results are descriptive means and sample standard deviations over overlapping resplits, not independent replications or confidence intervals. Errors and interval widths are in MPa. The tables below report measured outcomes, including findings that did not improve.
Generalization protocol
Explore the difference between two recorded evaluation protocols.
RMSE (MPa)
- Group-held-out
- 5.641 ± 0.788
- Random-row diagnostic
- 5.371 ± 0.321
Scroll the chart horizontally to inspect all ten seeds.
Each mark is one recorded resplit; no connecting trend line. Values above are mean ± sample SD.
Exact values for each seed
| Seed | Group-held-out | Random-row diagnostic |
|---|---|---|
| 42 | 5.217 | 5.282 |
| 43 | 5.846 | 5.972 |
| 44 | 5.889 | 5.350 |
| 45 | 6.906 | 5.131 |
| 46 | 4.243 | 4.959 |
| 47 | 4.564 | 5.243 |
| 48 | 5.912 | 5.666 |
| 49 | 5.960 | 4.985 |
| 50 | 5.587 | 5.596 |
| 51 | 6.288 | 5.526 |
MAE (MPa)
- Group-held-out
- 4.157 ± 0.609
- Random-row diagnostic
- 3.782 ± 0.276
Scroll the chart horizontally to inspect all ten seeds.
Each mark is one recorded resplit; no connecting trend line. Values above are mean ± sample SD.
Exact values for each seed
| Seed | Group-held-out | Random-row diagnostic |
|---|---|---|
| 42 | 3.887 | 3.724 |
| 43 | 4.009 | 4.191 |
| 44 | 4.446 | 3.786 |
| 45 | 5.343 | 3.626 |
| 46 | 3.228 | 3.532 |
| 47 | 3.419 | 3.549 |
| 48 | 4.198 | 4.114 |
| 49 | 4.550 | 3.375 |
| 50 | 3.950 | 4.092 |
| 51 | 4.537 | 3.831 |
R²
- Group-held-out
- 0.878 ± 0.026
- Random-row diagnostic
- 0.895 ± 0.014
Scroll the chart horizontally to inspect all ten seeds.
Each mark is one recorded resplit; no connecting trend line. Values above are mean ± sample SD.
Exact values for each seed
| Seed | Group-held-out | Random-row diagnostic |
|---|---|---|
| 42 | 0.887 | 0.892 |
| 43 | 0.881 | 0.872 |
| 44 | 0.862 | 0.895 |
| 45 | 0.868 | 0.908 |
| 46 | 0.912 | 0.913 |
| 47 | 0.913 | 0.901 |
| 48 | 0.900 | 0.888 |
| 49 | 0.826 | 0.913 |
| 50 | 0.867 | 0.884 |
| 51 | 0.866 | 0.886 |
Feature ablation
Fixed random forest, identical grouped splits; group-balanced RMSE (MPa).
−0.54 MPa mean reduction when adding the water-to-binder descriptor. It improved all ten recorded comparisons; the next two descriptors did not further improve average RMSE.
Coverage comes with a width trade-off
Recipe-level group-maximum calibration, nominal 90% target.
Residual
Row coverage: 95.1%
CQR
Row coverage: 96.0%
Coverage: 0–100%; dashed marker = nominal 90%. Width: 0–35 MPa.
The worst split achieved 84.9% whole-recipe coverage with residual intervals and 89.5% with CQR. Means should be read together with variability and the calibration assumptions.
Original benchmark figure and summary tables
| Protocol | MAE (MPa) | RMSE (MPa) | R² |
|---|---|---|---|
| Grouped | 4.157 ± 0.609 | 5.641 ± 0.788 | 0.878 ± 0.026 |
| Random-row diagnostic | 3.782 ± 0.276 | 5.371 ± 0.321 | 0.895 ± 0.014 |
| Nested inputs | Group-balanced RMSE (MPa) |
|---|---|
| Raw inputs | 6.180 ± 0.707 |
| + Water/binder ratio | 5.639 ± 0.867 |
| + SCM fraction | 5.748 ± 0.863 |
| + Total ingredient mass | 5.817 ± 0.711 |
| Method | Row coverage | Whole-recipe coverage | Mean width (MPa) |
|---|---|---|---|
| Residual | 95.1% | 91.0% | 24.225 |
| CQR | 96.0% | 93.1% | 28.677 |
Enlarge image Inspect the warning thresholds
Switch among the four prespecified training-distance quantiles. This only reveals retained test diagnostics; it does not select or modify the model threshold.
0.80
Absolute error > 10 MPa
Mean absolute error
Average of the 10 per-seed statistics.
0.90
Absolute error > 10 MPa
Mean absolute error
Average of the 10 per-seed statistics.
0.95 · Default
Absolute error > 10 MPa
Mean absolute error
Average of the 10 per-seed statistics.
0.99
Absolute error > 10 MPa
Mean absolute error
Average of the 10 per-seed statistics.
Original warning diagnostic figure and failure notes
Enlarge image Application workflow
Ten prespecified seeds (42–51) combine grouped model selection, fixed-forest feature ablation, group-maximum residual and conformalized quantile regression (CQR) intervals, and training-standardized KNN distance warnings. Material descriptors are added in a fixed order; warning thresholds are not selected on test performance.
Python, pandas, NumPy, scikit-learn, quantile gradient boosting, Matplotlib, pytest and a bilingual Streamlit application. The experiment stores configuration, split assignments, predictions, calibration scores and checksums.
The local application supports recipe sliders, curing-age exploration, pinned A/B comparisons, interval switching, measured-data inspection and CSV export. It uses saved artifacts rather than retraining when an input changes.
Enlarge image Recorded demonstration
A 55-second silent recording of real application interactions. Follow the saved model as an age changes, a recipe is pinned, intervals are switched and a CSV is exported. English and Chinese captions are available.
Cross-source failure analysis
Residual intervals cover 2/35 observations; CQR covers 11/35. Both cover all five recorded ages of 0/7 recipes. The 16 observations without a distance warning still have MAE 14.960 MPa. These are not 35 independent recipes or 105 acquired raw measurements.
Examine a recorded cross-source failure
Choose one of the 35 saved observations and an interval method. The display reads the frozen predictions and published three-specimen means; no new inference or lab measurements.
F3R2 · 14 days · CQR
- Reported mean
- 61.5 MPa
- Frozen prediction
- 40.515 MPa
- Signed error (pred. − obs.)
- -20.985 MPa
- Prediction interval
- 25.946–58.229 MPa
- Reported mean in interval?
- Not covered
- Distance warning
- Not triggered
- Distance / threshold
- 1.188 / 1.336
This recorded mean lies outside the selected interval, while no distance warning was triggered. No warning is not evidence of safety.
Specimen geometry, provenance and target aggregation are not fully harmonized with UCI. Slag=0 is a structural inference; the original ± definition is unconfirmed; the 91-day highest-value prose conflicts with the table. These errors do not isolate a physical cause.
Original cross-source figure, provenance and recomputation
Enlarge image Scope, provenance and unresolved issues · Recomputed summary (JSON).
Source: Wu et al. (2019), CC BY 4.0. Phase 6 recomputed the same records; it is not a new laboratory experiment or independent human blind review. DOI 10.3390/app9112266.
Candidate data screening
This section records the initial screening of three candidate datasets for input compatibility, licensing, and source overlap. It does not report external model performance.
| Dataset | Records | Finding |
|---|---|---|
| Pavement Concrete | 1,430 | The strength file lacks superplasticizer dosage, a required model input. |
| Blended Cement | 8,979 | 119 records share all eight inputs with UCI. The initial review focused on a subset attributed to Oner 2007. |
| Global SCM v2 | 1,456 | 122 records cite the Yeh source. Some targets were converted from cube to cylinder strength. |
Official data releases: Pavement Concrete · Blended Cement · Global SCM v2.
The initial screening identified a subset of 224 observations from 32 recipes at seven ages. It found no exact UCI recipe overlap or near overlap at a per-ingredient tolerance of 0.1 kg/m³. At that stage, source independence still required method review. A public paper transcription described 150 mm cubes and a mean of six specimens; the superplasticizer zero values and comparability with the UCI target remained unresolved. Original study.
A read-only audit command records data hashes and checks for reuse of recipes, input vectors, and complete rows, including cases with changed ages or labels. It rejects unexpected columns and protects existing outputs. The historical UCI benchmark is preserved.
My contributions
I own and maintain MaterialSense. Implementation, debugging, experiment tooling, and documentation were AI-assisted. The project uses established estimators and calibration methods, with the UCI data credited separately; it does not claim unaided authorship or an original statistical method.
The project includes grouped evaluation, feature ablation, interval calibration, warning diagnostics, saved experiment files and a bilingual application. It remains a research-engineering prototype, without a publication, funding award or claimed external adoption.
Limitations and next study
Exact recipe groups are not verified independent laboratory batches. The dataset lacks reliable laboratory or batch identifiers, and the group-coverage interpretation requires exchangeable recipe clusters. Further external evaluation requires traceable sources, compatible target definitions, and a protocol fixed before inspecting predictions.
This is not a validated concrete design tool. The model is not constrained to physical strength-development laws. Predictions, distance flags and physical screening heuristics are separate signals, and none certifies structural safety.
Code and reproducibility
A curated source repository is public; the original project archive remains private. This page shares selected tables, methodological notes, screenshots and a silent app recording; it does not host Python inference.
Source and method
Experiment outputs
Failure and provenance
Presentation updated 28 November 2026. The historical experimental data, trained-model scope and original recorded evidence remain unchanged.
