Applicability of connectionist methods to predict dynamic viscosity of silver/water nanofluid by using ANN-MLP, MARS and MPR algorithms

Applicability of connectionist methods to predict dynamic viscosity of silver/water nanofluid by using ANN-MLP, ABSTRACT Dynamic viscosity considerably affects the heat transfer and flow of fluids. Due to improved thermo- physical properties of fluids containing nanostructures, these types of fluids are widely employed in thermal mediums. The nanofluid’s dynamic viscosity relies on different variables including size of solid phase, concentration and temperature. In the present study, three algorithms including multivariable polynomial regression (MPR), artificial neural network–multilayer perceptron (ANN-MLP) and multivariate adaptive regression splines (MARS) are applied to model the dynamic viscosity of silver (Ag)/water nanofluid. Recently published experimental investigations are employed for data extraction. The input variables considered in the modeling process to be the most important ones arethesizeofparticles,fluidtemperatureandtheconcentrationofAgnanoparticlesinthebasefluid.The R 2 values for the studied models are 0.9998, 0.9997 and 0.9996 for the ANN-MLP, MARS and MPR algorithms, respectively. In addition, based on importance analysis, the temperature is highly effec- tive and the dominant parameter for the dynamic viscosity of the nanofluid in comparison with size and concentration.

The dynamic viscosity of nanofluids significantly affects their fluid flow and heat transfer Mohseni-Gharyehsafa et al., 2018;. Given this fact, it is critical to get better awareness of the parameters affecting this property. According to the literature review, an increase in temperature results in lower dynamic viscosity, which facilitates fluid motion due to the reduction in friction. Another effective factor in dynamic viscosity is the concentration of nanostructures dispersed in the base fluid (Chiam, Azmi, Usri, Mamat, & Adam, 2017;Soltani & Akbari, 2016). On the basis of the results of experimental studies, an increase in concentration leads to an improvement of dynamic viscosity (Asadi & Asadi, 2016). The size of nanostructures plays a key role in thermophysical properties of nanofluids.
Artificial neural networks are widely employed for modeling the system and pattern recognition. Artificial neural networks are applicable in modeling the thermophysical properties of nanofluids (Ahmadi, Tatar, Nazari, Mahian, & Ghasempour, 2018;Chau, 2017;Kazemi et al., 2018;Rezaei, Sadeghzadeh, Alhuyi Nazari, Ahmadi, & Astaraei, 2018).  employed the least square support vector machine (LSSVM) and group method of data handling (GMDH) approaches to model the thermal conductivity value of CuO/EG (Copper-Oxide/Ethylene-Glycol) nanofluid. It was monitored from the outcomes that the R 2 values for GMDH and LSSVM were equal to 0.994 and 0.991, respectively. These values indicated the high accuracy of the models in estimating the nanofluid's thermal conductivity. In another piece of research , LSSVM was employed to predict the thermal conductivity of alumina/EG. The R 2 value for the proposed model was 0.9902. In another investigation, Baghban et al. (2018) used seven intelligent models to seek the relationship between coefficients of the connective heat transfer of silica nanoparticles as a function of three independent parameters including mass fraction, Prandtl number and Reynolds number. Statistical criteria show that the committee machine intelligent system (CMIS) has the highest accuracy with an R 2 of 0.997.
To propose a estimation tool, it is essential to consider the factors influencing the output data . Most studies consider temperature and concentration when modeling thermophyscial properties; adding size as another input variable results in more accurate results. In the current study, the Ag/water nanofluid's dynamic viscosity is modeled by applying MPR, ANN-MLP and MARS algorithms. The input variables in the modeling process are temperature, size and volumetric concentration.

Multilayer perceptron neural network
Artificial neural networks are conventionally applied for prediction purposes. MLP is a feed-forward neural network algorithm. This network is composed of an input layer, hidden layer and output layer (Gardner & Dorling, 1998;Hornik, Stinchcombe, & White, 1989). The number of input and output layers depends on the data. In the hidden layer, one or more layers can exist that have various neurons (Orhan, Hekim, & Ozer, 2011). In these types of neural networks, the initial neuron of the layer is fed into the neuron of layer in the next stage, which is the same for all layers except the first layer. Each neuron has an activation function and a sum function. The inputs are initially multiplied by the weighting factor and added to each other. Afterwards, a bias factor is added to the calculated number. In the next step, the number obtained from the summing function is used in the activation function as input data. Activation functions are categorized in three forms as represented below, where ϕ is the activation function (Ruck, Rogers, Kabrisky, Oxley, & Suter, 1990;Vanzella et al., 2004).
In the above equation, σ > 0 is the width, which shows the interpolating function smoothness. The distance between x and the center is defined by r. Trial and error steps or intelligent approaches may be employed in order to calculate the number of layers. The optimum condition is obtained based on the Mean Square Error (MSE) parameter; therefore, these steps are performed to achieve the ideal status of bias and weight. In order to prevent either undertraining or overtraining results, an accurate number of steps must be considered (Goda, Shokir, Eissa, Fattah, & Sayyouh, 2003).

