Improvement of compressive strength prediction accuracy for concrete is crucial and is considered a challenging task to reduce costly experiments and time. Particularly, the determination of compressive strength of concrete using ground granulated blast furnace slag (GGBFS) is more difficult due to the complexity of the composition mix design. In this paper, an approach using random forest (RF), which is one of the powerful machine learning algorithms, is proposed for predicting the compressive strength of concrete using GGBFS. The RF model is first evaluated to determine the best architecture, which constitutes 500 growth trees and leaf size of 1. In the next step, the evaluation of the model is conducted over 500 simulations considering the effect of random sampling. Finally, the best prediction results are given in function of statistical measures such as the correlation coefficient (R), root mean square error (RMSE), and mean absolute error (MAE), respectively, which are 0.9729, 4.9585, and 3.9423 for the testing dataset. The results show that the RF algorithm is an excellent predictor and practically used for engineers to reduce experimental cost.

1. Introduction

Nowadays, ground granulated blast furnace slag (GGBFS) has been used as supplementary cementitious material in Portland concretes. GGBFS is a product of the glassy granular material formed when molten blast furnace slag is quickly cooled by water. GGBFS can replace 35–65% Portland cement in concrete. Using GGBFS as a partial replacement of Portland cement enhances concrete strength and durability through a denser matrix formation. It could also increase the performance of concrete structures. Moreover, GGBFS as a partial replacement requires approximately only 25% of the energy needed to produce Portland cement [14]. Thanks to these numerous advantages, the determination of GGBFS content in the design phase of concrete is essential and meaningful, especially in improving the concrete compressive strength.

Numerous investigations were performed to calculate GGBFS concrete mix design, including the experimental and statistical methods. Some experimental investigations have been carried out to estimate the compressive strength of GGBFS concrete [59]. However, the experimental methods are, in general, time consuming and relatively costly. Besides, several mathematical models and empirical equations have been proposed to estimate the compressive strength of concrete. In fact, the mathematical equations are regression equations based on the experimental results. As an example, with four cement dosages, including 175, 210, 245, and 280 kg/m3, Oner and Akyuz [5] have proposed two equations and obtained a correlation coefficient of 0.99. However, this value is validated only in the range of cement dosage of the authors. The accuracy of regression equations is strongly dependent on the number of experimental tests and the range of cement content. Therefore, a new approach needs to be developed for reducing the time consumed and experimental cost due to a high number of experimental tests. Also, a universal prediction approach with high prediction accuracy needs to be constructed.

In recent years, artificial intelligence (AI) or machine learning (ML) is gradually becoming popular and applied in numerous scientific fields [1013]. The random forest (RF) is one of the most powerful algorithms of ML for data science, which has been widely used in the construction field [14]. The RF model is successfully applied to solve numerous technical issues of civil engineering [1518], geotechnical engineering [1922], earth sciences [2325], and environmental protection [26, 27]. For example, Mohana [17] has used the RF model and 268 experimental data to predict the compressive strength of concrete containing GGBFS. The author has also mentioned that the prediction accuracy is evaluated through the correlation coefficient (R), equal to 0.94, for the best RF architecture. Such a value is considered low due to the number of simulations performed by the author. Moreover, the number of experimental data is limited, which reduces the prediction accuracy of concrete compressive strength using the RF model.

Therefore, the primary purpose of this study is to propose an efficient RF model to increase the compressive strength prediction accuracy of concrete containing GGBFS, thanks to the higher data samples collected from the literature. Moreover, efficient RF architecture will be performed by performing numerous simulations for increasing the RF model’s reliability. Precisely, the performance of ML model is strongly affected by the parameter or architecture selections of the corresponding ML algorithms. Therefore, this study performs firstly the determination of RF architecture for better predicting the compressive strength of concrete containing GGBFS. To acquire the purpose, numerous experimental samples from the literature are gathered and randomly split up into two parts, namely, the training part (70% of data) and the testing part (30% of data). The best RF architecture is obtained and used to predict the compressive strength of concrete containing GGBFS with the evaluation of three statistical measurements, consisting of the correlation coefficient (R), mean absolute error (MAE), and root mean square error (RMSE). The sensitivity of concrete compressive strength on different input parameters is finally performed.

2. Significance of the Research Study

