materials

Article On the Use of Models for Prediction of Compressive Strength of Concrete: Influence of Dimensionality Reduction on the Model Performance

Zhi Wan *, Yading Xu and Branko Šavija

Faculty of Civil Engineering and Geosciences, Delft University of Technology, 2628CN Delft, The Netherlands; [email protected] (Y.X.); [email protected] (B.Š.) * Correspondence: [email protected]; Tel.: +31-616447088

Abstract: Compressive strength is the most significant metric to evaluate the mechanical properties of concrete. Machine Learning (ML) methods have shown promising results for predicting compressive strength of concrete. However, at present, no in-depth studies have been devoted to the influence of dimensionality reduction on the performance of different ML models for this application. In this work, four representative ML models, i.e., Linear Regression (LR), Support Vector Regression (SVR), Extreme Gradient Boosting (XGBoost), and Artificial Neural Network (ANN), are trained and used to predict the compressive strength of concrete based on its mixture composition and curing age. For each ML model, three kinds of features are used as input: the eight original features, six Principal Component Analysis (PCA)-selected features, and six manually selected features. The performance as well as the training speed of those four ML models with three different kinds of features is assessed and compared. Based on the obtained results, it is possible to make a relatively accurate prediction   of concrete compressive strength using SVR, XGBoost, and ANN with an -square of over 0.9. When using different features, the highest R-square of the test set occurs in the XGBoost model with Citation: Wan, Z.; Xu, Y.; Šavija, B. On the Use of Machine Learning manually selected features as inputs (R-square = 0.9339). The prediction accuracy of the SVR model Models for Prediction of Compressive with manually selected features (R-square = 0.9080) or PCA-selected features (R-square = 0.9134) Strength of Concrete: Influence of is better than the model with original features (R-square = 0.9003) without dramatic running time Dimensionality Reduction on the change, indicating that dimensionality reduction has a positive influence on SVR model. For XGBoost, Model Performance. Materials 2021, the model with PCA-selected features shows poorer performance (R-square = 0.8787) than XGBoost 14, 713. https://doi.org/10.3390/ model with original features or manually selected features. A possible reason for this is that the ma14040713 PCA-selected features are not as distinguishable as the manually selected features in this study. In addition, the running time of XGBoost model with PCA-selected features is longer than XGBoost Academic Editor: Łukasz Sadowski model with original features or manually selected features. In other words, dimensionality reduction Received: 12 January 2021 by PCA seems to have an adverse effect both on the performance and the running time of XGBoost Accepted: 29 January 2021 model. Dimensionality reduction has an adverse effect on the performance of LR model and ANN Published: 3 February 2021 model because the R-squares on test set of those two models with manually selected features or PCA-selected features are lower than models with original features. Although the running time of Publisher’s Note: MDPI stays neutral with regard to jurisdictional claims in ANN is much longer than the other three ML models (less than 1s) in three scenarios, dimensionality published maps and institutional affil- reduction has an obviously positive influence on running time without losing much prediction iations. accuracy for ANN model.

Keywords: machine learning models; dimensionality reduction; Principal Component Analysis; compressive strength prediction

