Introduction

Titanium dioxide (TiO2) in different nano dimensions i.e., nanoparticles1, nanorods2, nanobelts3, nanowires4, nanosheets5 and nanoflowers6 have shown prestigious trend as a photocatalyst and a multifunctional coating material in many fields of life especially in textiles. Nano TiO2 is significantly utilised in photocatalytic self-cleaning7, antimicrobial coatings8, superhydrophilic surfaces9 and waste water treatment10. TiO2 is an intrinsic n type metal oxide semiconductor material that closely resembles with zinc oxide in photocatalytic properties. The prominent features that enables TiO2 as a functional material in many applications are photocatalytic activity, chemical stability and non-toxicity11. Researchers have synthesized and coated nano TiO2 on textile substrates in order to achieve various properties based on photocatalytic activity12. In an experimental study, Noman et al. successfully synthesized and coated TiO2 nanoparticles on cotton fabric under sonication method. The developed composites were evaluated for self cleaning and antimicrobial characteristics against methylene blue (MB) dye and bacteria culture i.e., Staphylococcus aureus and Escherichia coli respectively. The developed composites showed excellent results for self-cleaning and antimicrobial properties. The experimental design and the obtained results were tested under regression model for statistical evaluation through Design Expert (DE) software13. 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, artificial neural network (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 model14. 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 variables15,16.

In general, textile processes are mostly non-linear in nature and a lot of efforts are applied to obtain optimal solutions17,18,19,20. ANN is an excellent approach that has been widely used for the prediction of various properties of textile materials where it has proven its effectiveness and potential, such as: prediction of the tensile properties of even and uneven yarns extracted from polyester-cotton blend21; prediction of the warp and weft yarns crimp in woven barrier fabrics22; prediction of antimicrobial performance of chitosan/AgCl-TiO2 coated fabrics23; prediction of core spun yarn strength, elongation and rupture24; prediction of cotton fibre25; prediction the change of shade of dyed knitted fabrics26; prediction of coatings process on textile fabrics27; and prediction of thermal resistance of wet knitted fabrics28. These mentioned work reveal that the most common type of ANN algorithm used in textile industry is multilayer perceptron MLP29,30. MLP is a class of feedforward 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. However, the main drawbacks of MLP model are slow convergence rate, hard understanding problem and stuck in the local minimum values.

The use of metaheuristic algorithms has gained attention of scientists and researchers in order to improve the performance of ANN during training process. Gao et al. proposed a dendritic neuron model (DNM) by taking into account the nonlinearity of synapses31. They used six algorithms to train the DNM that include genetic algorithm, biogeography-based optimization, particle swarm optimization, ant colony optimization, population-based incremental learning and evolutionary strategy. Here, simulations results showed that DNM trained by biogeography-based optimization is the most effective for enhancing DNM performances. Wang et al. proposed a modified version of the gravitational search algorithm (GSA) based on the hierarchy and distributed framework32. Then, they tested GSA to train the MLP, where they showed promising results. Xiao et al. used a hybrid approach that combined ANN and genetic algorithm (GA) in order to predict cotton-polyester fabric pilling33. The proposed hybrid approach showed good results compared to the standard ANN. Hussain et al. compared ANN with adaptive neuro-fuzzy inference system (ANFIS) in the evaluation of fabrics wrinkle recovery34. The simulation results demonstrated that ANN performed a slightly better than ANFIS with significant accuracy percentage. However, ANFIS process was more useful while drawing surface plots among input and output variables. 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 process35. Abhijit et al. applied a combination of GA and ANN as a hybrid algorithm to predict comfort performance and the range of ultraviolet protection factor (UPF)36. ANN was applied as a prediction tool and GA was utilized as an optimization tool and for experimental purpose, a set of four samples were selected for the evaluation of functional properties. The proposed ANN–GA method was carried out for an iterative set of variables until the required fabric properties achieved. Ni et al. proposed a novel online algorithm that detects and predicts the coating thickness on textiles by hyperspectral images37. The proposed algorithm was based on two different optimization modules i.e., the first module is called extreme learning machine (ELM) classifier whereas, the later is called a group of stacked autoencoders.The ELM module optimized by a new optimizer known as grey wolf optimizer (GWO), to determine the number of neurons and weights to get more accuracy while detection and classification. The results explained that online detection performance significantly improved with a combination of VW-SAET with GWO-ELM that provide 95.58% efficiency. Lazzús et al. used the combined ANN with particle swarm optimization (PSO) to predict the thermal properties38. The results demonstrated that the proposed model ANN-PSO provided better results than feedforward ANN.

Recently, a new meta-heuristic method based on the behaviors of crows has been emerged to solve complex optimization problems, known as Crow Search Algorithm (CSA)39. CSA include less setting parameters than the other algorithms such as GA and PSO, which make it more efficient in solving complex problems compared to other state-of-art methods39. The simple structure, easy implementation, and faster convergence motivate the use of CSA in the improvement of training process of ANN. Therefore, the main contributions of this paper are: (1) Proposing the use of CSA to train the MLP; (2) Investigating the accuracy of the propose MLP-CSA for the prediction of various properties of nano TiO2 coated cotton. The amount of titanium precursor, amount of solvent and process time were selected as input variables whereas the amount of nano TiO2 coated on cotton fabric, and some related functional properties i.e., self-cleaning efficiency, antimicrobial efficiency and UPF were considered as outputs variables. The achieved results were compared with the classical MLP, PSO and GA using a sensitivity analysis. Consequently, significant technical merits are satisfied which prove the effectiveness of the proposed MLP-CSA approach, thus providing an alternative solution for prediction in textiles materials applications.

The paper is organized as follows: “Material and methods” section describes the details of the materials and experimental design, as well as reviews the classical artificial neural network framework and introduces the optimized ANN model with crow search algorithm. In “Results and discussion” section, simulation, comparison and discussion results of prediction of functional properties of nano TiO2 coated cotton fabric are presented. Finally, “Conclusions” section summarizes the main findings and concludes the paper.

Material and methods

Material and experimental

Bleached cotton fabric with GSM (fabric mass) 110 g m−2 was used. Titanium tetrachloride, isopropanol and MB dye were taken from sigma aldrich. The selected variables were the amount of titanium precursor (titanium tetrachloride); the amount of solvent (isopropanol) and sonication time. The combination of variables is illustrated in Table 1.

Table 1 The input variables and experimental design.

Artificial neural network

ANN are mathematical models inspired from biological nerve systems that are responsible for the functionality of human brain. A very special feature of ANN is the automatically creation, derivation and exploration of new information using previous learning that is called as training process40.

Multilayer perceptron (MLP) is one of the most common and typical learning algorithm in ANN that deals with non-linear models by reducing the wanted target error in a gradient descent pattern though tailoring the weight factors and biases33,41. In this algorithm, training occurs in three steps: 1) Forward propagation step: an experimental data is introduced to ANN as input and its effect is propagated in different 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 ANN and the synaptic weights are adjusted in such a way that the error vector reduces with every iterative step. Furthermore, the ANN model is getting closer and closer to generating the desired output.

