1 Introduction

Supplementary cementitious material (SCM) can be used in cement mortar and concrete to substitute some of the cement and produce low-cost building materials [1]. Replacing cement with a binder agent in mortar and concrete is essential, since some of those replacing materials positively impact the mechanical properties of concrete or mortar and reduce the negative effect of cement production on the surrounding environment [2]. Cement manufacturing plants use many natural resources, require more energy, and emit a large carbon dioxide (CO2) content into the atmosphere [3,4,5].

Metakaolin (MK) is one of the mineral admixtures, which is a high pozzolanic reactive material; silicon oxide (SiO2) and aluminum oxide (Al2O3) are mainly included in its chemical composition. The reaction of SiO2 and Al2O3 with calcium hydroxide (Ca(OH)2) produces calcium silicate hydrate (C–S–H) [6,7,8] and improves the mechanical properties of the produced compound. MK has small particle sizes when used to replace portland cement (PC). During mortar production, the voids and gaps inside the cement mortar are reduced; hence density is increased, further improving strength [9,10,11]. Considering vast quantities of concrete predicted to be manufactured in the following years to achieve our infrastructure needs, different concrete production options with PC alternatives must be investigated. These alternatives are typically used to replace PC and aggregates in part or whole inside mortar or concrete [12].

Typically, MK is produced by calcinating kaolin clay at a temperature of 600–800 °C [13]. The kaolinite clay structure collapses when the water is driven off during the calcination process, resulting in an amorphous aluminum silicate. The following equation shows the process: \(A{l}_{2}{O}_{3}\cdot 2Si{O}_{2}\cdot 2{H}_{2}O\to A{l}_{2}{O}_{3}\cdot 2Si{O}_{2}+\uparrow 2{H}_{2}O\). Numerous research projects have focused on the thermal conversion of kaolinite. It was discovered that heating temperature, heating time and rate, cooling rate, and environmental conditions are the primary factors that greatly affect the dehydroxylation process [14, 15].

Badogiannis et al. [16] investigated the optimization of kaolin calcination to utilize the metakaolin produced as a supplemental cementitious material. A high purity commercialized kaolin and inferior Greek kaolin (Milos island) were tested. Different temperatures and periods were used to heat the samples. DTA-TG and XRD study of raw and thermally treated kaolin samples, pozzolanic activity assessment of metakaolin, and finally strength improvement analysis of cement–metakaolin combinations were used to investigate the optimization of the calcination conditions. This method demonstrated that calcination of kaolin with minimal alunite concentration for 3 h results in highly reactive metakaolin. However, for kaolin with a significant alunite content, a 3-h heat treatment at 850 °C is required to remove unwanted SO3. Pure kaolin has been proven to be effective in developing highly reactive metakaolin. Vu et al. [17] studied the effect of calcined kaolin (metakaolin) on the fresh properties, mechanical behavior, and durability of cement mortar; they tested nearly 150 samples; the ratio of metakaolin to cement ranged between 0 and 0.3 in 0.05 increment, water to binder ratio from 40 to 53% by weight of the binder, and superplasticizer as 0, 0.5, and 1.4% of the total binder. The result revealed that the setting time affected when cement was replaced by metakaolin was more than 20%; below that point, the effect was insignificant. Also, the influence of metakaolin on the strength of the later ages (7–28 days) was more significant than early age strength.

Moreover, increasing the replacement ratio resulted in higher strength for mature mortars. The samples with metakaolin modification cured at MgSO4 solution showed improved performance in the solution environment. Courard et al. [18] also tested the durability of cement mortar with metakaolin. They concluded the same result for durability enhancement and revealed that the optimum replacement of cement by metakaolin was between 10 and 15%. Parande et al. [19] observed an increase in MK-modified cement mortar compressive strength up to 15% (MK/binder by weight). Beyond that, a decrease in strength was noted. Sumasree and Sajja [20] mixed fiber with metakaolin in cement mortar, and the mechanical properties improved when cera-fiber was 0.75 and 25% of cement replaced with metakaolin. Increasing cera-fiber to 0.8% decreased the replacement ratio to 20%. Batis et al. [21] studied the effect of replacing cement and sand with metakaolin on the corrosion resistance of the mortar, compressive strength, and mass loss. They reached the optimum replacement of 10% for cement and 20% for sand (by weight).