Accurate prediction of the concrete compressive strength using supplementary cementitious materials, such as GGBFS, is crucial thanks to many further advantages and contributions to construction design. Although many machine learning models have been proposed to predict the compressive strength of concrete in the available literature (i.e., [2832]), the reliability assessment of the models still needs to be quantified. Therefore, the present investigation is proposed in order to(1)introduce the variability in the sampling process to construct the training and testing datasets(2)assess the prediction reliability of the RF model using Monte Carlo simulations(3)finely tune the hyperparameters to obtain the best RF model(4)show that the performance of the best model is compared with 7 investigations published in the literature, confirming its simplicity and effectiveness(5)show a reliable variable importance analysis by taking the average results of 500 simulations

3. Database Construction

The experimental database used in this study is collected from published articles [5, 6, 31, 33, 34] (Table 1). There are 453 samples, divided into two parts, 70% training data (317 samples) and 30% testing data (136 samples). Two shapes of samples include 327 cubic samples and 36 cylindrical samples, about 8% of all samples; therefore, the shape variable is not considered in this investigation. The total databases include 8 input variables from X1 to X8: cement content, kg/m3 (X1); water content, kg/m3 (X2); coarse aggregate, kg/m3 (X3); fine aggregate or sand, kg/m3 (X4); GGFBS content, kg/m3 (X5); hyperplasticizing, kg/m3 (X6); superplasticizer, % (X7); and age of samples, day (X8). The output variable of the present study is the compressive strength, MPa (denoted as Y). The corresponding correlation analysis of data is shown in Figure 1.

The input variables from X1 to X5 are distributed in a wide range, while the variables X6 to X8 are in a narrow range. Precisely, the cement content (X1) ranges from 70 to 360 (kg/m3), but it is mainly in the range of 180 to 270 (kg/m3). The highest sample number is about 79, which corresponds to 180 kg/m3 of cement content. Similarly, the water content (X2) ranges from 70 to 295 kg/m3. As shown in Figure 1, the coarse aggregate content (X3) is varied from about 400 to 1200 (kg/m3), but no sample has coarse aggregate content in the range of 500 to 700 (kg/m3). The fine aggregate or sand content (X4) is mainly in two ranges from 500 to 950 (kg/m3) and 1150 to 1550 (kg/m3). The highest sample number (X4) corresponds to 680 kg/m3 of fine aggregate (or sand content). The GGBFS content (X5) varies from 40 to 460 kg/m3, but the values are mostly in the range of 70 to 270 (kg/m3). The carboxylic-type hyperplasticizing content (X6) ranges from 2 to 14 kg/m3. However, hyperplasticizing is not used in almost all cases, accounting for about 330 samples (on a total of 453). Besides, almost all samples have zero superplasticizer content (X7) except for six samples, representing only a proportion of 1%. With the age of samples, there are ten values; the minimum age of the sample is one day, and the maximum age of the sample is 365 days.

The correlations between the inputs and compressive strength are plotted in Figure 2. The correlation values are shown in different colors. As clearly shown, some of the variables are slightly correlated, such as X4 and X6 for aggregate content and carboxylic-type hyperplasticizing content, respectively. Overall, the correlation between the inputs and compressive strength is relatively low. Therefore, all variables are included to increase the accuracy of the final model developed.

4. Simulation Using Random Forest

4.1. Random Forest

Random forest (RF) [35] is an ensemble for classification and regression developed by Leo Breiman at the University of California, Berkeley. Breiman is also a coauthor of the classification and regression tree (CART) method [36]. Random forest (RF) is an innovative method of bootstrap aggregating (bagging). RF uses 2 random steps, in which the first one is sample randomization using the bootstrap method with a return and the second one is to randomly extract a number of attributes from the original attribute set. These 2 randomized subdatasets are highly diverse and unrelated, helping to reduce variance. CARTs constructed from this subset of data form the forest. When aggregating results, RF uses a voting method for the classification problem and takes the average value for the regression problem.

In recent years, RF is used quite commonly because of its superiority compared with other algorithms; it can handle data with a large number of properties and able to estimate the importance of the attributes, often with high accuracy in classification (or regression) and fast learning process. In RF, each tree selects only a small set of attributes during construction (2nd random step); this mechanism makes the RF execute with the dataset with a large number of attributes in an acceptable time when calculating. The user can default to the number of properties to construct trees in the forest; normally the optimal default is for the classification problem and for regression problems (p is the number of all properties of the original dataset). The number of trees in the forest should be set large enough to ensure that all attributes are used a number of times usually 500 trees for the classification problem and 1000 trees for the regression problem. Due to the use of the bootstrap method of random return sampling, the subdatasets have about 2/3 of the samples that do not overlap for tree construction. About 1/3 of the remaining samples are called out-of-bag because they do not participate in the construction of trees, so RF uses these out-of-bag samples to test and calculate the CART’s attribute importance in the forest. To summarize, the random forest algorithm is built according to the following steps (Figure 3):Step 1. From dataset D, we generate random data (bootstrap sample)Step 2. Using random sampling data subsets D1, D2,…, Dk to build trees T1, T2,…, TkStep 3. Combine trees: use the majority voting strategy with the classification problem or average the predicted values from trees with the regression problem

