## Introduction

Titanium dioxide ($$\hbox {TiO}_2$$) in nano forms (nanoparticles, nanowires, nanorods, nanosheets, nanoflowers) have shown tremendous impact in many industries (especially in textiles) as a multifunctional coating material. Nano $$\hbox {TiO}_2$$ is frequently used to achieve not only photocatalytic self-cleaning, antimicrobial properties, superhydrophilic surfaces and water purification due to its higher surface area, but also in protective textiles against ultraviolet (UV) radiations, noise mitigation and air pollution1,2. $$\hbox {TiO}_2$$ is an intrinsic n type metal oxide semiconductor material that closely resembles with zinc oxide in photocatalytic properties. The prominent features that enables $$\hbox {TiO}_2$$ as a functional material in multiple applications are photocatalytic activity, chemical stability and non-toxicity3. Researchers have synthesized and coated nano $$\hbox {TiO}_2$$ on textile substrates for photocatalytic and other functional properties4,5,6,7. In an experimental study, Noman et al. synthesized $$\hbox {TiO}_2$$ nanoparticles and successfully coated on cotton fabric. The coated fabric was analysed against methylene blue dye and bacteria culture for self cleaning and antimicrobial properties respectively. The coated fabric showed significant results for self-cleaning and antimicrobial properties. The design of experiment was based on central composite design (CCD) and the obtained results were statistically evaluated under regression model through Design Expert (DE) software8. Here, in this current study, an attempt has been made to develop a prediction model by using machine learning tools that can work in two ways i.e., correlates the actual response of coated fabric with process variables, analyse the predicted response of DE and indicate which approach is better as a prediction model in reality. Nowadays, ANN exhibits a strong advantage in capturing any type of existing relationship from given data as it does not include a physical mechanism and a mathematical model. Thanks to the training process, ANN can learn, understand and recognize the information treatment rules, adapt and predict the wanted output variables from database considered as input variables9.

In general, textile processes are mostly non-linear in nature and a lot of efforts are applied to obtain optimal solutions10,11,12. ANN is an excellent approach that has been widely used by different group of researchers for the prediction of various properties of textile materials for different purposes where it has proven its effectiveness and potential. Malik et al. applied a backpropagation ANN to predict the tensile properties of even and uneven yarns extracted from polyester-cotton blend. The selected parameters for this study were twist multiplier, cot hardness and break draft ratio. Simulation results of tensile properties were obtained through ANN and compared with MLR, where ANN outperformed MLR13. In another study, Malik et al. proposed ANN for the prediction the warp and weft yarns crimp in woven barrier fabrics. The use of ANN to predict yarn crimp has shown good results in the predicted output, especially for the warp yarn (with less prediction error between actual and predicted output)14. In another experimental study, Malik et al. used ANN for the prediction of antimicrobial performance of chitosan/AgCl-$$\hbox {TiO}_2$$ coated fabrics. The input variables were curing time and concentration of colloids. Samples were developed with different blends of selected colloid under different curing time. Backpropagation ANN was trained under a hybrid combination of Bayesian regularization and Levenberg Marqaurdt algorithms15. The same group of Malik et al. extended their study and applied ANN to develop a relationship between loom parameters, used material and construction of fabric in terms of porosity, mean pore flow, mean pore size with air permeability. The experimental result showed ANN provided prediction with high accuracy of comfort properties with minimal error16. Almetwally et al. applied ANN and linear regression for the prediction of core spun yarn strength, elongation and rupture. The results showed that ANN propose highly accurate prediction of spinning strength17. Farook et al. used ANN to predict cotton fibre maturity. They selected various fibre characteristics as an input variables and analyzed fibre maturity as an output variable. The simulation results showed that ANN predicted cotton fibre maturity with small error18. In another study, Farooq et al. proposed ANN to predict the change of shade of dyed knitted fabrics that would happen after finishing application. The inputs were the shade percentage, dye color, and finishing concentrations. The outputs were the delta values of the selected samples with respect to standard samples. Tests results showed that ANN provide high prediction accuracy for shade change that occurred during finishing19. Dashti et al. predicted the yarn tenacity using ANN trained by genetic algorithm. The performance of this approach was useful to achieve desired tenacity with minimum production cost. However, it is a time-consuming process20. Furferi et al. introduced ANN for the prediction of coatings process on textile fabrics. Testing results demonstrated the significance of ANN model particularly for coating mechanisms21. Knanat et al. applied ANN for the prediction of thermal resistance of wet knitted fabrics. The results showed efficient prediction of thermal resistance22. Ribeiro et al. proposed an automated machine learning method to predict physical properties of woven fabrics based on finishing features and textile design23. However, the prediction of overall mechanical behavior of textile composites is still a very challenging task due to the complexities of microstructures and boundary conditions24,25. Taieb et al. used ANN for the prediction of fabric drapability under low stress26. They reported that physical factors play crucial role while predicting fabric drapability properties. Kalkanci et al. estimated fabric shrinkage by applying ANN algorithm inside relaxation methods27. Thermofixing, sanforizing, drying and washing are the important processes that are applied on fabrics during finishing applications28. Dimensional changes were predicted at the end of finishing processes by ANN. The experimental results showed that ANN gives better prediction results for dimensional change. Khan et al. investigated mechanical properties of cross-ply laminated fibre-reinforced polymer composites as well as modelled and predicted the mechanical properties using ANN29. The composite samples were developed by altering glass fibre layers with carbon fibre layers and polyphenylene sulphide with high-density polyethylene. The fibers were used as reinforcement materials and polyphenylene sulphide was used as a polymer matrix. Mechanical properties i.e., hardness, flexural modulus, impact and rupture strength were investigated for both directions. Simulation results showed that ANN predicts the mechanical properties with low MAE which computed between actual and predicted values.