Multivariate adaptive regression splines
MARS is applied in regression and data classification (Friedman & Roosen, 1995). This approach is mainly utilized to predict the dependent data, Y (n×1), which are continuous, based on the group of input data (n×p). This model is represented as follows: In the above equation, f indicates the weighted sum of basic functions. These functions are dependent on X. In addition, e stands for the error, which is an (n×1) matrix. In this method, no priori assumption is required for estimating the relationship between dependent and independent data. The relationship between these data is found on the basis of a group of coefficients and piecewise polynomials. The model is generated using this algorithm based on fitting basic functions to independent variables' distinct intervals. Typically, the polynomials that are called "splines" consist of pieces connecting to each other. The connecting points of the splines are known as "nodes," "knots" or "breakdown points." The points are shown by t. In a q-degree spline, each section is a polynomial function. The function utilized by the MARS algorithm is described as: In the above equation, q ( ≥ 0) is the power at which the splines are boosted up. The smoothness of the obtained function depends on the value of q. In the case of q = 1, as in the present study, just simple linear splines are applied. In Figure 1, a pair of splines for the node t = 3.5 is shown.
By considering y which has M bias functions, the model proposed by MARS can be written (Chou, Lee, Shao, & Chen, 2004;De Cos Juez, Lasheras, García Nieto, & Suárez, 2009;Friedman & Roosen, 1995;Nieto & Antón, 2014;Nieto, Fernández, Lasheras, de Cos Juez, & Muñiz, 2012;Nieto, Lasheras, de Cos Juez, & Fernández, 2011;Orhan et al., 2011;Xu et al., 2004)  indicates the parameter predicted by MARS, c 0 is a fixed value, the mth bias function is referred to as B m (x) and c m refers to the mth basic function's coefficient. It is crucial to optimize the variables (c 0 and c m ) announced into the knot positions and the model. For a dataset of X which has n objects and p input variables, N = n×p pairs of spline basic functions exist which can be calculated using Equations (3) and (4). In order to generate the final model, a two-step process must be followed. In the first stage, a two-at-a-time forward stepwise process is performed to choose the basic functions (Chou et al., 2004;De Cos Juez et al., 2009;Friedman & Roosen, 1995;Nieto & Antón, 2014;Nieto et al., 2012;Nieto et al., 2011;Orhan et al., 2011;Xu et al., 2004). Using this procedure for selection leads to a model with inappropriate ability to predict new data due to the complexity and overfitting of the model. In order to enhance this ability, the redundant basic functions may be removed by applying a backward stepwise procedure. In order to select the usable functions, GCV is utilized (Chou et al., 2004;De Cos Juez et al., 2009;Friedman & Roosen, 1995;Nieto & Antón, 2014;Nieto et al., 2012Nieto et al., , 2011Orhan et al., 2011;Xu et al., 2004). In this approach, the GCV is defined as the average squared residual error divided by a penalty based on the complexity of the model. The GCV is calculated as follows: C(M) refers to complexity penalty, which depends on the number of basic functions and can be obtained (Chou et al., 2004;De Cos Juez et al., 2009;Friedman & Roosen, 1995;Nieto & Antón, 2014;Nieto et al., 2012Nieto et al., , 2011Orhan et al., 2011;Xu et al., 2004) as: M refers to the number of functions used as basic in Equation (5); d indicates a penalty for the basic functions utilized in the proposed model. Increase in the value of d causes fewer required basic functions and smoother estimation. When the MARS model is generated, the importance of the utilized variables for modeling can be assessed. Taking into account the literatures several criteria can be applied which in this study, the GCV parameter is used for this purpose to achieve reliable results (Chou et al., 2004;De Cos Juez et al., 2009;Friedman & Roosen, 1995;Nieto & Antón, 2014;Nieto et al., 2012Nieto et al., , 2011Orhan et al., 2011;Xu et al., 2004).

Multivariable polynomial regression
In this study, experimental results from previous publications are used to model the range of the input variables and represented in Table 1. The data used for the modeling step are taken from experiments that were published recently (Alade, Oyehan, Popoola, Olatunji, & Bagudu, 2018;Esfe, Saedodin, Biglari, & Rostamian, 2016;Nikkam & Toprak, 2018). The temperature of the fluid and the concentration ratio of the Ag/water nanofluid are those major elements which considerably affect the value of dynamic viscosity as illustrated in Figure 2.
By using 2D multivariate polynomial regression and applying the least square method (Royston & Sauerbrei, 2008;Sinha, 2013), a simple equation is obtained for the experimental data that is represented in Alade et al. (2018), Esfe et al. (2016) and Nikkam and Toprak (2018). The proposed model has three inputs including temperature, size of nanoparticles and volumetric concentration. This model is very simple, lacking any exponential or logarithmic term. The complex models obtained by neural networks have some disadvantages such as high computational cost. The coefficients of the model are shown in Table 1. Ranges of input variables (Alade et al., 2018;Esfe et al., 2016;Nikkam & Toprak, 2018)  Equation (8):