Technically, ANN 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 network42,43:

$$ y =\varphi \left( \sum _{j} w_j *x_j +b \right) $$
(1)

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 studies15,44,45. 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 structure of feedforward ANN, i.e., MLP model that includes three-layers, one input layer; one hidden layer, and one output layer for the prediction of functional properties (see Fig. 1).

Figure 1
figure 1

MLP model for the prediction of functional properties of nano TiO2 coated cotton.

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 and the number of nodes for output layer was 4. The random selection of a number of hidden neurons might cause either overfitting or underfitting problems. To avoid these problems, the number of nodes for hidden layer was calculated according to the following equation33:

$$ N=\sqrt{m+n}+a $$
(2)

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].

Optimized ANN model with crow search algorithm

  • Crow search algorithm

Crow search algorithm (CSA) is a recent meta-heuristic method proposed in39 to solve constrained engineering problems. The structure of this algorithm is modeled in mathematical expressions inspired from the intelligent behavior of the crows while saving their excess food in hiding places and retrieves it when the food is needed. The basic principle of crows is to observe food spots for other birds, and steal them when the birds leave their place. Furthermore, if the crow commits the theft, it will take additional precautions such as moving to new hiding places to avoid becoming a victim in the future again.

The position of crows x is given by:

$$ x^{i,k}=[x_{1}^{i,k}, x_{2}^{i,k},\ldots ,x_{d}^{i,k}]. $$
(3)

where i = 1, 2, ..., N is the indices of crow i and N is the number of crows. \(k =1,2,\ldots , k_{max}\) is the indices of iterations, \(k_{max}\) is the maximum number of iterations and d is a dimensional environment.

The crows move through their habitats and seek better hiding places to keep their food safe from thieves. Every crow has an intelligent memory that allows it to memorize all its previous food hiding places. One of the important activities of the crow i is following crow j by getting close to where the food is hiding and stealing it. Therefore, two main events may occur in CSA:

  • Case 1: Crow j has no idea that crow i is following it. Here, crow i will get close to the hiding place and changes its position to a new position as follows:

    $$ x^{i,k+1}= x^{i,k}+r_{i} . fl^{i,k} . (m^{j,k}-x^{i,k}) $$
    (4)

    where \(r_{i}\) represents a random value range [1, 10]. \(fl^{i,k}\) represents the flight length of crow i at iteration k. \(m^{j,k}\) is the best position visited by crow j at iteration k.

  • Case 2: Crow j discovers that crow i is followed it. Here, to protect its hideout from theft, crow j will change the flight pass to mislead followers by moving to another position in its environment.