The above discussed literature reveal that the most common ANN type used in textile industry is MLP30,31. MLP is a class of backpropagation ANN that has the advantages of self-learning, high nonlinearity resolution and the ability of mapping between input and output variables without introducing a mathematical model between nonlinear data and precisely predict the best function. As well as the authors searched, there is no relevant literature available on the use of ANN in any form to investigate or predict the functional properties of nano $$\hbox {TiO}_2$$ coated textiles. Therefore, an approach has been introduced in this paper that is based on MLP model for the prediction of various properties of nano $$\hbox {TiO}_2$$ coated cotton. The amount of titanium precursor, amount of solvent and process time were selected as input variables whereas the amount of nano $$\hbox {TiO}_2$$ coated on cotton fabric, and some related functional properties i.e., self-cleaning efficiency, antimicrobial efficiency and ultraviolet protection factor (UPF) were considered as outputs variables. The achieved results were compared with MLR and with the experimental values using analysis of variance (ANOVA).

## Materials and methods

### Materials

Bleached cotton fabric with mass (GSM) 110 g m$$^{-2}$$ was used for samples preparation. All other chemicals i.e., titanium tetrachloride, isopropanol and methylene blue dye were taken from sigma aldrich.

### Experimental design

Design of experiment with various amount of titanium tetrachloride and isopropanol under fluctuating sonication time is based on central composite design for all developed samples as shown in Table 1. The optimization of independent variables was performed by Design-Expert 10 software. Total 20 samples were developed during experimental study. The variables used during the study were the amount of titanium precursor (titanium tetrachloride), the amount of solvent (isopropanol) and sonication time. The combination of variables is expressed in Table 1. The experimental results were obtained by using the following quadratic Equation.

\begin{aligned} Y =b_0+\sum b_i X_i + \sum b_{i,j} X_i X_j + \sum b_{i,i} {X_i}^2, \; where \; i\ge j \; and \; i,j=1,2,3. \end{aligned}
(1)

In the above equation, $$b_0$$ represents the coefficient of constant term, $$b_i$$ represents the coefficient of linear term that explains the persuade of the variables, $$b_{i,j}$$ represents the coefficient of two factors interaction and $$b_{i,i}$$ represents the coefficient of quadratic term respectively8.

### Artificial neural network

Artificial intelligence techniques seem to be promising and are still evolving. ANN are machine learning algorithms based on mathematical models that are identical and inspired by biological nerve systems, responsible for the functionality of human brain. It consists of large sets of neurons connected by axons. Artificial neurons are individual neural units that are interconnected with each other to form a network.The crucial point of this technology is the connection between individual neural units that can be reinforcing or inhibiting. This action is exercised through a combination of input values and an activation function, which returns the output of a neuron. A very special feature of ANN is the automatically creation, derivation and exploration of new information using previous learning that is called as training process32.

A multilayer perceptron method is a class of feedforward ANN. Backpropagation (BP) is one of the most common and typical learning algorithm in MLP that deals with non-linear models by reducing the desired target error in a gradient descent pattern though tailoring the weight factors and biases33,34. In this algorithm, training occurs in three steps: (1) Forward propagation step: an experimental data is introduced to MLP as input and its effect is propagated, in stages, through different layers of the network. Then, as a result, the outputs are generated. (2) Computation of the error: the error vector is computed from the difference between predicted and actual outputs. (3) Backward propagation step: The computed error vector is propagated backwards to the MLP and the synaptic weights are adjusted in such a way that the error vector reduces with every iterative step. Furthermore, the MLP model is getting closer and closer to generating the desired output.