Multivariate adaptive regression splines
As mentioned earlier, in the MARS algorithm, the cores of procedure are basic functions; therefore, it is necessary to choose appropriate ones. Unlimited increase in the basic functions causes overfitting. In this study, the sensitivity of the MARS model based on the input basic functions is investigated. According to Jerome H. Friedman (1991), the GCV method is used to obtain the optimal number of functions in which using 10 basic functions leads to the best results ( Figure 3). The coefficients of the proposed model in Equation (8) are reported in Table 2.
The model obtained using 10 basic functions is represented in Equation (9). The coefficients of the proposed model in Equation (9) are reported in Table 2.
In most of the studies in which the MARS method is used for regression modeling, the importance of data is calculated for gaining better insight into the influential parameters. Data whose importance is equal to 0 will be removed.
In order for gaining the relative importance of one parameter, the root square of the GCV of the all basis function without involving the propsed parameter should be obtain and then the value must be scaled to 100. Based on importance data analysis, temperature has the most significant effect compared with temperature and concentration (Figure 4). The concentration of nanofluid has the second rank in the calculation of dynamic viscosity.

MLP-LMA: feed-forward back propagation with Levenberg-Marquardt training Algorithm
In MLP neural networks, hidden layers and their neurons play the key role in regression. Inappropriate model selection and an inadequate number of layers and neurons lead to unfavorable outputs. Therefore, it is necessary analyze the sensitivity of the network to the number of neurons and hidden layers. Since there are three input variables, a hidden layer is appropriate to obtain acceptable training; however, the sensitivity of the network must be considered based on the number of neurons. In the present study, MSE is used as criterion to select  the optimum number of neurons. As shown in Figure 5, using neurons leads to the best model. Neural Network identifier: 75% of data were used for training the network, 15% for validation and 10% for testing the trained network. The activation function for the hidden layer was tanh and an identity function was utilized for the output layer. The best model of the ANN was obtained in epoch 197 on the basis of MSE. In Figures 6  and 7 are represented the calculated dynamic viscosities of the nanofluid based on the concentration and temperature. Figure 6 represents the dynamic viscosity of Ag/water nanofluid in seven concentrations including 0, 0.003, 0.004, 0.006, 0.008, 0.009 and 0.012 in the temperature range of 50-90°C. The average size of nanoparticles in these cases equals 63 nm. As has been shown, an increase in temperature leads to higher dynamic viscosity for each temperature. In addition, it can be concluded that higher temperature causes lower dynamic viscosity for a constant concentration. For instance, increasing the temperature from 50 to 70°C in 0.003 concentration leads to approximately 19.5% reduction in dynamic viscosity.
In Figure 7 is represented the dynamic viscosity of Ag/water nanofluid in 20 and 25°C for particle size equal to 40 nm. The concentrations of the solid phase in these conditions are in the range of 0.00096 and 0.01. As illustrated, an increase in concentration, with constant temperature and particle size, results in improvement in dynamic viscosity; while a temperature increase reduces the dynamic viscosity.

Statistical comparison of the proposed models
Based on the statistical criteria for regression evaluation (Baghban, Kahani, Nazari, Ahmadi, & Yan, 2019;Hajikhodaverdikhan, Nazari, Mohsenizadeh, Shamshirband, & Chau, 2018;Taormina, Chau, & Sivakumar, 2015;Wu & Chau, 2011), the MLP network is the best among the approaches represented in the present study for modeling the dynamic viscosity of Ag/water nanofluid; however, using this algorithm requires more computational cost than does polynomial regression. A summary of the results obtained for each algorithm is presented in Table 3.

Conclusion
In the present study, MLP and MARS algorithms were employed to estimate the dynamic viscosity of Ag/water nanofluid by considering nanoparticles' size and concentration and the temperature of the fluid as input variables. The value of R 2 was used as a statistical benchmark to evaluate the obtained outcomes. According to the calculations, the R 2 values for ANN-MLP, MARS and MPR algorithms were equal to 0.9998, 0.9997 and 0.9996, respectively in which conforming to the all statistical criterias describe in Table 3, the proposed ANN-MLP is better than the two other algorithms. It could be concluded that all the applied algorithms are appropriate for modeling and able to precisely predict the dynamic viscosity of the nanofluid. In addition, the relative importance of the input data was determined to get better insight into the influential factors. Based on the obtained values, the importance of temperature, concentration and size was approximately 100%, 80% and 12%, respectively. These values indicate the high importance of temperature in modeling the dynamic viscosity.

Disclosure statement
No potential conflict of interest was reported by the authors.