Copyright: © 2021 by the authors. Licensee MDPI, Basel, Switzerland. This article is an open access article distributed under the terms and 1. Introduction conditions of the Creative Commons Concrete is the most widely used construction material in the world. Among its prop- Attribution (CC BY) license (https:// erties, compressive strength is significant to evaluate its general construction properties for creativecommons.org/licenses/by/ two reasons: first, it is the specification metric most commonly used in engineering practice 4.0/).

Materials 2021, 14, 713. https://doi.org/10.3390/ma14040713 https://www.mdpi.com/journal/materials Materials 2021, 14, 713 2 of 21

(e.g., in codes such as Eurocode 2 (EC2) [1] and Chinese code for design of concrete struc- tures (GB50010) [2], and second, other engineering properties (such as Young’s modulus and tensile strength, for example) can be correlated to compressive strength of concrete. Therefore, it is of great importance to make a precise prediction of compressive strength. However, concrete compressive strength is influenced by many factors such as mixture components (water/cement, aggregate, superplasticizers, etc.), curing environment as well as curing age [3–6]. In practical terms, it would be very beneficial to be able to accurately predict the compressive strength of concrete based on the abovementioned parameters. At present, measuring the compressive strength of concrete in the lab is crucial for its practical application. However, this is often time-consuming and significant resources are utilized for mixture optimization. In addition, lowering the environmental footprint of concrete production has led to partially/completely replacing cement with supplementary cementitious materials (e.g., fly ash, blast furnace slag, and others [7,8]), further expanding the design space for concrete mix design. Besides, to meet some special requirements of practical engineering nowadays, an increasing number of innovative concrete types (e.g., strain hardening cementitious composites (SHCC), ultra-high performance concrete (UHPC), and self-healing concrete (SHC)) are being developed and need to be investigated in the lab [9–11], which makes the prediction of concrete compressive strength based on mixtures increasingly important. Analytical and numerical models, commonly based on homogenization, are increas- ingly being used to predict the mechanical properties (compressive/tensile strength, elas- tic modulus) of concrete [12,13]. In such models, detailed information about the mi- crostructure, spatial distribution, and mechanical properties of individual phases are required [14,15]. In addition, many of these models are computationally expensive, which prohibits their practical applicability. Recently, machine learning (ML) has emerged as a promising way to predict the compressive strength of concrete with high accuracy [16–18]. Compared with traditional prediction methods, an advantage of machine learning is that the prediction could be made without knowing the exact relationship between features and compressive strength. Machine learning models have been used for predicting compres- sive strength of concrete for a long time [19,20]. Different ML models, from simple linear regression to newly developed ensemble methods, have been used to predict concrete compressive strength based on given features. It is reasonable that every ML model has its own advantages and disadvantages. It is of great importance to study the properties of those ML models while predicting concrete compressive strength. In previous studies, most of the times the learning procedure (hyperparameters tuning) of ML models is not presented and analyzed in detail, making it difficult to assess the validity of the models and replicate the findings. More importantly, most previous studies do not address data preprocessing, a process which can have significant impact on generalization performance of a supervised ML algorithm [21]. For example, dimensionality reduction is crucial for many ML problems, especially for those with many features [22]. However, the influence of dimensionality reduction on the performance of different ML models for compressive strength prediction is currently not investigated. In this work, we carry out an in-depth comparison between four representative ML models. Among others, Linear Regression (LR) is a parametric regression model used to determine the relation between target (output) and features (input) and it is the simplest regression model [23]. Support Vector Regression (SVR) is a nonparametric ML model which can deal with nonlinear regression problems using kernel function [24]. Extreme Gradient Boosting (XGBoost) is a boosting algorithm based on decision tree [25], and therefore it enables users to analyze the relative importance of features in prediction response. Artificial Neural Network (ANN) is a biologically-inspired method to tackle complex ML tasks with a large number of simple processing elements called neurons [26]. Instead of directly training the ML models with raw data, original features in the dataset are herein first preprocessed with feature selection using mutual information regression (MIR), feature extraction using Principal Component Analysis (PCA) to seek for possible Materials 2021, 14, 713 3 of 21

dimensionality reduction. In addition, feature normalization is also carried out to accelerate the training process. The four selected ML models have been trained and tested under three scenarios: 1. Models with original features (i.e., without any feature reduction) to act as a baseline for comparison. 2. Models with reduced dimensionality after PCA, trained and tested with PCA- selected features. 3. Models with the equal number of manually selected features as that in scenario 2. The performance as well as the training speed of those four ML models under these three scenarios are compared. The influence of dimensionality reduction on the perfor- mance of 4 ML models are drawn based on the obtained results.

2. Data Source and Theories of Machine Learning Models 2.1. Data Source A set of reliable data is necessary in order to make a precise prediction and comparison between the different ML models. Besides, considering that a small-sized dataset may introduce serious overfitting when using some learning algorithms such as Artificial Neural Network or XGBoost, the size of dataset should not be too small [27]. Therefore, the compressive strength data collected by Yeh [19] with 1030 samples is adopted as our subject. The statistical properties of the dataset are given in Table1.

Table 1. Statistical properties of Yeh’s dataset [28].

Coarse Fine Compressive Cement Blast Furnace Slag Fly Ash Water Superplasticizer Age Aggregate Aggregate Strength (kg/m3) (kg/m3) (kg/m3) (kg/m3) (kg/m3) (day) (kg/m3) (kg/m3) (MPa) Mean 281.168 73.896 54.188 181.567 6.205 972.919 773.580 45.662 35.818 Std 104.456 86.237 63.966 21.344 5.971 77.716 80.137 63.139 16.698 Min 102 0 0 121.8 0 801 594 1 2.33 Max 540 359.4 200.1 247 32.2 1145 992.6 365 82.6 Range 358 359.4 200.1 125.2 32.2 344 398.6 364 80.26

2.2. Introduction of the Utilized ML Models Among the ML Models, there are four representative ML models: linear regression (LR), support vector regression (SVR), extreme gradient boosting (XGBoost), and Artificial Neural Network (ANN). In this paper, those ML models are selected to perform the regression and comparison work. A brief introduction about those ML models is given in this part.

2.2.1. Linear Regression (LR) Linear regression is an old method to evaluate the correlation between two or more features [29]. After deciding the relationship between features (input) and target (output), the learning process will be run to minimize the loss function value (like Mean Squared Error). The parameters that minimize the loss function are exactly the optimal parameters for the regression. Due to its simplicity, the accuracy of this model is not high. The general form of a multiple linear regression model is given in Equation (1) below [30]:

m yˆ = a0 + ∑ ajXj (1) j = 1

where yˆ is the predicted result, Xj are the features (input) of the dataset, and a0, a1, ... , am are the parameters to train. In this study, this model is employed to fit multiple linear equations that relate the compressive strength and the given features. According to previous research [31], the relation between features and compressive strength is complex and nonlinear. Therefore, Materials 2021, 14, 713 4 of 21

in order to improve the prediction accuracy of LR model, polynomial features are created using original features with different polynomial degrees.

2.2.2. Support Vector Regression (SVR) Support vector machine (SVM) is a powerful and versatile method to deal with the linear/nonlinear classification, regression, and even outlier detection [26]. SVM is a typical kernel method in machine learning. In particular, SVM classifier is aimed to separate different classes with the widest possible street (large margin) between the classes. The linear SVM classifier model predicts the class of a new instance x by computing the T decision function W ·x + b = w1x1 + w2x2 + ... + wnxn + b. Based on the decision function, prediction is made as Equation (2):

 0, WT·x + b < 0 yˆ = (2) 1, WT·x + b ≥ 0

The soft margin linear SVM classifier objective is given in Equation (3):

1 m min WT·W + C ζ(i) (3) W b ∑ , ,ζ 2 i = 1   Subject to t(i) WT·x(i) + b ≥ 1 − ζ(i) and ζ(i) ≥ 0 for i = 1, 2, ... , m, where W is the weight vector, ζ(i) is a slack variable to measure how much the i-th instance is allowed to violate the margin, and C is a hyperparameter that allows to define the trade-off between two conflicting objectives: making the slack variables as small as possible to reduce the 1 T margin violations, or making 2 W ·W as small as possible to increase the margin. Support Vector Regression (SVR) is a subset of SVM for regression purposes. Instead of trying to fit the largest possible street between two classes (SVM classifier), SVR tries to fit as many instances as possible on the street while limiting margin violations [32]. Except for linear regression, this algorithm is capable to tackle nonlinear regression by a kernelized SVR. Among the kernels, the Gaussian Radial Basis function (RBF) kernel (Equation (4)) is widely used for its capacity of mapping the original features into infinite dimensionality [28].   K(a, b) = exp −γ||a − b||2 (4)

Hyperparameter γ defines how much influence a single training example has and the default value in scikit learn is the reciprocal of the number of features in the dataset [33].

2.2.3. Extreme Gradient Boosting (XGBoost) Compared with an individual predictor, the model which aggregates the predictions of a group of predictors will often get better predictions. A group of predictors is called an ensemble and this technique is called ensemble learning [25]. There are three different kinds of methods to form an ensemble method, i.e., bagging, boosting, and stacking. For example, Random Forest (RF) is an ensemble of decision trees, generally trained via the bagging method. Unlike bagging, which trains predictors in parallel, boosting trains predictors sequentially. XGBoost is a scalable end-to-end tree boosting system developed by Chen et al. [34]. It tries to fit the new predictor to the residual errors made by the previous predictor under the gradient boosting framework. The result is predicted using many additive functions as Equation (5) [35]: M 0 yi = yi + η ∑ fk(Xi) (5) k = 1 Materials 2021, 14, 713 5 of 21

0 where yi is the predicted result based on features Xi, yi is the initial guess (often the mean of the measured values in the training set), and η is the learning rate that helps to improve smoothly the model while adding new trees and avoid overfitting. The estimation fk of the additional k-th estimators is as Equation (6).

k (k−1) yi = yi + η fk (6)

k where yi is the k-th predicted result and fk is defined by the leaves weights. To learn the functions used in model above, the following regularized objective (Equation (7)) is minimized [35],

L(φ) = ∑ l(yˆi, yi) + ∑ Ω( fk) (7) i k

1 2 where Ω( f ) = γT + 2 λ||w|| . Here, l is a differentiable convex loss function that measures the difference between the prediction yˆi and the target yi. The second term Ω penalizes the complexity of the model and it acts as an additional regularization term helps to avoid overfitting. In addition, as XGBoost is based on decision trees and single decision trees are highly interpretable, XGBoost enables users to learn the relative importance or contribution of individual input variables in predicting the response [36]. According to Breimen et al. [37], 2 Il (T) could be used as a measure of relevance for each predictor variable xl and is shown in (Equation (8)), in which J is the number of nodes in the tree

J−1 2 ˆ2 Il (T) = ∑ it I(v(t) = l) (8) t = 1

The importance measure is generalized to XGBoost by averaged over the trees and is shown in Equation (9), in which M is the number of the trees

M 2 1 2 Il = ∑ Il (Tm) (9) M m = 1

In Scikit-learn, the feature importance is represented with an F score: A higher F score means that the feature contributes relatively more in predicting the response.

2.2.4. Artificial Neural Network (ANN) Artificial Neural Network (ANN) is a powerful algorithm processing data by simu- lating the functioning of the biologic neurons [38]. Researchers have carried out a lot of studies on ANN since the 1960s. During the past decades, due to the development of big data and computer power, Deep Learning (DL) has rapidly developed to tackle large and highly complex machine learning tasks [33]. ANN uses linking functions to correlate features with targets. There are two pro- cesses for ANN: forward propagation and backward propagation. During the forward propagation process, the artificial neuron sums the weighted inputs from the neurons in the previous layer (or input) and then uses activation functions (such as ReLu function, sigmoid function, tanh function, or others) to carry out nonlinear operation [39]. After obtaining the predicted target, the gap between predicted target and actual target is used to improve the weights in each layer, using backward propagation. In the backward propa- gation process, optimization algorithms such as stochastic gradient descent (SGD), Root Mean square prop (RMSprop), and Adaptive moment estimation (Adam) are employed to improve the weight matrix (W) and bias matrix (b). The two processes continue until the predicted values are close enough to the actual ones (measured by loss function). A general architecture of an ANN is shown in Figure1[ 40]. The calculation of neurons in the l-th layer is as Equations (10)–(15). Materials 2021, 14, x FOR PEER REVIEW 6 of 23

Materials 2021, 14, 713 6 of 21 general architecture of an ANN is shown in Figure 1 [40]. The calculation of neurons in the l-th layer is as Equations (10)–(15).

Input Layer Hidden Layer 1 Hidden Layer n Output Layer

[1] [n] a1 a1

X1 y1

[1] [n] a2 a2 X2

Xm yp

[1] [n] ak at

FigureFigure 1.1.General General structurestructure ofof anan ArtificialArtificial Neural Neural Network Network (ANN). (ANN).

ForwardForward propagation:propagation: [l] = W[l] A[l−1] + b[l] (10) Z ℤ[푙] = 푊[푙]퐴[푙−1] + 푏[푙] (10) [ ] [ ] [ ] A l = g l (Z l ) (11) 퐴[푙] = 푔[푙](ℤ[푙]) (11) Backward propagation: Backward propagation: [l] [l] [l]0 [l] dZ = dA ∗ g [(Z]′ ) (12) 푑ℤ[푙] = 푑퐴[푙] ∗ 푔 푙 (ℤ[푙]) (12)

[l] 1 [l] [l−1]T dW = d1Z ∗ A 푇 (13) 푑푊[푙] =m 푑ℤ[푙] ∗ 퐴[푙−1] (13) 푚 1 [l] = m [l] ( = ) db 1 ∑i = dZ axis 1 (14) 푑푏[푙] = m∑푚 푑1ℤ[푙] (axis = 1) 푚 푖 = 1 (14) [l−1] [l]T [l] dA = W푇 ∗ dZ (15) 푑퐴[푙−1] = 푊[푙] ∗ 푑ℤ[푙] (15) where W[l], b[l] are the weight matrix and bias matrix of layer l; [l] is the weighted sum [푙] [푙] Z [푙] where 푊 , 푏 are the weight matrix and bias matrix of layerh l;[ l]ℤ [ l]is the weighted[l]i sum matrix of layer l; A[l] is the activation of units in layer l; A[l] = a , a ··· , a , g[l](x) is matrix of layer l; 퐴[푙] is the activation of units in layer l; 퐴[푙] =1 [푎2[푙], 푎[푙] ⋯k, 푎[푙]], 푔[푙](푥) [l] [l] [l] 1 2 푘 theis the activation activation function function of layerof layerl; d Zl; 푑,ℤdW[푙], 푑푊, db[푙], are푑푏[푙 the] are derivative the derivative of the of weighted the weighted sum [l] [l] [l] [l−1] matrixsum matrixZ , weight ℤ[푙], weight matrix matrixW , bias푊[푙] matrix, bias matrixb in layer푏[푙] inl, layer respectively; l, respectively; and dA and 푑퐴is the[푙−1] − derivativeis the derivative of activation of activation of units of in units layer inl layer1. l − 1. 3. Prediction Process with Different ML Models 3. Prediction Process with Different ML Models 3.1. Data Preprocessing 3.1. Data Preprocessing Before feeding the dataset into the ML models, it is necessary to preprocess the data toBefore accelerate feeding the the learning dataset process into the [ 21ML]. Asmodels, the dataset it is necessary we use isto relativelypreprocess complete the data andto accelerate clean, we the only learning perform process feature [21]. selection, As the featuredataset extractionwe use is relatively and feature complete normaliza- and tionclean, sequentially. we only perform feature selection, feature extraction and feature normalization se- quentially. 3.1.1. Feature Selection and Extraction 3.1.1.In Feature Machine Selection Learning and applications, Extraction identifying the most characterizing features is cru- cial toIn minimize Machine theLearning cost function. applications, In this identifying work, mutual the most information characterizing regression features (MIR) is [cru-41] iscial first to employedminimize the to detect cost function. the dependency In this work, of the mutual original information features. In reg MIR,ression the mutual (MIR) [41] in- is first employed to detect the dependency of the original features. In MIR, the mutual

Materials 2021, 14, 713 7 of 21

formation of two given variables is defined in terms of their probabilistic density functions p(x), p(y), and p(x,y) (Equation (16))

p(x, y) I(x, y) = p(x, y)log dxdy (16) x p(x)P(y)

The selected features xi are required to have the largest mutual information. In terms of sequential search, the m best individual features are often selected as the m features. After analysis with mutual information in scikit-learn, the number of selected features is still 8, which is the same with the number of original features. In other words, none of the original features could be directly abandoned without losing much information. It is likely that the prediction models will have good prediction results if all the original features are retained in this study. Considering that it is not suitable to reduce dimensionality by directly abandoning original features, Principal Component Analysis (PCA) is employed to extract the original features. In PCA, the features are extracted by projecting the original vector to a lower dimensional latent space and find a new set of coordinates to define the original vectors. In Scikit-learn, singular value decomposition (SVD) (Equations (17) and (18)) is utilized using the Numpy package [42] to perform the Principal Component Analysis [43],

xe = x − x_mean (17) T xe = UΣV (18) where x_mean is the mean values of x, ΣTΣ matrix contains the eigenvalues that determine the variance explained in each principal component, while the VT matrix contains the principal components in order of decreasing variance explained. In this work, PCA is performed to detect the possible dimensionality reduction by analyzing the cumulative explained variance. When the cumulative explained variance approaches 1, it means that an increasing amount of information in the dataset is retained. All information in the dataset is retained when the cumulative explained variance equals to 1. Based on the obtained results from PCA, the explained variance ratio of each selected component is shown in Table2. The relation between cumulative explained variance and the number of components after dimensionality reduction is shown in Figure2.

Table 2. Result of Principal Component Analysis (PCA).

Component Component Component Component Component Component Component Component Component 1 2 3 4 5 6 7 8 Explained variance ratio 3.2577 × 10−1 2.4887 × 10−1 1.8480 × 10−1 1.0766 × 10−1 1.0095 × 10−1 2.9845 × 10−2 1.8180 × 10−3 2.8770 × 10−4 Cumulative explained variance 0.32577 0.57464 0.75944 0.86710 0.96805 0.997895 0.999713 1.00000

From Figure2, it is noted that the cumulative explained variance is lower than 1.0 when the number of components is less than 8, indicating that the 8 features are more or less related with each other. The results from PCA are in good agreement with that of the result of MIR. However, when the number of components is reduced to 6 by PCA, the original information is well reserved (cumulative explained variance is 0.997895). Considering that the total number of components is not too large, models using the 8 original features, 6 PCA-selected features, and 6 manually selected features are used as the input for the ML models in this study. MaterialsMaterials2021 2021, 14, 14, 713, x FOR PEER REVIEW 88 of of 21 23

FigureFigure 2. 2.Cumulative Cumulative explained explained variance variance ratio ratio with with respect respect to to number number of of dimensions dimensions (PCA). (PCA).

3.1.2.From Feature Figure Normalization 2, it is noted that the cumulative explained variance is lower than 1.0 whenAnother the number common of components preprocessing is less method than in 8, ML indicating is feature that normalization, the 8 features which are more could or alsolessaccelerate related with the each learning other. process. The results From from Table PCA1, it can are bein seengood that agreement the ranges with of that features of the areresult quite of different:MIR. However, for example, when mixturesthe number contain of components on average 6is kg/m reduced3 of superplasticizer,to 6 by PCA, the butoriginal more information than 970 kg/m is well3 of reserved coarse aggregate. (cumulative It explained is known variance that ML is models, 0.997895). which Consid- are smoothering that functions the total of number the inputs, of components are affected is by not the too scale large, of models the input using [44 ].the Therefore, 8 original featurefeatures normalization,, 6 PCA-selected where features the mean, and values 6 manually and the selected variances features of each are feature used areas the 0 and input 1, respectivelyfor the ML models (Equation in this (19)), study. is adopted to deal with the dataset.

x − x 3.1.2. Feature Normalization x0 = (19) σ Another common preprocessing method in ML is feature normalization, which could wherealso acceleratex and σ are the the learning mean process. and the standardFrom Table deviation 1, it can of be feature seen that x, respectively.the ranges of features are quite different: for example, mixtures contain on average 6 kg/m3 of superplasticizer, 3.2.but Prediction more than Process 970 kg/m with Original3 of coarse Features aggregate. It is known that ML models, which are smoothTo avoid functions data leakage,of the inputs, the original are affected dataset by is the first scale split of with the ainput split of[44]. 70–30% Therefore, between fea- theture training normalization, and test sets,where i.e., the trainset mean values (size = and 721) the and variances test set (size of each = 309). feature Among are 0 others, and 1, therespectively training set(Equation is used ( to19) train), is adopted the ML to models deal with while the the dataset. test set is used to verify the performance of ML models (generalization ability).푥 − As푥̅ the compressive strength prediction is a regression task, coefficient of determination푥′ = (R-square) is selected as a metric(19) to 휎 evaluate the accuracy of ML models. In addition, considering that the gap of root mean squareswhere 푥 error̅ and (RMSE)휎 are the or mean mean and absolute the standard error (MAE) deviation between of feature different x, respectively. ML models is not as distinguishable as mean squared error (MSE), MSE is also employed to analyze the3.2. performance Prediction Process of 4 MLwith modelsOriginal with Features 3 different kinds of features. The mathematical formulationsTo avoid of data R-square leakage, and the MSE original are given dataset in Equationsis first split (20) with and a split (21) of [40 70]: –30% between the training and test sets, i.e., trainset (size = 721) and test set (size = 309). Among others, (y − y 0)2 the training set is used to train2 the ML0 =models− ∑ whilei thei test set is used to verify the per- R y , y 1 2 (20) formance of ML models (generalization ability).∑ (Asyi −they )compressive strength prediction is a regression task, coefficient of determination (R-square) is selected as a metric to eval- i = n uate the accuracy of ML models. In addition,1 considering0 2 that the gap of root mean MSE = y − y (21) squares error (RMSE) or mean absolute error∑ (MAE) between different ML models is not n i = 1 as distinguishable0 as mean squared error (MSE), MSE is also employed to analyze the whereperformanceyi and y ofi are4 ML the models actual with and predicted3 different values kinds ofof thefeatures.i-th sample, The mathematical and y is the formu- mean valuelations of of compressive R-square and strength. MSE are given in Equations (20) and (21) [40]: Linear Regression, Support Vector Regression, and′ 2 Extreme Gradient Boosting are ∑(푦푖 − 푦푖 ) implemented under the framework푅2(푦 , 푦′ of) scikit-learn= 1 − [33]. The ANN model is implemented(20) ∑(푦 − 푦̅)2 under the framework of Keras [45]. Since there is no푖 need to know the relation between fea- 1 tures and targets in advance (except푀푆퐸 in the = LR ∑ model),푖 = 푛|푦 − the푦′| learning2 process mainly focuses 푛 푖 = 1 (21) on tuning hyperparameters and obtaining the optimal parameters for each ML model.

Materials 2021, 14, 713 9 of 21

3.2.1. Linear Regression (LR) In linear regression, the selection of the regression hypothesis is crucial. Except for the linear combination of 8 original features, different polynomial features are also created to look for the optimal performance of LR model on the test set. However, according to Equation (22), the number of polynomial features dramatically increases with the polyno- mial degree. When polynomial degree is 5, the number of polynomial features is 1286, which is even larger than the data size (1030), and the model will be severely overfitting. Therefore, polynomial regressions with degree varying from 1 to 4 are performed:

(n + d)! N = − 1 (22) d!n! where N and n are the number of new features and original features, respectively, and d is the polynomial degree. The prediction process is simple because no hyperparameters are tuned in this work. The result of polynomial regression with different degrees is shown in Table3.

Table 3. Result of LR model with different polynomial features.

R-Square Degree Dimensionality of New Features Training Set Test Set 1 8 0.6133 0.6162 2 44 0.8114 0.7916 3 164 0.9269 0.8914 4 494 0.9834 −596.344

From Table3, it is noted that when polynomial degree increases from 1 to 3, R-squares of both training set and test set increase. However, when the polynomial degree continues increasing to 4, the R-square of training set increases while the R-square of the test set sharply decreases. A negative R-square indicates that the predicted result from ML model is even poorer than directly using the mean value of the test set as the predicted values for all samples in test set, indicating the model is severely overfitting. In other words, the Materials 2021, 14, x FOR PEER REVIEW 10 of 23 performance of LR model with 496 features on the test set is the worst among those LR models. Therefore, R-square of model with 164 features (polynomial degree = 3) on the test set is the highest with a value of 0.8914 and the accuracy is shown in Figure3.

(a) (b)

Figure 3. Prediction accuracy of 3rd degree polynomial LR model onon ((aa)) trainingtraining setset andand ((bb)) testtest set.set.

From FigureFigure3 3,, the the performance performance of of LR LR model model with with polynomial polynomial degree degree of 3 of is 3 remarkable is remark- inable both in both training training set andset and test test set. set. However, However, LR LR model model only only works works with with positivepositive integerinteger polynomial features, which significantlysignificantly restricts its furtherfurther improvementimprovement on predictionprediction accuracy.accuracy. For example,example, LRLR modelmodel isis notnot ableable toto mapmap water/cementwater/cement ratio as a polynomialpolynomial feature becausebecause cementcement isis aa featurefeature withwith a a polynomial polynomial degree degree of of− −11 inin water/cementwater/cement ratio when using the original features as inputs. However, the water/cement ratio is of great importance when predicting concrete compressive strength. To tackle this issue, other ML models are tested.

3.2.2. Support Vector Regression (SVR) Similar to the LR model, a linear SVR or kernelized SVR with polynomial kernel is not sufficient to make a better prediction. As mentioned in Section 2.2.2, Gaussian Radial basis function (RBF) kernel is able to map the original features into infinite dimensionality [46]. In this work, two hyperparameters, i.e., C and gamma (γ), are tuned. Among others, C is a hyperparameter controlling the balance between keeping the street as large as pos- sible and limiting the margin violations: a smaller C leads to a wider street but more mar- gin violation and vice versa. In other words, C acts as the regularization hyperparameter. Similarly, the kernel-related hyperparameter γ represents the effect of single sample on the hyperplane: The larger gamma is, the closer other examples must be to be affected and vice versa. Therefore, selecting proper value of C and γ is of great importance [47]. In order to roughly determine the search range, the possible optimal range of C and γ is first searched separately and the results are shown in Figure 4.

(a) (b) Figure 4. R-square of SVR under different hyperparameters: (a) different C and (b) different γ.

Materials 2021, 14, x FOR PEER REVIEW 10 of 23

(a) (b) Figure 3. Prediction accuracy of 3rd degree polynomial LR model on (a) training set and (b) test set.

From Figure 3, the performance of LR model with polynomial degree of 3 is remark- able in both training set and test set. However, LR model only works with positive integer polynomial features, which significantly restricts its further improvement on prediction accuracy. For example, LR model is not able to map water/cement ratio as a polynomial Materials 2021, 14, 713 feature because cement is a feature with a polynomial degree of −1 in water/cement10 ratio of 21 when using the original features as inputs. However, the water/cement ratio is of great importance when predicting concrete compressive strength. To tackle this issue, other ML models are tested. when using the original features as inputs. However, the water/cement ratio is of great importance when predicting concrete compressive strength. To tackle this issue, other ML 3.2.2. Support Vector Regression (SVR) models are tested. Similar to the LR model, a linear SVR or kernelized SVR with polynomial kernel is not3.2.2. sufficient Support to Vector make Regressiona better prediction. (SVR) As mentioned in Section 2.2.2, Gaussian Radial basis Similarfunction to (RBF the LR) kernel model, is able a linear to map SVR the or kernelizedoriginal features SVR with into polynomial infinite dimensionality kernel is not [46].sufficient to make a better prediction. As mentioned in Section 2.2.2, Gaussian Radial basis functionIn this (RBF) work, kernel two ishyperparameters, able to map the originali.e., C and features gamma into (γ), infinite are tuned. dimensionality Among others, [46]. C is aIn hyp thiserparameter work, two hyperparameters,controlling the balance i.e., C between and gamma keeping (γ), arethe tuned.street as Among large as others, pos- sibleC is a and hyperparameter limiting the margin controlling violations: the balance a smaller between C leads keeping to a thewider street street as large but more as possible mar- ginand violation limiting and the marginvice versa. violations: In other awords, smaller C Cacts leads as the to aregularization wider street buthyperparamete more marginr. Similarly,violation andthe kernel vice versa.-related In hyperparameter other words, C γ acts represents as the regularization the effect of single hyperparameter. sample on theSimilarly, hyperplane: the kernel-related The larger gamma hyperparameter is, the closerγ otherrepresents examples the must effect be of to single be affected sample and on vicethe hyperplane:versa. Therefore, The larger selecting gamma proper is, the value closer of C other and examplesγ is of great must impor be totance be affected [47]. and viceIn versa. order Therefore, to roughly selecting determine proper the valuesearch of range, C and theγ is possible of great optimal importance range [47 of]. C and γ is firstIn order searched to roughly separately determine and the the results search are range, shown the in possible Figure optimal4. range of C and γ is first searched separately and the results are shown in Figure4.

Materials 2021, 14, x FOR PEER REVIEW 11 of 23

(a) (b) From Figure 4, it is noted that when C equals to 1000 or γ equals to 0.1, the R-square Figure 4. RR-square-square of of SVR under different hyperparameters hyperparameters:: ( a) d differentifferent C and (b) differentdifferent γ. of test set is greatest, respectively. Based on the obtained results, a grid search (C: change fromFrom 300 to Figure 3000 with4, it is an noted increment that when of 100; C γ equals: change to 1000from or0.01γ toequals 1 with to increment 0.1, the R-square of 0.01) ofis testcarried set isout greatest, to look respectively. for the optimal Based combination on the obtained of hyperparameters results, a grid search C and (C: γ contrib- change fromuting 300 to the to 3000 relatively with an best increment performance of 100; ofγ the: change model from on test 0.01 set. to 1The with R- incrementsquares of of model 0.01) isin carried training out set to and look test for set the unde optimalr different combination hyperparameters of hyperparameters C and γ C are and shownγ contributing in Figure to5. the relatively best performance of the model on test set. The R-squares of model in training set and test set under different hyperparameters C and γ are shown in Figure5.

(a) (b)

FigureFigure 5.5. R-squareR-square ofof SVRSVR underunder differentdifferent hyperparametershyperparameters CC andandγ γ onon ((aa)) trainingtraining setset andand ((bb)) testtest set.set.

From the obtained result, it can be concluded that when C and γ are 1300 and 0.32, respectively, the model has the best performance on the test set with an R-square value of 0.9006 and the accuracy is shown in Figure 6. It is obvious that the accuracy is higher than that of the best performing LR model (R-square = 0.8914).

(a) (b) Figure 6. Prediction accuracy of SVR model on (a) training set and (b) test set.

3.2.3. Extreme Gradient Boosting (XGBoost) Although the performance of SVR model is better than the LR model, the prediction accuracy still has large space for improvement. Therefore, XGBoost, an ensemble method, is utilized to perform the regression. Before carrying out the prediction with XGBoost, we first import XGB model from the XGBoost package [48]. AS XGBoost is a scalable machine learning system for tree boosting, a lot of hyperparameters can be tuned. In this work, we only tune two hyperparameters: n_estimators and learning rate (shrinkage). The hyperpa- rameter n_estimators represents the number of the base estimators and learning rate scales the contribution of each tree. The reason for choosing those two hyperparameters is that they have a relatively large influence on the state of the model compared to other hyperparameters.

Materials 2021, 14, x FOR PEER REVIEW 11 of 23

From Figure 4, it is noted that when C equals to 1000 or γ equals to 0.1, the R-square of test set is greatest, respectively. Based on the obtained results, a grid search (C: change from 300 to 3000 with an increment of 100; γ: change from 0.01 to 1 with increment of 0.01) is carried out to look for the optimal combination of hyperparameters C and γ contrib- uting to the relatively best performance of the model on test set. The R-squares of model in training set and test set under different hyperparameters C and γ are shown in Figure 5.

(a) (b) Materials 2021, 14, 713 11 of 21 Figure 5. R-square of SVR under different hyperparameters C and γ on (a) training set and (b) test set.

From the obtained result, it can be concluded that when C and γ are 1300 and 0.32, respectively,From the the obtained model has result, the itbest can performance be concluded on that the test when set C with and anγ areR-square 1300 and value 0.32, of 0.9006respectively, and the the accuracy model hasis shown the best in performanceFigure 6. It is onobvious the test that set the with accuracy an R-square is higher value than of that0.9006 of andthe best the accuracyperforming is shown LR model in Figure (R-square6. It is = obvious 0.8914). that the accuracy is higher than that of the best performing LR model (R-square = 0.8914).

(a) (b)

Figure 6. Prediction accuracy of SVR model on (a) training set andand ((b)) testtest set.set.

3.2.3. Extreme Gradient Boosting (XGBoost) Although the performance of SVR model is better than the LR model, the prediction accuracy still has large space for improvement. Therefore, Therefore, XGBoost, an ensemble ensemble method method,, is utilized utilized to to perform perform the the regression. regression. Before Before carrying carrying out out the the prediction prediction with with XGBoost XGBoost,, we wefirst first import import XGBXGB model model from fromthe XGBoost the XGBoost package package [48]. AS [48 XGBoost]. AS XGBoost is a scalable is a machine scalable learningmachine system learning for system tree boosting, for tree boosting,a lot of hyperparameters a lot of hyperparameters can be tuned. can beIn tuned.this work, In this we work,only tune we onlytwo hyperparameters: tune two hyperparameters: n_estimators n_estimators and learning and rate learning (shrinkage) rate (shrinkage).. The hyperpa- The Materials 2021, 14, x FOR PEER REVIEW 12 of 23 rameterhyperparameter n_estimators n_estimators represents represents the number the number of the of base the estimators base estimators and learning and learning rate scalesrate scales the contribution the contribution of each of eachtree. tree.The Thereason reason for choosing for choosing those those two twohyperparameters hyperparam- iseters that is they that have they a have relatively a relatively large largeinfluence influence on the on state the of state the ofmode the modell compared compared to other to hyperparameters.otherSimilar hyperparameters. to the SVR model, grid search is employed to look for the optimal n_estima- tors andSimilar shrinkage. to the SVR First, model, the possible grid search optimal is employed range ofto n_estimators look for the optimaland learning n_estimators rate are identifiedand shrinkage. separately First, and the the possible results optimal are shown range in Fig ofure n_estimators 7. and learning rate are identified separately and the results are shown in Figure7.

(a) (b)

Figure 7. RR-square-square of XGBoost under different hyperparameters:hyperparameters: ( a) dif differentferent n_estimators; and (b) differentdifferent learning rate.rate.

From the obtained result, when n_estimators equals 70 or learning rate equals 0.17, the R-squareR-square ofof thethe testtest set set is is greatest. greatest Therefore,. Therefore, grid grid search search (n_estimators: (n_estimators: change change from from 50 50to 200to 200 with with an an increment increment of 1;of learning1; learning rate: rate: change change from from 0.01 0.01 to 0.5to 0.5 with with an an increment increment of of0.005) 0.005) is carriedis carried out out to look to look for the for optimal the optimal combination. combination. The R-squares The R-squares of XGBoost of XGBoost model minodel training in training set and set test and set test under set differentunder different hyperparameters hyperparameters are shown are shown in Figure in8 Figure. 8.

(a) (b) Figure 8. R-square of XGBoost under different n_estimators and learning_rate: (a) training set and (b) test set.

From the obtained result, when n_estimators and learning_rate are 64 and 0.365, re- spectively, the model has the best performance on the test set with an R-square of 0.9309 and the accuracy is shown in Figure 9.

Materials 2021, 14, x FOR PEER REVIEW 12 of 23

Similar to the SVR model, grid search is employed to look for the optimal n_estima- tors and shrinkage. First, the possible optimal range of n_estimators and learning rate are identified separately and the results are shown in Figure 7.

(a) (b) Figure 7. R-square of XGBoost under different hyperparameters: (a) different n_estimators; and (b) different learning rate.

From the obtained result, when n_estimators equals 70 or learning rate equals 0.17, the R-square of the test set is greatest. Therefore, grid search (n_estimators: change from 50 to 200 with an increment of 1; learning rate: change from 0.01 to 0.5 with an increment Materials 2021, 14, 713 of 0.005) is carried out to look for the optimal combination. The R-squares of XGBoost12 of 21 model in training set and test set under different hyperparameters are shown in Figure 8.

(a) (b)

Figure 8. RR-square-square of XGBoost under different n_estimators and learning_rate:learning_rate: (a) training set and ((b)) testtest set.set.

Materials 2021, 14, x FOR PEER REVIEW From the the obtained obtained result, result, when when n_estimators n_estimators and and learning_rate learning_rate are are 64 and 64 and 0.365,13 0.365, of re- 23 spectively,respectively, the the model model has has the the best best performance performance on on the the test test set set with with a ann R R-square-square of 0.9309 and the accuracy is shown in Figure 9 9..

(a) (b)

Figure 9. Prediction accuracy of XGBoost:XGBoost: (a) training set and (b) test set.set.

In addition,addition, duedue to to the the white white box box property property of XGBoost of XGBoost model, model, the base the estimatorbase estimator could couldbe drawn, be drawn, which which enables enables users users to look to intolook the into regression the regression process. process. For example, For example, the first the firstbase base estimator estimator is shown is shown in Figure in Figure 10. 10. Based on the results of all base estimators, the overall feature importance could also be obtained and the result is shown in Figure 1111.. From Figure Figure 11,11, it it is is noted noted that that Age Age (f7) (f7) and and cement cement content content (f0) (f0) have have the thelargest largest in- fluenceinfluence on on the the compressive compressive strength, strength, which which is in is accordance in accordance with with the theexpectations. expectations. On Onthe otherthe other hand, hand, in this in this study, study, fly fly ash ash content content (f2) (f2) has has the the least least influence influence on on the the compressive strength compared to other features, which agrees with the result of Figure 10 where flyfly ash (f2) is not used for the regression. Howeve However,r, the result of XGBoost is influencedinfluenced by many factors (random state, features features,, etc.),etc.), so the obtained feature importance only gives us an indication.

Materials 2021, 14, x FOR PEER REVIEW 14 of 23 Materials 2021, 14, 713 13 of 21

FigureFigure 10. 10.The The 1st 1st base base estimator. estimator.

Materials 2021, 14, x FOR PEER REVIEW 15 of 23

Materials 2021, 14, x FOR PEER REVIEW 15 of 23 Materials 2021, 14, 713 14 of 21

Figure 11. Feature importance of XGBoost model with original features. FigureFigure 11. 11. Feature importance of XGBoost model with original features. 3.2.4. ArtificialFeature Neural importance Network of XGBoost (ANN) model with original features. 3.2.4.3.2.4.Last, Artificial Artificial ANN Neuralis Neural adopted Network Network to predict (ANN) (ANN) the compressive strength. ANN is implemented us- ing KerasLast,Last, [39] ANN ANN with is is Tensorflow adoptedadopted toto predictbackend.predict the The compressive batch size andstrength. strength. the number ANN ANN is of isimplemented epochs implemented are set us- tousinging 100 Keras Kerasand 1000, [39] [39 ]with re withspectively. Tensorflow Tensorflow ReLu backend. backend. function The The is batchemployed batch size size and as and thethe the activationnumber number of offunction; epochs epochs are the are set Adamsettoto 100 100optimizer and and 1000, 1000, is reused respectively.spectively. to improve ReLu ReLu the function weights is during employedemployed the backpropagation asas thethe activation activation function;process function;. the the AdamAdamSimilar optimizer optimizer to XGBoost, is is used used tomany to improve improve hyperparameters the the weights weights during could during be the the tuned backpropagation backpropagation for ANN. In process. thisprocess work,. hyperparametersSimilarSimilar to to XGBoost, XGBoost,related t manyo many neural hyperparameters hyperparameters network architecture could could are be be tuned tunedtuned forfirst. for ANN. ANN. Considering In In this this work, thatwork, thehyperparametershyperparameters size of dataset relatedis related small to, tao neural 2 neural-layer network neuralnetwork network architecture architecture is built are are and tuned tuned the first. numbersfirst. Considering Considering of neurons that that inthethe each size size layer of of dataset datasetare tuned. is is small, small The a,R a 2-layer- squares2-layer neural neuralof model network network in training is is built built set and and and the the test numbers numbers set with of ofdifferent neurons neurons neuroninin each each nu layer layermbers are are are tuned. tuned. shown The The in R-squares RFigure-squares 12. of of model model in in training training set set and and test test set set with with different different neuronneuron numbers numbers are are shown shown in in Figure Figure 12 12..

(a) (b)

Figure 12. R-square of( aANN) with different number of neurons in each layer: (a) training(b set) and (b) test set. Figure 12. R-square of ANN with different number of neurons in each layer: (a) training set and (b) test set. Figure 12. R-square of ANN with different number of neurons in each layer: (a) training set and (b) test set. FromFrom the the obtained obtained result, result, it it can can be be concluded concluded that that when when the the neuron neuron numbers numbers of of layer layer 11 and and 2 2From are are both both the obtained512, 512, the the model modelresult, has hasit can the the be best best concluded performance performance that when on on the the the test test neuron set set with with numbers a ann R R-square-square of layer ofof1 0.9324. 0.9324.and 2 areAfter After both determining determining 512, the model the the number number has the of ofbest the the performance neurons neurons in in each eachon the layer, layer, test learning learningset with rate ratean R is is-square also also roughlyroughlyof 0.9324. tuned tuned After (selected (selected determining values: values: the 0.0001, 0.0001, number 0.0003, 0.0003, of the 0.001, 0.001, neurons 0.003, 0.003, in 0.01, 0.01, each 0.03, 0.03, layer, 0.1, 0.1, learning 0.3, 0.3, 1, 1, 3) 3) rate a andnd is the the also resultresultroughly is is shown shown tuned in in (selected Figure Figure 13.13 values:. 0.0001, 0.0003, 0.001, 0.003, 0.01, 0.03, 0.1, 0.3, 1, 3) and the resultFrom is shown Figure in13 Figure, it is noted 13. that when the learning rate is 0.003, the model has the best performance on the test set with an R-square of 0.9331, which is higher than the default learning rate. The accuracy of ANN with the tuned hyperparameters is shown in Figure 14.

Materials 2021, 14, x FOR PEER REVIEW 16 of 23

Materials 2021, 14, 713 15 of 21 Materials 2021, 14, x FOR PEER REVIEW 16 of 23

Figure 13. R-square of ANN with different learning rate.

From Figure 13, it is noted that when the learning rate is 0.003, the model has the best performance on the test set with an R-square of 0.9331, which is higher than the default learning rate. The accuracy of ANN with the tuned hyperparameters is shown in Figure 14. Figure 13. R-square of ANN with different learning rate. Figure 13. R-square of ANN withdifferent learning rate. From Figure 13, it is noted that when the learning rate is 0.003, the model has the best performance on the test set with an R-square of 0.9331, which is higher than the default learning rate. The accuracy of ANN with the tuned hyperparameters is shown in Figure 14.

(a) (b)

FigureFigure 14. Prediction14. Prediction accuracy accuracy of of ANN ANN with with different different neurons neurons in in each each layer: layer: ((aa)) trainingtraining set and and ( (bb)) test test set set.

3.3.3.3. Prediction Prediction Process Process with with Manually Manually SelectedSelected FeaturesFeatures and PCA PCA-Reduced-Reduced Features Features InIn Machine Machine Learning, Learning, some some problemsproblems maymay involve many many features features for for each each training training (instance.a) instance. The The large large number of of features features not not only only makes makes training(b training) extremely extremely slow, slow,but it also but it Figure 14. Predictionalso accuracymakes makes harder of harderANN to with find to different find a good a good neuronssolution. solution. in Dimensionalityeach layer Dimensionality: (a) training reduction set reduction and is ( ba) goodtest is set away good to tackle way to tacklethis thisproblem. problem. In this In paper, this paper, although although the number the number of features of features is not islarge not (i.e. large, 8), (i.e., the 8),per- the performance3.3.formance Prediction of of ProcessML ML models models with Manually with with different different Selected number numberFeatures of and of features features PCA-Reduced isis investigated. investigated. Features On On the the one one hand,hand,In the Machinethe influence influence Learning, of of reduced reduced some dimensionality dimensionalityproblems may on involveon the the accuracy accuracy many features could could be befor compared compared each training with with the modelinstance.the model with The thewith large original the number original features. of features.features On the notOn other onlythe othermakes hand, hand, thetraining effectiveness the extremelyeffectiveness of slow, PCA of butPCA in it selecting inalso se- themakeslecting features harder the and features to itsfind influence and a good its influence onsolution. the four on Dimensionality the ML four models ML models arereduction also are studied. alsois a goodstudied. way to tackle this Basedproblem.Based on on theIn the this result result paper, of of PCA althoughPCA (see (see SectiontheSection number 3.1.13.1.1), ),of when features keeping keeping is not the thelarge first first (i.e. six six, 8),components components the per- offormanceof PCA-selected PCA- selectedof ML features,models features, with the the different cumulative cumulative number explained explained of features variance is investigated. is is 0.9979, 0.9979, indicating indicatingOn the one that that thosehand,those features the features influence could could of well wellreduced represent represent dimensionality thethe originaloriginal on data the accuracy without without couldlosing losing be much much compared information. information. with Therefore,theTherefore, model six with six PCA-selected PCAthe original-selectedfeatures features. features are Onare used theused other as as the the hand, input input the to todo effectiveness do the the prediction. prediction. of PCA The The in relation rela-se- tion between PCA-selected features and original features is obtained using SVD and betweenlecting the PCA-selected features and features its influence and originalon the four features ML models is obtained are also using studied. SVD and shown in shown in Equation (23). EquationBased (23). on the result of PCA (see Section 3.1.1), when keeping the first six components of PCA-selected features, the cumulative explained variance is 0.9979, indicating that T  thosecement features could well 0.906 represent− 0.033the original−0.155 data without 0.008 losing−0.151 much 0.307 information.  T component1  BlastFurnaceSlagTherefore, six PCA-selected −0.263 features−0.786 are used− 0.073as the input 0.199 to do− the0.107 prediction. 0.453 The rela-      component2   tion FlyAsh between PCA-selected −0.239 features 0.303 and original 0.052 features−0.687 is obt−0.178ained using 0.512 SVD and        componnet 3   shownWater in Equation (23). 0.006 −0.076 0.041 −0.076 0.098 −0.482    =     (23)  component4   Superplasticizer   −0.001 0.005 −0.024 −0.021 −0.023 0.104         componnet 5   CoaseAggregate   −0.009 0.275 0.761 0.480 −0.076 0.271      component6  FineAggregate   −0.210 0.451 −0.611 0.485 0.133 0.257  Age −0.098 −0.070 0.119 −0.127 0.949 0.234

Materials 2021, 14, 713 16 of 21

In addition, six manually selected features are also used as input to compare with the other two scenarios. According to the previous studies [49], water to binder (W/B, Binder = cement+ fly ash+ blast furnace slag), fly ash to binder (FA/B), Blast Furnace slag to binder (BFS/B), superplasticizer to binder (SB), and sand ratio (SR) contribute to the compressive strength. Therefore, W/B, FA/B, BFS/B, SB, SR, and Age are chosen as the input to predict the compressive strength. The prediction process with six PCA-selected features and six manually selected features is exactly the same as Section 3.2, so here only the results are shown. The results of 4 ML models with PCA-selected features and manually selected features are shown in Tables4 and5, respectively.

Table 4. Prediction results with 6 PCA-selected features.

R-Square MSE ML Model Hyperparameters Trainset Testset Trainset Testset LR 0.8803 0.8496 32.3600 44.9011 Polynomial Degree = 3 C = 550 SVR 0.9563 0.9134 11.8244 25.8550 γ = 0.23 n_estimators = 190 XGBoost 0.9916 0.8787 2.3397 33.8782 learning_rate = 0.07 #neuron = 128 (layer1) ANN 0.9602 0.9160 13.2096 26.4843 #neuron = 128 (layer2) learning_rate = 0.0003

Table 5. Prediction results with 6 manually selected features.

R-Square MSE ML Model Hyperparameters Trainset Testset Trainset Testset LR 0.8803 0.8496 32.3600 44.9011 Polynomial Degree = 4 C = 2000 SVR 0.9563 0.9134 11.8244 25.8550 γ = 0.27 n_estimators = 140 XGBoost 0.9916 0.8787 2.3397 33.8782 learning_rate = 0.23 #neuron = 512 (layer1) ANN 0.9602 0.9160 13.2096 26.4843 #neuron = 512 (layer2) learning_rate = 0.1

4. Prediction Process with different ML Models 4.1. Performance on Training Set and Test Set After obtaining the prediction results from 4 ML models with three different features, a comprehensive comparison is made. First, the R-square and MSE of the training set and test set are investigated. The results are shown in Figures 15 and 16. From Figure 15, it is noted that the R-square of LR model on test set in all scenarios is less than 0.9, which is poorer than the other three ML models. For training set, except for the LR model, the R-squares with original features are the highest for each ML model. The reason why R-square of LR model with selected features is higher is that the polynomial degree of this model is 4, which is larger than the model with original features (i.e., 3). Among the ML models, XGBoost has the most admirable performance with R-square of over 0.99. The results are in good agreement with the trend of MSE in Figure 16a since a higher R-square corresponds to a smaller MSE. Materials 2021, 14, 713 17 of 21

Figure 15. R-square of different ML models with different features: (a) training set and (b) test set.

Figure 16. MSE of different ML models with different features: (a) training set and (b) test set.

As for test set, when using different features as inputs, the best performance occurs in different models (Figure 15b). Particularly, for original features, the model with highest R-square is ANN model (R-square = 0.9331); for PCA-selected features, the model with highest R-square is ANN model (R-square = 0.9160); for manually selected features, the model with highest R-square is XGBoost (R-square = 0.9339) and it is the best performance of all models. For the SVR model, the prediction accuracy of the model with manually selected features (R-square = 0.9080) or PCA-selected features (R-square = 0.9134) is better than the model with original features (R-square = 0.9003). In other words, dimensionality reduction has a positive influence on the prediction accuracy of SVR model. Besides, it is worth mentioning that the R-square of XGBoost model with PCA-selected features in test set is only 0.8787, which is significantly lower than the other two ML models (0.9085 for ANN; 0.9134 for SVR), while still being higher than the LR model (R-square = 0.8496). A possible reason for this is that XGBoost model is a decision tree-based ML model. The prediction process of XGBoost is a white box and the features have a great influence on the overall performance of the model. From Equation (23), it is noted that the PCA-selected features do not address the influence of water to compressive strength as the weights for water are very low. Particularly, the weights of water from component 1–6 are 0.006, −0.076, 0.041, −0.076, 0.098, and −0.482, respectively. Clearly, this does not make sense because water is known to have great effect on compressive strength. Therefore, the prediction accuracy of XGBoost model with PCA-selected features is not admirable. In addition, according to feature analysis from Figure 11, the influence of fly ash is the least important, while in PCA-selected features, the weights of fly ash are relatively high (the weights of fly ash from component 1–6 are −0.239, 0.303, 0.052, −0.687, −0.178, and 0.512, respectively). In other words, the “important” features selected by PCA are not so important for the XGBoost Model. Materials 2021, 14, x FOR PEER REVIEW 19 of 23

component 1–6 are 0.006, −0.076, 0.041, −0.076, 0.098, and −0.482, respectively. Clearly, this does not make sense because water is known to have great effect on compressive strength. Therefore, the prediction accuracy of XGBoost model with PCA-selected features is not admirable. In addition, according to feature analysis from Figure 11, the influence of fly ash is the least important, while in PCA-selected features, the weights of fly ash are rela- tively high (the weights of fly ash from component 1–6 are −0.239, 0.303, 0.052, −0.687, Materials 2021, 14, 713 −0.178, and 0.512, respectively). In other words, the “important” features selected by18 PCA of 21 are not so important for the XGBoost Model. On the other hand, it is inferred that distinguishable features are more likely to con- tributeOn to the a better other regression hand, it is results. inferred In that order distinguishable to verify the above features inference, are more the likely feature to importancecontribute to of a XGBoost better regression model with results. PCA In-selected order to features verify theand above manually inference, selected the features feature isimportance drawn and of shown XGBoost in Figure model with17. PCA-selected features and manually selected features is drawn and shown in Figure 17.

(a) (b)

Figure 17. FeatureFeature importance importance of ofXGBoost XGBoost model model with with 6 features 6 features:: (a) manually (a) manually selected selected features features and (b) andPCA (-bselected) PCA- selectedfeatures.features.

From Figure 1177,, it is obvious that the PCA PCA-selected-selected features are not as distinguishable as the manually selected ones because the F scores of PCA PCA-selected-selected features are relatively concentrated. Therefore, Therefore, it it is inferred that, although the six PCA-selectedPCA-selected features retainretain much of thethe originaloriginal information,information, those those features features seem seem not not to to be be as as representative representative as theas the six sixmanually manually selected selected ones. ones. As a As consequence, a consequence, the performance the performance of XGBoost of XGBoost with PCA-selected with PCA- selectedfeatures isfeatures not as goodis not as as the good one as with the manually-selectedone with manually features.-selected However, features. theHoweve predictionr, the predictionaccuracy may accuracy be further may improved be further by tuning improved other by hyperparameters tuning other hyperparameters for XGBoost, which for XGBoost,should be which studied should in the be future. studied in the future.

4.2. Training Speed Except for the performance of ML models in terms of prediction accuracy, another important issue is t thehe training speed. In practice, if the computing speed of a ML model is fast, more time can be devoteddevoted toto hyperparameterhyperparameter tuning to improveimprove thethe performanceperformance of the the ML ML model. model. Generally, Generally, the the computing computing speed speed is related is related to the to the algorithm algorithm itself itself and and the numberthe number of features. of features. Considering Considering that the that running the running time of time the same of the ML same model ML may model largely may largely vary in different time, the average running time, which is calculated as the average Materials 2021, 14, x FOR PEER REVIEWvary in different time, the average running time, which is calculated as the average20 run- of 23 ningrunning time time of the of theML MLmodel model,, ran ran10 times. 10 times. The Therunning running time time of four of four ML MLmodels models with with dif- ferentdifferent features features is shown is shown in Figure in Figure 18. 18 .

Figure 18. Running time of trainset under different ML model.model.

Based on the results from Figure 18, it is noted that the running time of ANN model is the longest while that of LR model is the shortest. However, the running time of ANN model with PCA-selected features (t = 12.78s) is much shorter than the model with original features (t = 44.28s). Considering that the prediction accuracy gap between ANN models with original features and PCA-selected features is not too large (0.017), it can be con- cluded that dimensionality reduction has an obviously positive influence on running time without losing much prediction accuracy for ANN model. In addition, it is noted that the running time of XGBoost model with PCA-selected features is even longer than XGBoost model with original model or manually selected features. Therefore, in this study, dimensionality reduction by PCA has an adverse effect both on the performance and the running time of XGBoost model.

5. Conclusions In this work, the prediction of concrete compressive strength based on given features is carried out with four representative ML models. In addition, the performances of those ML models with different features are compared. Meanwhile, the training speed of the four ML models is also investigated. Based on the presented results, the following conclu- sions can be drawn: 1. Among the four ML models, linear regression has the poorest performance with an R-square of less than 0.90, while the other 3 ML models have an R-square of over 0.90. Therefore, it is possible to make an accurate prediction of the compressive strength using some ML models such as Support Vector Regression (SVR), Extreme Gradient Boosting (XGBoost), and Artificial Neural Network (ANN). 2. The highest R-square of test set of ML model with original features, PCA-selected features and manually selected features are 0.9331 (ANN), 0.9160 (ANN), and 0.9339 (XGBoost) respectively. Therefore, the performance of XGBoost model with manu- ally selected features is the model with the best performance of all models. 3. The prediction accuracy of SVR model with manually selected features (R-square = 0.9080) or PCA-selected features (R-square = 0.9134) is better than the model with original features (R-square = 0.9003) without dramatic running time change, indicat- ing that dimensionality reduction has an admirable influence on SVR model. 4. Compared with the XGBoost model with original features and manually selected fea- tures, the model with PCA-selected features has a relatively poorer performance (R- square = 0.8787). The possible reason for this is inferred that the PCA-selected fea- tures are not as distinguishable as the manually selected features in this study.

Materials 2021, 14, 713 19 of 21

Based on the results from Figure 18, it is noted that the running time of ANN model is the longest while that of LR model is the shortest. However, the running time of ANN model with PCA-selected features (t = 12.78s) is much shorter than the model with original features (t = 44.28s). Considering that the prediction accuracy gap between ANN models with original features and PCA-selected features is not too large (0.017), it can be concluded that dimensionality reduction has an obviously positive influence on running time without losing much prediction accuracy for ANN model. In addition, it is noted that the running time of XGBoost model with PCA-selected features is even longer than XGBoost model with original model or manually selected features. Therefore, in this study, dimensionality reduction by PCA has an adverse effect both on the performance and the running time of XGBoost model.

5. Conclusions In this work, the prediction of concrete compressive strength based on given features is carried out with four representative ML models. In addition, the performances of those ML models with different features are compared. Meanwhile, the training speed of the four ML models is also investigated. Based on the presented results, the following conclusions can be drawn: 1. Among the four ML models, linear regression has the poorest performance with an R-square of less than 0.90, while the other 3 ML models have an R-square of over 0.90. Therefore, it is possible to make an accurate prediction of the compressive strength using some ML models such as Support Vector Regression (SVR), Extreme Gradient Boosting (XGBoost), and Artificial Neural Network (ANN). 2. The highest R-square of test set of ML model with original features, PCA-selected features and manually selected features are 0.9331 (ANN), 0.9160 (ANN), and 0.9339 (XGBoost) respectively. Therefore, the performance of XGBoost model with manually selected features is the model with the best performance of all models. 3. The prediction accuracy of SVR model with manually selected features (R-square = 0.9080) or PCA-selected features (R-square = 0.9134) is better than the model with original features (R-square = 0.9003) without dramatic running time change, indicating that dimensionality reduction has an admirable influence on SVR model. 4. Compared with the XGBoost model with original features and manually selected features, the model with PCA-selected features has a relatively poorer performance (R-square = 0.8787). The possible reason for this is inferred that the PCA-selected features are not as distinguishable as the manually selected features in this study. 5. The running time of XGBoost model with PCA-selected features or manually selected features is longer than XGBoost model with original features. In this work, dimen- sionality reduction by PCA seems to have an adverse effect both on the performance and the running time for XGBoost model. 6. Although the running time of ANN model is much longer than the other three models (less than 1s) in 3 scenarios, dimensionality reduction has an obviously positive influence on running time without losing much prediction accuracy for ANN model.

Author Contributions: The contributions of the authors are as follows: Conceptualization, B.Š. and Z.W.; methodology, B.Š.; investigation and analysis, Z.W.; writing—original draft, Z.W.; writing— review and editing, B.Š. and Y.X.; supervision, B.Š.; project administration, B.Š.; funding acquisition, Z.W. and Y.X. All authors have read and agreed to the published version of the manuscript. Funding: Zhi Wan and Yading Xu would like to acknowledge the financial support of the China Scholarship Council (CSC) under the grant agreement No.201906220205 and No. 201708110187. Institutional Review Board Statement: Not applicable. Informed Consent Statement: Not applicable. Data Availability Statement: Data sharing is not applicable to this article. Materials 2021, 14, 713 20 of 21

Acknowledgments: The authors are thankful to Ze Chang. Conflicts of Interest: The authors declare no conflict of interest. The funders had no role in the design of the study; in the collection, analyses, or interpretation of data; in the writing of the manuscript; or in the decision to publish the results.

References 1. British Standards Institution. Eurocode 2: Design of Concrete Structures: Part 1-1: General Rules and Rules for Buildings; British Standards Institution: London, UK, 2015. 2. CMC. Code for Design of Concrete Structures (GB50010-2010); China Ministry of Construction: Beijing, China, 2010. 3. Pereira, P.; Evangelista, L.M.F.D.R.; De Brito, J.M.C.L. The effect of superplasticizers on the mechanical performance of concrete made with fine recycled concrete aggregates. Cem. Concr. Compos. 2012, 34, 1044–1052. [CrossRef] 4. Poon, C.S.; Shui, Z.; Lam, L.; Fok, H.; Kou, S. Influence of moisture states of natural and recycled aggregates on the slump and compressive strength of concrete. Cem. Concr. Res. 2004, 34, 31–36. [CrossRef] 5. Kaplan, M.F. The effects of age and water/cement ratio upon the relation between ultrasonic pulse velocity and compressive strength of concrete. Mag. Concr. Res. 1959, 11, 85–92. [CrossRef] 6. Oner, A.; Akyuz, S.; Yildiz, R. An experimental study on strength development of concrete containing fly ash and optimum usage of fly ash in concrete. Cem. Concr. Res. 2005, 35, 1165–1171. [CrossRef] 7. Juenger, M.C.; Siddique, R. Recent advances in understanding the role of supplementary cementitious materials in concrete. Cem. Concr. Res. 2015, 78, 71–80. [CrossRef] 8. Snellings, R.; Mertens, G.; Elsen, J. Supplementary cementitious materials. Rev. Mineral. Geochem. 2012, 74, 211–278. [CrossRef] 9. Chung, K.L.; Ghannam, M.; Zhang, C. Effect of Specimen Shapes on Compressive Strength of Engineered Cementitious Composites (ECCs) with Different Values of Water-to-Binder Ratio and PVA Fiber. Arab. J. Sci. Eng. 2017, 43, 1825–1837. [CrossRef] 10. Park, J.J.; Kang, S.T.; Koh, K.T.; Kim, S.W. Influence of the ingredients on the compressive strength of UHPC as a fundamental study to optimize the mixing pro-portion. In Proceedings of the Second International Symposium on Ultra High Performance Concrete, Kassel, Germany, 5–7 March 2008. 11. Tziviloglou, E.; Wiktor, V.; Jonkers, H.; Schlangen, E. Bacteria-based self-healing concrete to increase liquid tightness of cracks. Constr. Build. Mater. 2016, 122, 118–125. [CrossRef] 12. Kim, J.J.; Fan, T.; Taha, M.R. Homogenization Model Examining the Effect of Nanosilica on Concrete Strength and Stiffness. Transp. Res. Rec. J. Transp. Res. Board 2010, 2141, 28–35. [CrossRef] 13. Pichler, B.L.; Hellmich, C. Upscaling quasi-brittle strength of cement paste and mortar: A multi-scale engineering mechanics model. Cem. Concr. Res. 2011, 41, 467–476. [CrossRef] 14. Zhang, H.; Xu, Y.; Gan, Y.; Chang, Z.; Schlangen, E.; Šavija, B. Microstructure informed micromechanical modelling of hydrated cement paste: Techniques and challenges. Constr. Build. Mater. 2020, 251, 118983. [CrossRef] 15. Sherzer, G.L.; Schlangen, E.; Ye, G.; Gal, A. Evaluating compressive mechanical LDPM parameters based on an upscaled multiscale approach. Constr. Build. Mater. 2020, 251, 118912. [CrossRef] 16. Ni, H.-G.; Wang, J.-Z. Prediction of compressive strength of concrete by neural networks. Cem. Concr. Res. 2000, 30, 1245–1250. [CrossRef] 17. Azimi-Pour, M.; Eskandari-Naddaf, H.; Pakzad, A. Linear and non-linear SVM prediction for fresh properties and compressive strength of high volume fly ash self-compacting concrete. Constr. Build. Mater. 2020, 230, 117021. [CrossRef] 18. Ouyang, B.; Li, Y.; Song, Y.; Wu, F.; Yu, H.; Wang, Y.; Bauchy, M.; Sant, G. Learning from Sparse Datasets: Predicting Concrete’s Strength by Machine Learning. arXiv 2020, arXiv:2004.14407. 19. Yeh, I.-C. Modeling of strength of high-performance concrete using artificial neural networks. Cem. Concr. Res. 1998, 28, 1797–1808. [CrossRef] 20. Yeh, I.-C. Modeling Concrete Strength with Augment-Neuron Networks. J. Mater. Civ. Eng. 1998, 10, 263–268. [CrossRef] 21. Kotsiantis, S.B.; Kanellopoulos, D.; Pintelas, P.E. Data preprocessing for supervised leaning. Int. J. Comput. Sci. 2006, 1, 111–117. 22. Van Der Maaten, L.; Postma, E.; Van den Herik, J. Dimensionality reduction: A comparative. J. Mach. Learn. Res. 2009, 10, 13. 23. Khademi, F.; Jamal, S.M.; Deshpande, N.; Londhe, S. Predicting strength of recycled aggregate concrete using Artificial Neural Network, Adaptive Neuro-Fuzzy Inference System and Multiple Linear Regression. Int. J. Sustain. Built Environ. 2016, 5, 355–369. [CrossRef] 24. Abd, A.M.; Abd, S.M. Modelling the strength of lightweight foamed concrete using support vector machine (SVM). Case Stud. Constr. Mater. 2017, 6, 8–15. [CrossRef] 25. Lu, X.; Zhou, W.; Ding, X.; Shi, X.; Luan, B.; Li, M. Ensemble Learning Regression for Estimating Unconfined Compressive Strength of Cemented Paste Backfill. IEEE Access 2019, 7, 72125–72133. [CrossRef] 26. Suykens, J.A.K.; Vandewalle, J. Least Squares Support Vector Machine Classifiers. Neural Process. Lett. 1999, 9, 293–300. [CrossRef] 27. Lange, R.; Männer, R. Quantifying a Critical Training Set Size for Generalization and Overfitting using Teacher Neural Networks. In Proceedings of the International Conference on Artificial Neural Networks, Sorrento, Italy, 26–29 May 1994; Springer Nature: Berlin, Germany, 1994; pp. 497–500. Materials 2021, 14, 713 21 of 21

28. Nguyen-Sy, T.; Wakim, J.; To, Q.-D.; Vu, M.-N.; Nguyen, T.-D.; Nguyen, T.-T. Predicting the compressive strength of concrete from its compositions and age using the extreme gradient boosting method. Constr. Build. Mater. 2020, 260, 119757. [CrossRef] 29. Weisberg, S. Applied Linear Regression; John Wiley & Sons: Hoboken, NJ, USA, 2005; Volume 528. [CrossRef] 30. Khademi, F.; Akbari, M.; Jamal, S.M.; Nikoo, M. Multiple linear regression, artificial neural network, and fuzzy logic prediction of 28 days compressive strength of concrete. Front. Struct. Civ. Eng. 2017, 11, 90–99. [CrossRef] 31. Cook, R.; Lapeyre, J.; Ma, H.; Kumar, A. Prediction of Compressive Strength of Concrete: Critical Comparison of Performance of a Hybrid Machine Learning Model with Standalone Models. J. Mater. Civ. Eng. 2019, 31, 04019255. [CrossRef] 32. Géron, A. Hands-on Machine Learning with Scikit-Learn, Keras, and TensorFlow: Concepts, Tools, and Techniques to Build Intelligent Systems; O’Reilly Media: Sebastopol, CA, USA, 2019. 33. Pedregosa, F.; Varoquaux, G.; Gramfort, A.; Michel, V.; Thirion, B.; Grisel, O.; Duchesnay, E. Scikit-learn: Machine learning in Python. J. Mach. Learn. Res. 2011, 12, 2825–2830. 34. Chen, T.; Guestrin, C. Xgboost: A scalable tree boosting system. In Proceedings of the 22nd ACM SIGKDD International Conference on Knowledge Discovery and Data Mining, San Francisco, CA, USA, 13–17 August 2016. [CrossRef] 35. Friedman, J.H. Greedy function approximation: A gradient boosting machine. Ann. Stat. 2001, 29, 1189–1232. [CrossRef] 36. Hastie, T.; Tibshirani, R.; Friedman, J. The Elements of Statistical Learning: Data Mining, Inference, and Prediction; Springer Science & Business Media: Berlin/Heidelberg, Germany, 2009. 37. Breiman, L.; Ihaka, R. Nonlinear Discriminant Analysis via Scaling and ACE; Department of Statistics, University of California: Davis One Shields Avenue Davis, CA, USA, 1984. 38. Verhaegh, W.; Aarts, E.; Korst, J. Algorithms in Ambient Intelligence; Springer Science & Business Media: Berlin/Heidelberg, Germany, 2004; Volume 2. [CrossRef] 39. Alnaggar, M.; Bhanot, N. A machine learning approach for the identification of the Lattice Discrete Particle Model parameters. Eng. Fract. Mech. 2018, 197, 160–175. [CrossRef] 40. Ben Chaabene, W.; Flah, M.; Nehdi, M.L. Machine learning prediction of mechanical properties of concrete: Critical review. Constr. Build. Mater. 2020, 260, 119889. [CrossRef] 41. Peng, H.; Long, F.; Ding, C. Feature selection based on mutual information criteria of max-dependency, max-relevance, and min-redundancy. IEEE Trans. Pattern Anal. Mach. Intell. 2005, 27, 1226–1238. [CrossRef][PubMed] 42. Harris, C.R.; Millman, K.J.; Van Der Walt, S.J.; Gommers, R.; Virtanen, P.; Cournapeau, D.; Wieser, E.; Taylor, J.; Berg, S.; Smith, N.J.; et al. Array programming with NumPy. Nature 2020, 585, 357–362. [CrossRef][PubMed] 43. Yang, C.; Kim, Y.; Ryu, S.; Gu, G.X. Prediction of composite microstructure stress-strain curves using convolutional neural networks. Mater. Des. 2020, 189, 108509. [CrossRef] 44. Zheng, A.; Casari, A. Feature Engineering for Machine Learning: Principles and Techniques for Data Scientists; O’Reilly Media, Inc.: Sebastopol, CA, USA, 2018. 45. Ketkar, N.; Santana, E. Deep Learning with Python; Springer: Berlin, Germany, 2017; Volume 1. [CrossRef] 46. Amari, S.; Wu, S. Improving support vector machine classifiers by modifying kernel functions. Neural Netw. 1999, 12, 783–789. [CrossRef] 47. Liu, Z.; Zuo, M.J.; Zhao, X.; Xu, H. An Analytical Approach to Fast Parameter Selection of Gaussian RBF Kernel for Support Vector Machine. J. Inf. Sci. Eng. 2015, 31, 691–710. 48. Chen, T.; He, T.; Benesty, M.; Khotilovich, V. Package ‘xgboost’. In R version; The R Foundation: Vienna, Austria, 2019; Volume 90. 49. Oner, A.; Akyuz, S. An experimental study on optimum usage of GGBS for the compressive strength of concrete. Cem. Concr. Compos. 2007, 29, 505–514. [CrossRef]