Beta
Concrete Mathic 🤖🪄
Hidden code
💾 The data
Compressive strength data:
- "cement" - Portland cement in kg/m3
- "slag" - Blast furnace slag in kg/m3
- "fly_ash" - Fly ash in kg/m3
- "water" - Water in liters/m3
- "superplasticizer" - Superplasticizer additive in kg/m3
- "coarse_aggregate" - Coarse aggregate (gravel) in kg/m3
- "fine_aggregate" - Fine aggregate (sand) in kg/m3
- "age" - Age of the sample in days
- "strength" - Concrete compressive strength in megapascals (MPa)
Acknowledgments: I-Cheng Yeh, "Modeling of strength of high-performance concrete using artificial neural networks," Cement and Concrete Research, Vol. 28, No. 12, pp. 1797-1808 (1998).
Hidden code
The average strength 🦾
df_avg_str_sel = df[['strength', 'age']]
df_avg_str = df_avg_str_sel.groupby('age').mean().reset_index()
df_avg_s = df_avg_str[df_avg_str['age'] == 1].append(df_avg_str[df_avg_str['age'] == 7]).append(df_avg_str[df_avg_str['age'] == 14]).append(df_avg_str[df_avg_str['age'] == 28])
display(df_avg_s.rename({'strength' : 'avg. strength'}, axis=1).set_index('age').T)
🧮 Coefficients
Let's take a short look on the dataset correlation:
df_corr = df.corr()
mask = np.zeros_like(df_corr)
mask[np.triu_indices_from(mask)] = True
with sns.axes_style("white"):
f, heatmap = plt.subplots(figsize=(12, 6))
heatmap = sns.heatmap(df_corr, cmap="vlag", mask=mask, linewidths=1, annot=True).set(title='Correlation matrix')
plt.xticks(rotation=60)
plt.show()
We need to find the coefficients for the formula:
🤖🪄 Developing a machine learning model for find the coefficients:
Hidden code
Hidden code
Checking 🔎
Both the models gieves nearble equal coefficients, but because the Gradient Boosting predictive acciracy is higher, we'll use its coefficients for