Therefore, the position of each crow can be described using the following expression:

$$x^{i,k+1}= \left\{ \begin{array}{ll} x^{i,k}+r_{i} . fl^{i,k} . (m^{j,k}-x^{i,k})&{\quad} r_j \ge AP^{j,k}\\ {a\,random\,position} &{\quad} {otherwise} \end{array} \right. $$
(5)

where \(AP^{j,k}\) represents the awareness probability of crow i at iteration i.

  • Optimized ANN model with crow search algorithm

The MLP has many drawbacks such as slow convergence rate and stuck into the local minima. The training process and the convergence rate of MLP become more accurate when it is trained using a metaheuristic approaches like PSO38,46,47,48 and GA33,49. However, CSA has been never investigated in training ANN. Training process comprises determining the collection of corresponding influences that depreciate the training error. Therefore, we proposed a new model based on combination between the CSA approach and MLP model to predict functional properties of nano TiO2 coated cotton. The main objective is to find the optimal prediction of the wanted outputs while minimizing the error results in training process of MLP. In this proposed model, MLP model optimized by CSA where CSA is used to optimize the weight and threshold values of MLP, which can more accurately predict the output results.

In this context, at every iteration k, the crow position \(x^{i,k+1}\) is considered as the collection of weights in MLP-CSA. The mean square error (MSE) between the predicted and actual outputs is considered as fitness value for the proposed algorithm MLP-CSA, and the CSA attempts to minimize it during the training of MLP:

$$ Minimize \{F\} = min \{\frac{1}{N}\Sigma _{i=1}^{N}{\Sigma _{j=1}^{n}{(y_{ij}-{\hat{y}}_{ij})^{2}}}\} \; \; \; where \; \; i=1,\ldots ,N\; j=1,\ldots ,n. $$
(6)

where N and n are the number of training samples and the number of output nodes, respectively.

In main steps in this proposed MLP-CSA: (1) Initialize the parameters of algorithm: Each crow contains all the weights and thresholds of the neural network i.e., the connection weight of the input and the hidden layers, the threshold of the hidden layer, the connection weight of the hidden and the output layers, and the threshold of the output layer. (2) Initialization of the position and memory of every crow: MLP-CSA is started with random initialization of crow positions (bias and weights). Here, every crow is moved into the weighted search space striving for propagating the error. (3) Evaluate fitness function: The initial bias and weights used in the learning process to compute the initial training error. (4) Generate new position: random selection and following another crow to find its position of the hidden food. The new positions of crows are given using Eq. (5). (5) Evaluate fitness function of the new obtained positions and update the memory of each crow: computing the fitness function value for every crow according to the new position. Then, update the memory of each crow if the evaluation of the fitness function value of each crow is better than the previous memorized fitness function value. Figure 2 presents the flowchart of the proposed algorithm MLP-CSA for the prediction of functional properties of nano TiO2 coated cotton.

Figure 2
figure 2

MLP-CSA model for the prediction of functional properties of nano TiO2 coated cotton.

Robustness analysis

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

$$ RMSE= \sqrt{\frac{1}{n}\Sigma _{i=1}^{n}{(y_i-{\hat{y}}_i)^2}} $$
(7)
$$ MAE= \frac{1}{n}\Sigma _{i=1}^{n}\left| (y_i-{\hat{y}}_i)\right| $$
(8)
$$ 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} $$
(9)

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 parameters50. ANOVA is an independent SA method that assesses if there is any statistically significant association between one or more inputs and output51,52,53,54. 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 assess the correlation between obtained results of coated fabric with process variables using the proposed MLP-CSA, MLP-PSO, MLP-GA, standard MLP model and experimental values.

A repeated measures ANOVA test followed by a post-hoc Bonferroni multiple comparisons test (with an alpha level significance value of 0.05) is a technique used to evaluate whether there is any statistically significant difference between two or more independent groups55. Therefore, these tests were used to compare the differences in the prediction errors between the results obtained by all algorithms and to determine which algorithm would be different from the others.

Results and discussion

We predicted the functional properties of nano TiO2 coated cotton fabric using the optimized MLP model with crow search algorithm (MLP-CSA). The results obtained with the proposed MLP-CSA were compared with the standard MLP model, optimized MLP model with genetic algorithm (MLP-GA) and optimized MLP model with particle swarm optimization (MLP-PSO).

Parameters setting of the proposed MLP-CSA 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. (2). We found that the best number of hidden layer nodes are 11, where the network provides highly accurate results. Therefore, we adopted 11 hidden layer nodes to be used in this work. The parameters and settings of the MLP training network, optimized models with CSA, PSO and GA are presented in Table 2.

Table 2 Parameters and settings of the MLP training network, optimized models with CSA, PSO, and GA.

