<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:dc="http://purl.org/dc/elements/1.1/">
  <channel>
    <title>DEV Community: ProTechSC Academy</title>
    <description>The latest articles on DEV Community by ProTechSC Academy (@protechscacademy).</description>
    <link>https://dev.to/protechscacademy</link>
    <image>
      <url>https://media2.dev.to/dynamic/image/width=90,height=90,fit=cover,gravity=auto,format=auto/https:%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Fuser%2Fprofile_image%2F2632558%2F22a1983b-ab91-4af4-81e0-8e799f5f7fe7.png</url>
      <title>DEV Community: ProTechSC Academy</title>
      <link>https://dev.to/protechscacademy</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/protechscacademy"/>
    <language>en</language>
    <item>
      <title>Why a random train/test split flatters concrete-strength models (and what we did instead)</title>
      <dc:creator>ProTechSC Academy</dc:creator>
      <pubDate>Sat, 14 Nov 2026 15:26:55 +0000</pubDate>
      <link>https://dev.to/protechscacademy/why-a-random-traintest-split-flatters-concrete-strength-models-and-what-we-did-instead-k3j</link>
      <guid>https://dev.to/protechscacademy/why-a-random-traintest-split-flatters-concrete-strength-models-and-what-we-did-instead-k3j</guid>
      <description>&lt;p&gt;Predicting the compressive strength of concrete from its mix is one of the most popular machine-learning exercises in civil engineering. Most published models report an R² above 0.9. We rebuilt the problem from scratch and found that &lt;strong&gt;how you split the data matters as much as which model you pick&lt;/strong&gt;.&lt;/p&gt;

&lt;h2&gt;
  
  
  The data
&lt;/h2&gt;

&lt;p&gt;We used the public &lt;strong&gt;UCI Concrete Compressive Strength&lt;/strong&gt; dataset (I-C. Yeh, 1998, CC BY 4.0). It contains 1,030 laboratory tests:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;8 inputs: cement, GGBS (slag), fly ash, water, superplasticizer, coarse and fine aggregate (kg/m³), and age (1–365 days)&lt;/li&gt;
&lt;li&gt;output: compressive strength, 2.3–82.6 MPa&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;A detail that is easy to miss is that the 1,030 rows are only &lt;strong&gt;428 distinct mixes&lt;/strong&gt;. The same mix was tested at several ages. We also found 25 exact duplicate rows, which we removed.&lt;/p&gt;

&lt;h2&gt;
  
  
  The trap: random splits leak information
&lt;/h2&gt;

&lt;p&gt;With a random 80/20 split by &lt;strong&gt;row&lt;/strong&gt;, the same mix tested at 7 days can land in training while its 28-day result lands in the test set. The model never has to generalise to a &lt;em&gt;new&lt;/em&gt; mix. It only interpolates along an age curve it has already seen.&lt;/p&gt;

&lt;p&gt;A real engineer asks a different question: &lt;em&gt;"what will this new mix give?"&lt;/em&gt; So we compared three protocols:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;
&lt;strong&gt;Random 80/20 by row&lt;/strong&gt;, as in most papers (optimistic)&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Grouped 80/20 by mix&lt;/strong&gt; and &lt;strong&gt;grouped 10-fold CV&lt;/strong&gt;, where a whole mix is either in training or in test. We used this for model selection.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Age extrapolation&lt;/strong&gt;: train on tests up to 28 days, predict 56–365 days&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Fyx41sarl5om8e1qu208o.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Fyx41sarl5om8e1qu208o.png" alt="RMSE of 11 models under the three validation protocols" width="799" height="441"&gt;&lt;/a&gt;&lt;br&gt;
&lt;em&gt;RMSE of 11 models under the three validation protocols&lt;/em&gt;&lt;/p&gt;
&lt;h2&gt;
  
  
  Physics first, then machine learning
&lt;/h2&gt;

&lt;p&gt;Before any ML, we fitted a white-box baseline with only 7 parameters:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Abrams' law&lt;/strong&gt; (strength falls exponentially with the water/binder ratio), with efficiency factors for slag and fly ash&lt;/li&gt;
&lt;li&gt;the &lt;strong&gt;ACI 209&lt;/strong&gt; strength-gain curve for age&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;This baseline alone gives an RMSE of 7.35 MPa (R² 0.80). It is not accurate enough, but every term can be checked by a civil engineer.&lt;/p&gt;

&lt;p&gt;We then trained 10 ML models: linear, quadratic, tree, SVM, Gaussian process, random forest, boosted trees, neural network and monotonic boosted trees. Finally, we trained a &lt;strong&gt;hybrid&lt;/strong&gt;, in which the physics model gives the trend and a boosted tree learns only the correction:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;strength = f_Abrams-ACI(mix, age) × exp(boosted_tree_residual(mix, age))
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h2&gt;
  
  
  What we measured
&lt;/h2&gt;