As highlighted in the literature, machine learning models are successfully utilized in engineering and material science [22]. Multiple regressions, M5P-tree, and neural networks (ANN) are all recently created technologies that can be used to model material characteristics [23,24,25,26]. M5P-tree model, ANN, and nonlinear multiple regression were used by Mohammed et al. [17] to forecast the compressive strength of modified cement-based mortar with fly ash. The evaluation of the developed models showed that those models could be utilized well to predict the CS with high R2 and RMSE. Armaghani and Asteris [22] utilized ANN and adaptive neuro-fuzzy inference (ANFIS) to predict the compressive strength of cement mortar. The result showed good performance of both the models in the testing phase. However, overfitting was observed for the ANFIS model, but validated with the experimental result. Another soft computing technique forecaster is the multiexpression programming (MEP) model that was utilized and resulted in good performance after training with optimizable parameters [27,28,29].

In this study, different soft computing techniques and machine learning models such as Multivariate Adaptive Regression Spline (MARS), Multi-expression Programming (MEP), Nonlinear (NLR), and Artificial Neural Network (ANN) models were used to predict the compressive strength of cement mortar modified with metakaolin. The effect of metakaolin content and maximum fine aggregate diameter on the compressive strength was also investigated. Finally, the proposed model was characterized using assessment tools such as R2, RMSE, and SI.

This study objectives can be summarized as follows: (a) data collection and analysis of the mixture proportions of metakaolin-modified cement mortar, (b) finding the effect of the mixture ingredients on the compressive strength of the mortar, (c) using different nonlinear modeling techniques to predict the compressive strength of cement mortar modified by MK at different curing ages, (d) predicting the effect of the maximum size of fine aggregate on the CS of cement-based mortar, and (e) choosing the best model based on statistical assessment tools.

2 Methodology and materials

Figure 1 summarizes the methodology of the present study. The elements of the entire procedure can be seen on the graph from data collection to the last step of the model construction. Finally, the most influential parameter affecting the CS was found using sensitivity analysis.

Fig. 1
figure 1

Methodology flowchart of the current study

2.1 Data collection

A database for cement mortar was created. A total of 230 datasets were collected from previous research to propose analytical models to predict the compressive strength of cement mortar modified with metakaolin. The collected data are summarized in Table 1. The input variables are water to binder ratio (w/b), sand to binder ratio (s/b), metakaolin content (MK, %), maximum diameter of fine aggregate (MDA, mm), superplasticizer content (SP, %), and curing ages (t, days). At the same time, the target value is the compressive strength (CS, MPa).

Table 1 Details of the database for the collected data from literature related to modification of cement mortar with metakaolin

2.1.1 Sample sizes

The collected data consist of two different sample sizes (S1 = 40 × 40 mm and S2 = 50 × 50 mm), as shown in Fig. 2. All the data are used together to train the models. Then, based on statistical assessment tools, the performance of the developed models to predict the compressive strength of varied sizes is measured, and the best model is selected.

Fig. 2
figure 2

Summary of the sample sizes in the training and testing datasets

2.2 Statistical analysis

In this section, the collected data are presented to see the model inputs’ relationship and variation and provide adequate evidence of a good correlation between independent and dependent variables. If there is a strong relationship between one predictor and the target, the modeling techniques are not required, and a simple correlation equation can solve the problem. For determination of the distribution and variation in the input variables, different statistical parameters are used, such as mean, standard deviation (SD), variance (Var), kurtosis (Kur), and skewness. Standard deviation and variance show the dispersion of numbers from their mean. Kurtosis and skewness indicate the tail of the distribution: the positive value of skewness indicates the right tail, and the negative value is for the left tail; kurtosis specifies the longer or shorter distribution tail, with positive for longer and negative value for shorter tail. The details of the summary of statistical analysis on the input and target are shown in Table 1. The input variation with target value is shown in Fig. 3. The histogram for CS is provided in Fig. 4 with the kernel distribution function and a boxplot to show the compressive strength range of the mortar modified with metakaolin from 1 to 90 days of curing.

Fig. 3
figure 3figure 3figure 3

Marginal plot with histogram for relationship between compressive strength and a w/b, b s/b, c MK, d MDA e SP, and f t

Fig. 4
figure 4

Histogram for compressive strength of metakaolin-modified cement mortar from 1 to 90 days of curing