Technically, MLP are used to model non-linear problems in order to predict output dependent variables $$y= [y_{1}, \ldots , y_{n}]$$ for given independent input variables $$x= [x_{1}, \ldots , x_{k}]$$ from their training values. The obtained results mainly depend on weights $$w= [w_{1}, \ldots , w_{k}]$$. The following equation represents the relationship between input and output of the network35,36:

\begin{aligned} y =\varphi \left( \sum _{j} w_j *x_j +b \right) , \end{aligned}
(2)

where, y is the output. $$x_j$$ is the jth input. $$w_j$$ is the jth weight and b represents the bias. $$\varphi$$ is the activation function. The biases and weights comprise the information that the neuron recovers during the training phase. A detail theoretical discussion of ANN architecture and training algorithms are presented by different researchers in their studies9,37,38. Theoretically, by increasing number of network layers, ANN generates significantly accurate results. However, increasing number of network layers is a time consuming process and makes the training process difficult to fit. Therefore, we adopted the standard classical structure of MLP that includes three-layers, one input layer; one hidden layer, and one output layer for the prediction of functional properties. Figure 1 displays the schematic structure of the proposed MLP model for this study.

There were training and testing parts in the proposed MLP model and $$75\%$$ of the data from Table 1 was used for the training of the proposed model whereas $$25\%$$ of the data was used for testing purpose respectively. Three physical factors shown in Table 1 were considered as training inputs vectors. Therefore, the number of input nodes for training was 3; the number of nodes for output layer was 4 and the number of nodes for hidden layer was calculated according to the following equation34:

\begin{aligned} N=\sqrt{m+n}+a, \end{aligned}
(3)

where N is the number of hidden layer nodes. m and n represent the number of input and output nodes, respectively. a is a constant with a value range [1, 10]. The best number of hidden layer nodes was determined from this value range.

### Model selection

The performance of the proposed MLP model was evaluated using various statistical indicators i.e., root mean squared error (RMSE), mean absolute error (MAE), Pearson correlation coefficient (r) and coefficient of determination ($$R^{2}$$), defined respectively by the following equations:

\begin{aligned} RMSE= & {} \sqrt{\frac{1}{n}\Sigma _{i=1}^{n}{(y_i-\hat{y}_i)^2}}, \end{aligned}
(4)
\begin{aligned} MAE= & {} \frac{1}{n}\Sigma _{i=1}^{n}\left| (y_i-\hat{y}_i)\right| , \end{aligned}
(5)
\begin{aligned} r= & {} \frac{ \sum _{i=1}^{n}(y_i-\bar{y})(\hat{y_i}-\bar{\hat{y}}) }{ \sqrt{\sum _{i=1}^{n}(y_i-\bar{y})^2}\sqrt{\sum _{i=1}^{n}(\hat{y_i}-\bar{\hat{y}})^2}}, \end{aligned}
(6)
\begin{aligned} R^{2}= & {} \left( \frac{ \sum _{i=1}^{n}(y_i-\bar{y})(\hat{y_i}-\bar{\hat{y}}) }{ \sqrt{\sum _{i=1}^{n}(y_i-\bar{y})^2}\sqrt{\sum _{i=1}^{n}(\hat{y_i}-\bar{\hat{y}})^2}}\right) ^{2}, \end{aligned}
(7)

where $$y_i$$ and $$\hat{y}$$ represent the actual and network outputs, respectively. n is the number of samples. $$\bar{y}$$ represents the mean of the actual variables and $$\bar{\hat{y}}$$ is the mean of the predicted variables.

### Sensitivity analysis

Sensitivity analysis (SA) is a statistical method that provides an idea of how sensitive is the best solution chosen to any changes in input values from one or more parameters39. ANOVA is an independent SA method that assesses if there is any statistically significant association between one or more inputs and output40,41,42,43. ANOVA utilizes the statistic ratio F to define if there is a significant difference exists between the average responses to main interactions or interactions between factors. The higher F-value indicates higher rankings. The p-value represents the differences between column means if they are significant or not. In this paper, one-way ANOVA is used to assesses the difference between the obtained results using the proposed MLP model, MLR and experimental values.

## Results and discussion

### Analysis of the proposed MLP model