Overall, the RF model is selected in this study because of many advantages, such as the prediction accuracy, fast simulation speed, robustness to noise, and overfitting [37], and easily parallelized, especially useful for Monte Carlo simulations and useful for error estimation and determination of variable importance.

4.2. Validation of Models

In this study, three statistical criteria are used to evaluate the error between the actual value and the predicted value of the compressive strength of concrete, namely, correlation coefficient (R), root mean square error (RMSE), and mean absolute error (MAE). The R-value is used to examine the linear correlation between the actual value and the predicted value in the range [−1; 1]. Both the RMSE and MAE measure the average error between the actual and predicted outputs, in which RMSE is used to evaluate the difference in value between actual and predicted, and MAE displays the average error between actual and prediction values. For these two indicators, the smaller value denotes the better performance of the model. The closer the absolute value of R is to 1, the more accurate the RF model is in predicting the compressive strength of concrete. R, RMSE, and MAE are determined by the following equations:where N is the number of database, Q0 and are the actual experimental value and the average real experimental value, and Qt and are the predicted value and the average predicted value, calculated according to the model output.

5. Methodology Flow Chart

The methodology of constructing the RF model to predict the compressive strength of concrete containing GGBFS is described in Figure 4 including the primary steps as follows:Step 1. Preparation of the database: In this step, the database including 453 experimental results determining compressive strength of concrete is collected to build RF models. The basic parameters to predict the compressive strength of concrete containing GGBFS include 8 input variables. The dataset is randomly divided into two parts, where 70% of the data are used to train the RF model and the remaining 30% is used to validate the built model.Step 2. Determination of the optimal of the RF architecture model: In this second step, the number of trees and the leaf size of the RF model are determined based on the results obtained by the dataset. The criterion used to validate an optimal RF model architecture is mean square error (MSE).Step 3. Training the optimal model: In this step, the training dataset is used to train the RF model with the optimal architecture.Step 4. Validating the model: In this final step, the testing dataset is used to test and validate the RF model. The performance of the RF model is evaluated by statistical criteria, including R, RMSE, and MAE.

6. Results and Discussion

6.1. Investigation on Random Forest Architecture

In this section, the RF architecture is determined through the mean square error (MSE), as shown in Figure 5. The MSE value is strongly affected by the grown trees and leaf size number. The number of grown trees ranges from 0 to 2000, and seven leaf size values are introduced in this investigation, including 1, 3, 5, 10, 20, 50, and 100. In all leaf size numbers, the RF model is stable after about 500 grown trees. It is observed that the higher the leaf size number, the lower the MSE value. Overall, the MSE value of RF is the lowest in the case of simulation with 1 leaf size and about 500 grown trees [500–1]. Therefore, the best architecture of the RF model constitutes one leaf size and 500 grown trees. This architecture is used for the subsequent investigation.

6.2. Prediction Performance

In this section, the RF model performance is assessed by three criteria such as R, RMSE, and MAE. However, due to the sampling technique in which the training database and testing database are randomly constructed, the results of the RF model need to be evaluated after a sufficient number of simulations. In this paper, 500 simulations seem to be appropriate for obtaining reliable results. After 500 simulations, RMSE, MAE, and R values of the training and testing parts are shown in Figures 6(a)6(c), respectively, including the average and Std values. For the training part, the average value of RMSE is about 5.22, and the average value of MAE is 3.84, and the average value of R is 0.97. For testing, the average value of RMSE is about 7.26, and the average value of MAE is 5.36, and the average value of R is 0.95. It is observed that the Std value is relatively small, which indicates the RF architecture is relatively stable. This result shows that RF architecture is suitable for determining the compressive strength of concrete containing GGBFS. Besides, the Std value for training is smaller than Std value for the testing part, which means the model’s performance for training is higher than that for testing. This could be useful to prevent overfitting problems. The exact values are given in Table 2.

6.3. Prediction Accuracy

Once the best architecture is found, this section is dedicated to the presentation of the best simulation using the RF algorithm. Figures 7(a) and 7(b) show the correlation between the experimental and the predicted values for the training and testing datasets under regression graphs, respectively. A linear fit is plotted in each case, in black color. It is worth noting that the correlation lines are very close to a perfect linear fit, which confirms an excellent agreement between the actual and predicted compressive strength of concrete using GGBFS.