2.3 Modeling

From the correlation matrix (Fig. 5), a strong correlation between model parameters and the target value is not observed. Therefore, different modeling approaches are used to construct predictive models to forecast the compressive effect of cement mortar modified by metakaolin. The collected data are randomly divided between training and testing sets (70/30), 70% of the data for training the models, and the remaining 30% for testing model prediction on the data that is not used in training. In the next subsections, details about the used modeling tools are provided.

Fig. 5
figure 5

Correlation matrix for the target and input variables

2.3.1 Multiadaptive regression splines model (MARS)

Friedman introduced the MARS model [17] as a nonlinear and nonparametric regression approach. It is implemented using a set of splines (piecewise polynomials) with variable gradients to describe nonlinear interactions between a system of input and output. This system does not require a persistent assumption regarding the significant underlying correlation between input and output variables. The nodes are the segment end point; a node defines the end point of one data region and the start of another data area. The resulting splines (known as base functions) give the model more flexibility in curvatures, thresholds, and other linear function deviations. A two-step procedure is used to implement MARS models. The initial step is to build up functions and find probabilistic nodes for performance improvement, resulting in a model with precise curve fitting. The second is the removal of real minimal terms. If y is the function of multiple independent variables (x), then the following is the response function:

$$y=f\left(x1,\cdots , xn\right)+e,$$
(1)

where e is the error value, and n is the number of input variables. Basis function (BF) is employed in the MARS modeling algorithm to function approximation, which refers to the splines; BF includes piecewise-linear and piecewise-cubic functions.

In this study piecewise-linear function is used, and the following is the explanation of the function:

$$BF=\mathrm{max}\left(0, x-t\right)\left\{\begin{array}{c}x-t\\ 0\end{array}\right. \begin{array}{c}\mathrm{if }x\ge t\\ \mathrm{otherwise}\end{array}.$$
(2)

The MARS model linearly combines the BFs, which can be expressed as follows:

$$f\left(x\right)= {\beta }_{0}+\sum_{k=1}^{N}{\beta }_{k}{\gamma }_{k}\left(x\right),$$
(3)

where N is the total number of observations, β are the coefficients, and γk (x) is the function that includes one or more spline functions.

2.3.2 Multiexpression programming model (MEP)

The genetic algorithm (GA) is a state-of-the-art intelligent algorithm based on evolutionary concepts [30]. The gene was expressed with decimals or binary numbers in the early theory of GA, which caused it to fail in various complex areas. Ferreira [31] proposed a novel genetic method, genetic expression programming (GEP), in which the gene was encoded as a binary tree that could be translated to a mathematical equation. This breakthrough increased the chromosome’s ability to express itself and might be utilized to anticipate time series [32]. Due to its success, the GEP has been extended to multiexpression programming (MEP) [34, 34]. Individuals in the MEP contained more than one gene, allowing them to express not only one, but numerous mathematical expressions. This addition makes the GEP more adaptable and efficient. The model requires several fitting parameters, which can be found by the trial and error me27thod [].

2.3.3 Nonlinear model (NLR)

Equation 4 is the general formula for a nonlinear model that can be used to predict the properties of a material. The equation shows a nonlinear relationship between the target (dependent variable) and predictors (independent variables). The model was trained using the least square method by minimizing the squared error between the measured and predicted target values.

$$\mathrm{CS}=a{\left(\frac{b}{s}\right)}^{b}{\left(\mathrm{SP}+0.0001\right)}^{c}{\left(\frac{w}{b}\right)}^{d}{\left(\mathrm{MK}+0.0001\right)}^{e}{\left(\mathrm{MDA}\right)}^{f}{\left(t\right)}^{g}+h{\left(\frac{b}{s}\right)}^{i}{\left(\frac{w}{b}\right)}^{j}{\left(\mathrm{MDA}\right)}^{j}{\left(t\right)}^{k},$$
(4)

where a, b, c, …, j, and k are model parameters. CS, w/b, s/b, MK, MDA, SP, and t are compressive strength (MPa), water to binder ratio, sand to binder ratio, metakaolin content (%), maximum diameter of fine aggregate (mm), superplasticizer content (%), and curing ages (days), respectively.

2.3.4 Artificial neural network model (ANN)

The artificial neural network (ANN) is a computing system that resembles the human brain and its information analysis. In addition, this model is a machine learning system employed in construction engineering for various numerical forecasts and difficulties. ANN consists of three layers: input, hidden, and output layers; these layers are connected through biases and weights. The behavior of an ANN network is influenced by the connections of neurons pattern, which also determines the class of the network. It is possible to train a network to enhance network performance. In more technical terms, the topology of the network and connection weights change repeatedly such that the error at each output layer node is minimized [32]. This study designed a multilayer feedforward network with mortar composition (w/b, s/b, MK, MDA, SP, and t) as input and CS as output. A log sigmoid activation function is used in the hidden layers and a pure linear activation function at the output layer.

The following equation is the mean-squared error function which measures the error at the output node:

$$\mathrm{Error}=\frac{1}{N}\sum_{i=1}^{N}{\left({Y}_{p}-{Y}_{m}\right)}^{2},$$
(5)

where Yp, Ym, and N are the output value of the model, actual measured value, and total observation in the training datasets, respectively.

Several parameters affect the final model result, such as the training algorithm, number of hidden layers and neurons, and transfer function [22]. The ANN structure can be found using the trial and error method to tune the required parameters. In back-propagation (BP), the procedure includes two stages: forward and backward phases. While training, the signals move toward the output node, and each node’s errors (biases) and weights are calculated. Then in the backward stage, the bias, inputs, and layer weights are corrected. In other words, back-propagation aims to minimize the cost function through fine-tuning the network’s weights and biases. [35]. Equation 6 can be considered as a general formula for the calculation of an ANN output with only one node:

$$\mathrm{CS}=\frac{Nd1}{1+{e}^{-\beta }}+\mathrm{threshold},$$
(6)
$$\beta =\mathrm{ bias}+\sum_{i=1}^{p}{(x}_{i}\times {w}_{i}),$$
(7)

where Nd1 is the weight value for the output from Node 1, and the threshold is the error of the output layer. Bias, p, x, and w are the error of the hidden layer, number of predictors (independent variables), predictor value, and the corresponding weight for the specific predictor from the input layer, as shown in Fig. 6.

Fig. 6
figure 6

Typical ANN calculation

2.4 Evaluation criteria for the developed models’ comparison

The developed models are characterized and compared based on the different assessment tools such as R2, RMSE, MAE, and Taylor diagram. The formulas for calculation of those mentioned parameters are shown in the following equations:

$${R}^{2}={\left(\frac{ \sum_{i=1}^{n}\left({\mathrm{CSP}}_{i}-\overline{{\mathrm{CSP} }_{i}}\right)\left({\mathrm{CSM}}_{i}-\overline{{\mathrm{CSM} }_{i}}\right)}{\sqrt{\left(\sum_{i=1}^{n}{\left({\mathrm{CSP}}_{i}-\overline{{\mathrm{CSP} }_{i}}\right)}^{2}\right)\left(\sum_{i=1}^{n}{\left({\mathrm{CSM}}_{i}-\overline{{\mathrm{CSM} }_{i}}\right)}^{2}\right)} }\right),}^{2}$$
(8)
$$\mathrm{RMSE}=\sqrt{\frac{\sum_{i=1}^{n}{({\mathrm{CSP}}_{i}-{\mathrm{CSM}}_{i})}^{2}}{n},}$$
(9)
$$\mathrm{MAE}=\frac{\sum_{i=1}^{n}|{\mathrm{CSP}}_{i}-{\mathrm{CSM}}_{i}|}{n},$$
(10)
$$\mathrm{SI}=\frac{\mathrm{RMSE}}{\overline{\mathrm{CSM}} },$$
(11)

where \(\mathrm{CSP}, \overline{\mathrm{CSP} },\mathrm{ CSM},\overline{\mathrm{ CSM },}\) and n are predicted compressive strength, mean of predicted compressive strength, measured compressive strength, measured compressive strength, and several instances in the related dataset. The optimal value for all the above evaluation tools is zero; except for R2, the best value is 1. The model performance is considered excellent if SI < 0.1, good if 0.1 < SI < 0.2, fair if 0.2 < SI < 0.3, and poor performance if SI > 0.3 [36].

3 Results and output analysis

3.1 Variation of measured and predicted compressive strength

3.1.1 MARS model

The relationship between the actual measured CS and the output of the MARS model is shown in Fig. 7. The model is performed well for both training and testing datasets with high R2 and low RMSE values of 0.99 and 2.08 MPa, and 0.97 and 2.5 MPa for training and testing, respectively. The figure shows the error limit of  ±10%, indicating that 90% of the data lie in the predicted CS/measured CS range from 0.9 to 1.1. The details of the MARS model training parameters are provided in Table 2. Equation 8 is the formula of the MARS model that can be used for prediction purpose, and the basis functions (BFs) given in Eq. 12 can be gathered from Table 3.

Fig. 7
figure 7

Relationship between measured and predicted CS for the MARS model

Table 2 The detail of the MARS model
Table 3 Related equation of basis functions for the MARS model (Eq. 12)
$$\mathrm{CS}= 107.07+22.96\times BF1-17.106\times BF2+3119\times BF3+1.8392\times BF4-8.7645\times BF5-6.827\times BF6-52.763\times BF7-32.022\times BF8+117.15\times BF9+5.3005\times BF10-6.548\times BF11-106.47\times BF12-0.8706\times BF13-1.0018\times BF14-1.9598\times BF15+0.1049\times BF16+21.584\times BF17+0.0774\times BF18+0.0086\times BF19-0.1304\times BF20-5.2154\times BF21+2.5257\times BF22.$$
(12)

No. of training data = 161, R2 = 0.99, RMSE = 2.08 MPa.

3.1.2 MEP model

Table 4 provides the required training parameters used in the MEP development process. Figure 8 shows the variation of measured CS with forecasted CS from the MEP model and an error limit of  ±20%. The R2 and RMSE for training and testing are 0.96 and 3.71 MPa, 0.94 and 3.72 MPa, respectively. The MEP model’s formula to predict CS is shown in Eq. (13).

Table 4 Parameters for MEP model training
Fig. 8
figure 8

Relationship between measured and predicted CS for the MEP model

$$\mathrm{CS}={\gamma }_{1}+{\gamma }_{2}+{\gamma }_{3}-{\gamma }_{4}+{\gamma }_{2}+{\gamma }_{5}+\frac{{\gamma }_{6}}{{\gamma }_{7}},$$
(13a)
$${\gamma }_{1}=\frac{a\times \left(2{b}^{2}+b\right)}{\frac{2{b}^{2}}{2{b}^{2}+b}+\frac{2{b}^{2}-b}{d\times f}},$$
(13b)
$${\gamma }_{2}=\frac{2{d}^{2}}{f\times c-\left(\frac{2{b}^{2}}{2{b}^{2}+b}+\frac{2{b}^{2}-b}{d\times f}+\left(2{b}^{2}+b\right)\times e\right)-\left(\frac{\left(2{b}^{2}+b\right)\times e}{\frac{2{b}^{2}-b}{d\times f}}\right)},$$
(13c)
$${\gamma }_{3}=\frac{\left(\frac{\left(2{b}^{2}+b\right)\times e+4{b}^{2}+2b}{{b}^{2}+e}+2d\right)\times \left(\frac{\left(2{b}^{2}+b\right)\times e+4{b}^{2}+2b}{{b}^{2}+e}\right)+2{b}^{2}-b}{f},$$
(13d)
$${\gamma }_{3}=\frac{\left(\frac{\left(2{b}^{2}+b\right)\times e+4{b}^{2}+2b}{{b}^{2}+e}+2d\right)\times \left(\frac{\left(2{b}^{2}+b\right)\times e+4{b}^{2}+2b}{{b}^{2}+e}\right)+2{b}^{2}-b}{f},$$
(13e)
$${\gamma }_{5}= \left(2d\right)*\left(\frac{f}{2{b}^{2}+b}\right)-\left(\frac{2{b}^{2}+b}{d}\right),$$
(13f)
$${\gamma }_{6}=\frac{d-e+4b+2}{{b}^{2}+e}-\left(\frac{\left(2d\right)\times \left(\frac{f}{2{b}^{2}+b}\right)+\frac{2{b}^{2}-b}{d\times f}+2d}{\frac{\left(2{b}^{2}+b\right)\times e+4{b}^{2}+2b}{{b}^{2}+e}}\right),$$
(13g)
$${\gamma }_{7}= \frac{\left(2{b}^{2}+b\right)\times e+4{b}^{2}+2b-\left(\left(2d\right)\times \left(\frac{f}{2{b}^{2}+b}\right)+\frac{2{b}^{2}-b}{d\times f}\right)-{\gamma }_{2}}{f},$$
(13h)

No. of training data = 161, R2 = 0.96, RMSE = 3.71 MPa, where a, b, c, …, and f are water to binder ratio (w/b), sand to binder ratio (s/b), metakaolin content (MK, %), the maximum diameter of fine aggregate (MDA, mm), superplasticizer content (SP, %), and curing ages (t, days).

3.1.3 NLR model

Equation 14 is the final form of the NLR model. The relationship between measured and predicted compressive strength is shown in Fig. 9; the figure contained a ±20% error limit, and overestimation was observed; therefore, it shows less performance of this model than MARS and MEP models, since lower R2 and higher RMSE are obtained for the NLR model. The R2 and RMSE are 0.93 and 5.1 MPa, and 0.89 and 5 MPa for the training and testing phases. From the model parameters, s/b affects the CS more than other input factors, and MDA positively affects the CS of the mortar.

Fig. 9
figure 9

Relationship between measured and predicted CS for the NLR model

$$\mathrm{CS}=2.44\times {10}^{-6}{\left(\mathrm{w}/\mathrm{b}\right)}^{-0.059}{\left(\mathrm{s}/\mathrm{b}\right)}^{19.731}{\left(\mathrm{MK}+0.0001\right)}^{0.069}{\left(\mathrm{MDA}\right)}^{0.228}{\left(\mathrm{SP}+0.0001\right)}^{0.702}{\left(t\right)}^{0.273}+129.131{\left(\mathrm{w}/\mathrm{b}\right)}^{-0.008}{\left(\mathrm{s}/\mathrm{b}\right)}^{-2.156}{\left(\mathrm{MDA}\right)}^{0.561}{\left(t\right)}^{0.171}$$
(14.)

No. of training data = 161, R2 = 0.93, RMSE = 5.1 MPa.

3.1.4 ANN model

The ANN model is trained with two hidden layers and eight neurons, as shown in Fig. 10. The logistic sigmoid activation function is used for hidden layers, and the pure linear activation function is used for the output layer with the Levenberg–Marquardt optimization algorithm. The final gradient and Mu are 0.1096 and 1 × 10–4 after training at epoch 1000. The result for bias and weights for input, hidden layer, and output layer is provided in the followings matrices:

$$\left| {\begin{array}{*{20}c} {1.039} & { - 2.251} & {1.609} & { - 1.164} & { - 1.652} & {1.379} & { - 0.486} \\ {0.785} & { - 0.242 \, } & {0.109} & {0.366} & {0.547} & { - 11.200} & { - 16.421} \\ { - 1.314} & { - 2.908} & { - 0.057} & { - 0.810} & { - 3.594} & { - 0.388} & {0.278} \\ { - 0.584} & { - 1.239} & { - 0.653} & { - 0.546} & {1.374} & {0.444} & {1.724} \\ {0.940} & {2.002} & {1.209} & {0.259} & { - 0.022} & { - 0.670} & { - 0.242} \\ { - 0.472} & {2.110} & { - 1.289} & { - 1.577} & {1.399} & { - 1.071} & { - 1.652} \\ \end{array} } \right| \times \left| {\begin{array}{*{20}c} {\text{w/b}} \\ {\text{s/b}} \\ {{\text{MK}}} \\ {{\text{MDA}}} \\ {{\text{SP}}} \\ t \\ \end{array} } \right| = \left| {\begin{array}{*{20}c} {\beta 1} \\ {\beta 2} \\ {\beta 3} \\ {\beta 4} \\ {\beta 5} \\ {\beta 6} \\ \end{array} } \right|$$
$$\left| {\begin{array}{*{20}c} {{\text{node}}1} & {{\text{node}}2} & {{\text{node}}3} & {{\text{node}}4} & {{\text{node}}5} & {{\text{node}}6} & { - 17.4054} \\ {{\text{node}}1} & {{\text{node}}2} & {{\text{node}}3} & {{\text{node}}4} & {{\text{node}}5} & {{\text{node}}7} & {17.03031} \\ \end{array} } \right| \times \left| {\begin{array}{*{20}c} { - 0.53039} \\ {77.52494} \\ {6.039275} \\ {12.23056} \\ {12.40411} \\ { - 2.89773} \\ 1 \\ \end{array} } \right| = \left| {\begin{array}{*{20}c} {\beta 7} \\ {\beta 8} \\ \end{array} } \right|.$$
Fig. 10
figure 10

Selected ANN structure

$$\mathrm{CS}=\frac{-36.701}{1+{e}^{-\upbeta 7}} -\frac{36.78}{1+{e}^{-\upbeta 8}} +36.193,$$
(15)
$$\mathrm{node} 1=\frac{1}{1+{e}^{-\beta 1}}, \mathrm{ node} 2=\frac{1}{1+{e}^{-\beta 2}}, \cdots \mathrm{node} 6= \frac{1}{1+{e}^{-\beta 6}}.$$
(16)

No. of training data = 161, R2 = 0.997, RMSE = 1.05 MPa.

The relationship between measured and predicted CS is shown in Fig. 11; the figure has an error limit of ±12%, while R2 and RMSE are 0.997 and 1.05 MPa, and 0.966 and 2.74 MPa for training and testing, respectively.

Fig. 11
figure 11

Relationship between the measured and predicted CS for the ANN model

3.2 Evaluating the performance of proposed models

Figure 12 compares the developed models based on SI; as displayed in the figure, ANN model performance based on SI is better than that of other models in the training phase. However, the MARS model is better than MEP, NLR, and ANN models in the testing phase. The comparison between the proposed models based on R2, RMSE, MAE, and Taylor diagram is shown in Figs. 13 and 14. The R2 for the MARS model for both training and testing is greater than 0.95, while for the MEP model, the R2 is greater than 0.95 for training and smaller than 0.94; the R2 of the ANN model also indicates the best performance in the training stage, and lesser performance of the NLR model is observed in comparison to other models. Correspondingly, based on RMSE, the best is the MARS model at the testing phase. According to all the criteria, the best model is the ANN model in the training phase and the MARS model in the testing phase. Moreover, the MEP model is better than the NLR model.

Fig. 12
figure 12

Performance evaluation of the developed models based on scatter index

Fig. 13
figure 13

Comparison between the proposed models based on a R2, b RMSE, and c MAE

Fig. 14
figure 14

Evaluation of the proposed models using Taylor diagram based on standard deviation and correlation coefficient between the measured and predicted compressive strength

The Taylor diagram for comparing the proposed models based on a standard deviation of the predicted compressive strength and measured compressive strength and correlation coefficient (R) is shown in Fig. 14. Taylor diagram shows the variation of predicted and measured compressive strength. The result of the Taylor diagram revealed that according to standard deviation, MARS and MEP models’ predicted standard deviations are close to experimental standard deviation. However, R and standard deviation show the excellent performance of the MARS and ANN models.

3.3 The efficacy of the proposed model in predicting different strength ranges

The training and testing datasets are divided into strength ranges from 1 to 105 by 15 MPa increment; for compressive strength of different curing ages (i.e., 1–90 days), the very low strengths are referred to as the early age compressive strength. The performance of the developed models is measured based on RMSE and R, as summarized in Tables 5 and 6. In the training stage, the ANN model predicts the compressive strength for all the strength ranges better than MARS, MEP, and NLR models, whereas the MEP model prediction for strength range of 1–15 MPa in the testing phase is better than that of another developed model. The strength ranges of 30–45 MPa and 45–60 MPa ANN model is better than those of the other proposed models. The MARS model forecasted the compressive in 15–30, 60–75, and 75–90 MPa better than other models.

Table 5 RMSE values for comparison between developed models in predicting different strength ranges
Table 6 Correlation coefficient (R) values for comparison between the developed models in predicting different strength ranges

3.4 Performance of the developed models to predict different sample size’s compressive strength

As summarized in Table 7, the training dataset is divided based on the tested sample size; after training the models on the training datasets, the performance of the developed models is measured for different sample sizes. As can be seen in Fig. 2, it was not applicable to test the developed models to predict the compressive strength of a sample size of S2 (50 × 50 mm) in the testing dataset, since only one data was available for testing. Therefore, only the training dataset is considered. Based on the prediction of the developed models, the ANN model predicts the compressive strength for samples S1 and S2 better than other developed models in the training dataset.

Table 7 The performance of the developed models to predict different sample sizes’ compressive strength based on the correlation coefficient (R) and RMSE

3.5 The effect of MK and MDA on the CS

Parametric analysis was done to determine the effect of MK on the mortar. First, a database with a fixed mixture composition was created, and the MK changed from 0 to 30% while other compositions remained unchanged, and the mixture composition was decided based on the standard EN196-1 [37]. All the models are used to forecast the CS. Based on the results, the ANN model predicted the CS comprising the ranges and optimum content for MK as mentioned in the literature; the optimum MK is up to 10% and covers all the curing ages and improves the compressive strength of the mortar, as shown in Fig. 15.

Fig. 15
figure 15

Effect of metakaolin content on the CS of mortar (w/b = 0.5, s/b = 3, MDA = 2)

Additionally, the effect of MDA on the CS is analyzed similarly to that of MK. MDA was changed, whereas the other mixture composition was fixed based on the highest replication of those parameters in the literature and the EN196-1. The result revealed that the compressive strength of the mortar increased with increase in the maximum diameter of the fine aggregate, as displayed in Fig. 16. It is worth mentioning that studies are conducted on the effect of maximum aggregate size (MAS) on the compressive strength of concrete, while increasing MAS increases the compressive strength of normal strength concrete (Fig. 17). Conversely, the compressive strength of high-strength concrete decreased with MAS [38]. This result should be validated with experimental work using different sand with varied MAS.

Fig. 16
figure 16

Effect of the maximum diameter of fine aggregate on the CS of mortar at a 7 and b 28 days of curing and different metakaolin content

Fig. 17
figure 17

Contribution percentage of the input parameters in the prediction of compressive strength

From the figure, it is clear for a larger diameter of the fine aggregate from the prediction of the developed models that a higher replacement ratio could be utilized; for smaller particles of fine aggregate, the replacement ratio of cement by MK is reduced, and the result of ANN model is used to illustrate the effect of the maximum diameter of the aggregate, since it has a good performance in predicting the MK effect on the compressive strength of the mortar and determining the optimum content of metakaolin.

4 Sensitivity analysis

To determine the effect of each model input variable on the final prediction of the CS and find the most valuable parameter which cannot be eliminated while predicting the CS of the mortar and has a great influence on the forecast of the CS, several databases with removed input parameters were created. After that, the model is trained on the combination of the remaining input parameters. After training, the final error of the model is recorded. A removed parameter from the trial with high error is the most influential predictor. According to the result of the analysis, curing time is the most important factor in predicting CS, than the maximum diameter of fine aggregate.

5 Conclusions

It is important to use artificial intelligence modeling tools, since they are time saving and cost-effective. In this study, the experimental results of the previous research were collected, analyzed, and used to construct a predictive model to forecast the compressive strength of metakaolin-modified cement mortar. Referring to the collected data and result of the modeling, the following can be concluded:

  1. 1.

    Metakaolin additive produced through calcination of kaolin clay at 600–850 °C can be used as supplementary cementitious material and improve the mechanical properties of the cement mortar.

  2. 2.

    According to the literature’s collected data, cement replacement with metakaolin is from 0 to 30% by weight of cementitious material, and the water to binder ratio ranges between 0.36 and 0.6.

  3. 3.

    The modeling result indicates that the mortar’s compressive strength increased with increasing metakaolin content up to 10% and covered all the curing ages, improving the compressive strength of the mortar. This result is confirmed by previous literature.

  4. 4.

    According to statistical assessment tools (i.e., R2, RMSE, MAE, and SI), the MARS model is better than MEP, NLR, and ANN models, since it has low RMSE, MAE, and high R2 in the testing phase.

  5. 5.

    Based on the Taylor diagram, the standard deviation of the predicted compressive values from the MEP model is near the standard deviation of the actual compressive strength.

  6. 6.

    The ANN model outperformed other developed models in predicting the optimum metakaolin content.

  7. 7.

    According to the modeling result, the maximum diameter of the sand positively affected the compressive strength of the cement mortar modified with metakaolin, and the replacement ratio for larger size of sand was higher.

  8. 8.

    Based on sensitivity analysis, curing time is more influential than other model input factors on the compressive strength of mortar. The maximum diameter of fine aggregate is the second most important.