Functional properties of nano $$\hbox {TiO}_2$$ coated cotton fabric were predicted through backpropagation MLP model. The selected MLP model with three-layers (i.e., an input, a hidden, and an output layers) was adjusted in a way that the number of hidden layer nodes could not exceed the range of values [4, 13] according to Eq. (3). Afterwards, the results were tested for different number of hidden layer nodes in this values range. Figure 2 represents the errors and accuracy in terms of RMSE and $$R^{2}$$ for different number of hidden layer nodes. The obtained results reveal that the proposed MLP model with 11 nodes has the lower computation error and higher accuracy with $$\hbox {RMSE}=21.3844$$ and $$R^{2}=0.9976$$, respectively. Therefore, MLP model with 11 nodes was adopted and further used in this work.

Regarding the transfer function, there are three main transfer functions mostly used for hidden and output layers i.e., logarithmic sigmoid (logsig), tangent sigmoid (tansig) and purelin (a linear function) functions. The best selection of a transfer function for input and output layers guarantee the accuracy of the predicted results. Therefore, all possible measures were taken to assure that the tests were performed in such a way where the network structure, the thresholds and the weights were the same. Table 2 shows the RMSE, r and $$R^{2}$$ of different transfer functions. It was observed that the determination of transfer function of hidden and output layers has a significant influence on the desired prediction accuracy. The selection of logsig transfer function for hidden layer and tansig transfer function for output layer provide lower errors according to RMSE and high accuracy according to $$R^{2}$$ and r. Figure 3 represents the MLP model based on the optimal structure (number of layers and layer nodes) according to our observations and this model is further utilised for the prediction of results. The setting of training parameters are presented in Table 3.

### MLR model

The purpose of MLR is to investigate the relationship between independent variables i.e., (amount of titanium tetrachloride, amount of isopropanol, and sonication time) and the obtained results i.e., (self-cleaning efficiency, antimicrobial efficiency and UPF) for nano $$\hbox {TiO}_2$$ coated cotton fabric. Moreover, the performance of MLR and MLP were compared using the MAE, RMSE, correlation coefficient and the coefficient of determination released in the four properties.

### Comparison of MLP and MLR results

A comparison of the predicted results of MLP model was made with MLR results of all functional properties for different amount of precursor and solvent under varying reaction time. The predicted results for all four outputs are presented in Fig. 4. The absolute errors given by the difference between predicted and actual values for both MLP and MLR is shown in Fig. 5.

The cumulative mean of both RMSE and MAE, $$R^{2}$$, and r of both MLP and MLR models for all four functional properties are presented in Table 4. The results reveal that the values of estimation error were significantly lower for the proposed MLP model as compared to MLR for all four functional properties.

The correlation between the actual and the predicted values using MLP of all tested properties is illustrated in Fig. 6. It is observed from the results that the correlation ($$R-$$value) provide a very strong relationship between the actual and predicted values, where $$R = 99\%$$ for Nano $$\hbox {TiO}_2$$ coated amount, $$R = 96 \%$$ for Self-Cleaning efficiency, $$R = 95 \%$$ for antimicrobial efficiency, and $$R = 93\%$$ for UPF.

The relation between actual and predicted values by MLR model had been plotted using a linear regression model in Fig. 7. We noted that MLR model provide a good correlation between the actual and predicted values especially for the first functional property Nano $$\hbox {TiO}_2$$ coated amount, where $$R = 96\%$$. However, the results shows less accuracy for the other three functionals properties, where $$R = 78 \%$$ for Self-Cleaning efficiency, $$R = 75 \%$$ for antimicrobial efficiency, and $$R = 82\%$$ for UPF. As result, MLP outperformed MLR for the prediction of the all functional properties.

### Robustness assessment

A one-way ANOVA test was applied to assess the robustness of the predicted results using MLP, MLR as well as the experiment data. ANOVA test helps to knows how it is the correlations between the predicted responses of coated fabric with process variables. Table 5 shows the results of the one-way ANOVA test of each functional properties obtained by MLP, MLR and experimental. It is observed that the developed MLP model was more statistically significant as compared to MLR and experimental, as it provides the lowest $$p$$-value for all functional properties.

## Conclusions

In this paper, a specific class of ANN called MLP model was developed and compared with MLR for the prediction of functional properties of nano $$\hbox {TiO}_2$$ coated cotton fabric. The developed MLP model was used to correlate different output results with varying input variables. The obtained results showed a higher prediction accuracy for the developed MLP model i.e., ($$p<0.1 e^{-10}$$ and $$r>95\%$$) compared to MLR. The computed values of RMSE and MAE from all predicted results confirmed that the proposed MLP model has lower error as compared to MLR. The successful utilization of the developed model revealed a non-linear relationship between the selected parameters for the prediction of functional properties. The findings of this work highlight that MLP approach can be effectively used for the prediction of other properties of nano coated fabrics.