&lt;div class="table-wrapper-paragraph"&gt;&lt;table&gt;
&lt;thead&gt;
&lt;tr&gt;
&lt;th&gt;Model&lt;/th&gt;
&lt;th&gt;Grouped test RMSE&lt;/th&gt;
&lt;th&gt;Age-extrapolation RMSE&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td&gt;Abrams-ACI physics only&lt;/td&gt;
&lt;td&gt;7.35 MPa&lt;/td&gt;
&lt;td&gt;—&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Random forest&lt;/td&gt;
&lt;td&gt;4.74 MPa&lt;/td&gt;
&lt;td&gt;9.54 MPa&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Boosted trees (LSBoost)&lt;/td&gt;
&lt;td&gt;4.82 MPa&lt;/td&gt;
&lt;td&gt;8.93 MPa&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Gaussian process&lt;/td&gt;
&lt;td&gt;5.40 MPa&lt;/td&gt;
&lt;td&gt;&lt;strong&gt;5.60 MPa&lt;/strong&gt;&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;strong&gt;Hybrid physics + boosted trees&lt;/strong&gt;&lt;/td&gt;
&lt;td&gt;
&lt;strong&gt;4.62 MPa&lt;/strong&gt; (R² 0.92)&lt;/td&gt;
&lt;td&gt;6.03 MPa&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;&lt;/div&gt;

&lt;p&gt;The pure tree models look almost as good as the hybrid on new mixes. &lt;strong&gt;Ask them about a later age and they fail&lt;/strong&gt;, because a tree cannot extrapolate beyond the ages it was trained on. The physics trend in the hybrid keeps it sensible.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Fjyj8hv65yr1l9kd7acii.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Fjyj8hv65yr1l9kd7acii.png" alt="Trained up to 28 days, tested at 56–365 days" width="800" height="396"&gt;&lt;/a&gt;&lt;br&gt;
&lt;em&gt;Trained up to 28 days, tested at 56–365 days&lt;/em&gt;&lt;/p&gt;

&lt;p&gt;We also report a &lt;strong&gt;90% prediction interval (±7.7 MPa)&lt;/strong&gt; using split-conformal prediction on grouped out-of-fold residuals. It achieved 89% coverage on unseen mixes. A single "R² = 0.92" hides how uncertain any one prediction is.&lt;/p&gt;

&lt;h2&gt;
  
  
  Using the model in reverse: cheaper, lower-CO₂ mixes
&lt;/h2&gt;

&lt;p&gt;Once the model is trustworthy, it can design mixes. Differential evolution searched for the cheapest or lowest-CO₂ mix for each grade, M25 to M50. The search had to satisfy these constraints:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;the &lt;strong&gt;IS 10262 / IS 456 / IS 16415&lt;/strong&gt; limits: target mean strength, maximum w/b, minimum binder, and the slag and fly-ash caps&lt;/li&gt;
&lt;li&gt;the range of the training data&lt;/li&gt;
&lt;li&gt;a &lt;strong&gt;physics-consistency check&lt;/strong&gt;: the Abrams-ACI model must also agree within 7 MPa&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;That last constraint turned out to be essential. Without it, the optimiser found mixes where the ML model predicted 48.6 MPa but physics said 38.5 MPa. In other words, it was &lt;strong&gt;exploiting the model's errors&lt;/strong&gt; instead of finding better concrete.&lt;/p&gt;

&lt;p&gt;With the check in place, the model proposes &lt;strong&gt;22–29% lower material cost and 50–59% lower embodied CO₂&lt;/strong&gt; than a conventional OPC design. The main reason is a higher use of GGBS and fly ash.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Fyyodzxl81nmn2tft8e3k.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Fyyodzxl81nmn2tft8e3k.png" alt="Conventional vs optimised mixes, M25–M50" width="799" height="287"&gt;&lt;/a&gt;&lt;br&gt;
&lt;em&gt;Conventional vs optimised mixes, M25–M50&lt;/em&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  Limitations
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;These are &lt;strong&gt;model proposals&lt;/strong&gt;. They need trial batches and IS 516 cube tests before use.&lt;/li&gt;
&lt;li&gt;The dataset is from one laboratory's 1990s materials and gives &lt;strong&gt;cylinder&lt;/strong&gt; strengths, not Indian cube strengths. A local calibration is needed.&lt;/li&gt;
&lt;li&gt;Part of the cost saving comes from IS 456 durability limits, which make conventional OPC mixes stronger than needed at low grades.&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  Takeaways for your own ML project
&lt;/h2&gt;

&lt;ol&gt;
&lt;li&gt;
&lt;strong&gt;Check whether your rows are independent.&lt;/strong&gt; If they are not, split by group (here, by mix).&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Start with a physics baseline.&lt;/strong&gt; It shows how much the ML actually adds, and it rescues extrapolation.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Report an interval, not just R².&lt;/strong&gt;&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;When you optimise on a surrogate, guard against it being exploited.&lt;/strong&gt;&lt;/li&gt;
&lt;/ol&gt;




&lt;p&gt;&lt;em&gt;The full project (report, MATLAB and Python versions, web application, video walkthrough) is described on our project page: &lt;a href="https://www.protechscacademy.com/projects/civil-engineering/concrete-strength-prediction" rel="noopener noreferrer"&gt;Concrete strength prediction — ProTechSC Academy&lt;/a&gt;. A short video walkthrough: &lt;a href="https://youtu.be/Lu_MFsTvl6o" rel="noopener noreferrer"&gt;youtu.be/Lu_MFsTvl6o&lt;/a&gt;.&lt;/em&gt;&lt;/p&gt;

&lt;p&gt;&lt;em&gt;We guide final-year and PhD research projects in engineering and AI. WhatsApp +91 97907 09424.&lt;/em&gt;&lt;/p&gt;

</description>
      <category>machinelearning</category>
      <category>python</category>
      <category>datascience</category>
      <category>engineering</category>
    </item>
  </channel>
</rss>