Comparison of MLP-CSA with currently used MLP-metaheuristics

The predicted values of functional properties of nano TiO2 coated cotton fabric are presented in Fig. 3. To confirm a fair comparison between all used algorithms, we performed many trials with different number of populations in each algorithm. Then, we considered the best results that include the lower MSE and high prediction performance for the functional properties of nano TiO2 coated cotton in each algorithm. The first sub-figure shows the predicted results of synthesized and coated TiO2; the second sub-figure represents the results of self-cleaning efficiency; the third sub-figure represents the results of antimicrobial efficiency whereas the last sub-figure illustrates the results of UPF efficiency.

Figure 3
figure 3

Simulation results for the prediction of synthesized and coated TiO2, self-cleaning efficiency, antimicrobial efficiency, and UPF efficiency using MLP-CSA, MLP-PSO, and MLP-GA.

The value of absolute prediction error given by the difference between predicted and actual values for all four functional properties using MLP-CSA, MLP-PSO, MLP-GA, and standard MLP are shown in Fig. 4. We observed that the values of prediction error were significantly lower for the proposed MLP-CSA as compared to MLP-PSO, MLP-GA, and standard MLP for all four functional properties.

Figure 4
figure 4

Absolute errors between predicted and actual values using MLP, MLP-CSA, MLP-PSO and MLP-GA.

Figure 5 illustrates the performance MSE convergence characteristics for all used optimized models: MLP-CSA is in red, MLP-GA is in yellow, and MLP-PSO is in green. We noticed that the lower MSE values were obtained by the proposed MLP-CSA model compared to MLP-PSO and MLP-GA for all of four functional properties.

Figure 5
figure 5

Performance MSE convergence characteristics for MLP-CSA, MLP-PSO and MLP-GA.

Table 3 represents the computed RMSE, MAE and R2 for all used models to predict the functional properties of nano TiO2 coated cotton fabric. We observed that the proposed MLP-CSA model provides lower errors according to RMSE and MAE, and high accuracy according to R2 compared to MLP-PSO, MLP-GA and standard MLP for all of the four functional properties. It is clear from the obtained results that the proposed MLP-CSA model verifies its accuracy and effectiveness in the prediction process.

Table 3 Errors of different approaches.

Robustness assessment by statistical analysis

A one-way ANOVA test was applied to assess the robustness of the predicted results using MLP-CSA, MLP-PSO, MLP-GA, standard MLP 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 4 shows the results of one-way ANOVA test of each functional properties obtained by MLP-CSA, MLP-PSO, MLP-GA, MLP and experimental. It is observed that the proposed MLP-CSA model was more statistically significant as compared to other models and experimental, as it provides the lowest p value for all functional properties.

Table 4 Analysis report of the experimental values and the predicted values using MLP, MLP-CSA, MLP-PSO and MLP-GA for functional properties of nano TiO2 coated cotton.

In addition, we performed a repeated measure ANOVA test followed by a post hoc Bonferroni multiple comparison test for all predicted error results of synthesized and coated TiO2, self-cleaning efficiency, antimicrobial efficiency, and UPF efficiency as shown in Tables 5, 6, 7 and 8, respectively. These tests were used to compare the differences in the prediction errors between the results obtained by all models as well as to determine which model would be different from the others. Paired sample t-tests with Bonferroni correction shows that the MLP-CSA was statistically significant and comparatively different from MLP and MLP-GA. We also noted that the MLP-CSA and MLP-PSO were statistically similar (P = 1). However, we observed that there is a minor difference in the mean error between MLP-CSA and MLP-PSO for the four functional properties as shown in Tables 5, 6, 7 and 8, which confirms that MLP-CSA provides the best results for the prediction of functional properties of nano TiO2 coated cotton fabric.

Table 5 Pairwise comparisons of all algorithms prediction error for the synthesized and coated TiO2.
Table 6 Pairwise comparisons of all algorithms prediction error for the self-cleaning efficiency.
Table 7 Pairwise comparisons of all algorithms prediction error for the antimicrobial efficiency.
Table 8 Pairwise comparisons of all algorithms prediction error for the UPF efficiency.

Conclusions

In this paper, we proposed a novel approach based on combination between artificial neural network and crow search algorithm (MLP-CSA), where CSA has been used for the first time to improve the training process of MLP. The proposed approach has been applied to predict the functional properties of nano TiO2 coated cotton. The obtained results showed a higher prediction accuracy for the proposed MLP-CSA model compared to standard MLP, MLP-PSO and MLP-GA. The computed values of RMSE and MAE from all predicted results confirm that the proposed MLP-CSA model has lower error and more statistically significant as compared to all three other models. The successful utilization of the developed model reveals a non-linear relationship between the selected parameters for the prediction of functional properties. The findings of this work highlight that MLP-CSA approach can be effectively used for the prediction of other properties of nano coated fabrics.