The comparison shows that the predicted value is very close to the experimental value. The model error is plotted between the predicted value and the experimental value for the training database (Figure 8(a)) and the testing database (Figure 8(b)). The error values corresponding to the training and testing databases are small. Based on the cumulative distribution (black line), the percentage error of samples within a range can be easily determined. For example, with the training database, the percentage of samples with errors in the range [−5; 5] kN is about 70%. Similarly, the 60% error between the experimental value and the RF simulation of the testing database is about [−5; 5] kN. The results of the performance criteria show that the RF model with 500 grown trees and 1 leaf size architecture can quite accurately predict the compressive strength of concrete containing GGBFS.

Table 3 presents the different quality assessment criteria for the best RF predictor. The best value of R is 0.9759 for the training part and for the testing part is 0.9729. The values of RMSE, MAE, Err. mean, and Err. Std for the training dataset are 5.4480, 4.1365, −0.0563, and 5.4563 and for the testing dataset are 4.9585, 3.9423, 0.6252, and 4.9647, respectively. Overall, these results show that RF could accurately predict the compressive strength of concrete containing GGBFS.

Table 4 shows the comparison of different machine learning models proposed in the literature with the proposed RF model. The comparisons are presented in the form of the machine learning algorithm, input number, number of data, and performance measure. The results show that the RF model of this investigation, containing 500 growth trees and 1 leaf size, could predict the compressive strength of concrete with higher reliability, higher accuracy, and low time consuming than that of almost all investigations. Based on a large number of simulations performed, this paper shows the simple architecture of the RF model for the higher prediction of concrete compressive strength. Overall, these results indicate that if the architecture of an ANN model is carefully selected, it could be used as an alternative prediction tool for material engineers.

Finally, Figure 9 shows the feature importance analysis of compressive strength with respect to each input variable using the RF model. There are 8 input databases, including cement content (X1), water content (X2), coarse aggregate (X3), fine aggregate or sand (X4), GGFBS content (X5), hyperplasticizing (X6), superplasticizer (X7), and age of samples (X8). After 500 simulations, the average value of X7 is the smallest, whereas the average value of X8 is the highest. The results show that the superplasticizer content exhibits the most negligible effect on the compressive strength of GGBFS concrete, which mainly depends on the testing age of samples. More importantly, different from most of the previously published results, the analysis shown in Figure 9 is conducted by taking the average feature importance results over 500 simulations. By doing so, the variability of the input space while constructing the RF model is minimized, and the reliability of the analysis is clearly shown (i.e., low Std values).

7. Conclusion

In this investigation, the RF algorithm is presented to predict the compressive strength of concrete containing GGBFS. A number of 453 experimental samples are gathered to develop the RF model. The database is randomly divided into two parts 70% of training data and 30% of testing data for the validation phase of the constructed RF model. To fully assess the RF model performance, a number of 500 simulations are performed using random sampling technique. The results show that the RF architecture containing 500 growth trees and 1 leaf size is an excellent architecture to predict the compressive strength of concrete using GGBFS, in which the mean values of R, RMSE, and MAE are, respectively, 0.9461, 7.2602, and 5.3628 for the testing part. The highest accurate RF model shows an excellent prediction performance with R = 0.9729. The results can be used in developing a reliable model to predict accurately and quickly the compressive strength of concrete using GGBFS. Once the model is built, the prediction process would take a short time to estimate the compressive strength of a mix design.

Several short-term research directions of the present work could be mentioned. First, although the effectiveness of the RF model is clearly shown in this study, the model’s applicability can be improved by collecting more data samples with a broader range of input and output variables. This could be conducted based on the investigations of Golafshani and Behnood [39], as well as Behnood et al. [32]. The updated database is expected to be the most significant number of samples with the broadest range of values. Moreover, the accuracy of the RF model could be further improved by using optimization algorithms such as particle swarm optimization, genetic algorithm, and artificial bee colony algorithm in determining the best RF hyperparameters. Last but not least, the specimen type of compressive strength could also be considered as an input parameter. Overall, within the range of input and output variables of the present study, a numerical tool is developed in Matlab, which could be an alternative prediction tool for engineers to quickly estimate the compressive strength of concrete containing GGBFS.

Data Availability

The data used to support the findings of this study are available from the corresponding author upon request.

Conflicts of Interest

The authors declare that they have no conflicts of interest.