Modeling of Surfactant-Enhanced Drying of Poly(styrene)- p -xylene Polymeric Coatings Using Machine Learning Technique

: In this work, a machine learning technique based on a regression tree model was used to model the surfactant enhanced drying of poly(styrene)- p -xylene coatings. The predictions of the developed model based on regression trees are in excellent agreement with the experimental data. A total of 16,258 samples were obtained through experimentation. These samples were separated into two parts: 12,960 samples were used for the training of the regression tree, and the remaining 3298 samples were used to test the tree’s prediction accuracy. MATLAB software was used to grow the regression tree. The mean squared error between the model-predicted values and actual outputs was calculated to be 8.8415 × 10 − 6 . This model has good generalizing ability; predicts weight loss for given values of time, thickness, and triphenyl phosphate; and has a maximum error of 1%. It is robust and for this system, can be used for any composition and thickness for this system, which will drastically reduce the need for further experimentations to explain diffusion and drying.


Introduction
Polymeric coatings are an important part of a variety of industries, including textiles, electronics, automobiles, and food etc. [1,2]. They are the protective layers that are used to extend the life of a material or surface by shielding it from moisture and preventing cracks. Polymeric coatings are produced by applying a polymeric solution on a substrate. In the manufacturing of polymeric coatings, numerous organic solvents are used, which can be harmful and cause damage to the environment. Water-based coatings, rather than organicbased coatings, are more extensively used nowadays to develop biocompatible and eco sustainable coatings. The formulation costs of water-based coatings are significantly higher than those of organic-based coatings due to the prolonged drying period of water-based coatings. The slow drying rate of water-based coatings is due to the non-volatility of water compared to organic solvents, which ultimately necessitates a larger amount of energy.
Most of the commercial polymers used in coatings have some crystalline composition in order to provide better strength and rigidity. Glassy polymer coatings play an important role in everyday life. A feasible way to produce glassy polymer coatings is solution casting followed by drying. The production of glassy coatings by drying is a complicated process as it includes coupled heat and mass transfer with a moving boundary as well as phase transitions such as sol-gel transition and transformation from the rubbery phase to glass state [3]. This complication is further increased by the addition of surfactants in the drying mixture in order to further enhance drying.
The drying rate of these coatings can be improved by introducing surface-active agents to a binary solution [4]. Water-based coatings require surfactants to reduce the free energy in the interfaces of the system and provide kinetic stability to the formulations. Surfactants are surface-active groups that consist of hydrophobic and hydrophilic parts. The advances in surfactants have led to their vast applications in several industries including textiles, the healthcare sector, automobiles, food-packaging, water disinfectants, paints, cosmetics, etc. Surfactants prevent the film defects that are caused by surface tension gradients. They also serve as a pigment dispersants and a binder emulsifiers. Surface-active polymers are used to improve rheological properties. Waterborne polymer colloids are the main component of products such as coatings, adhesives, agrochemical formulations, pharmaceutical coatings, and so on. Emulsion polymerization in the presence of surfactants is the traditional process for producing them.
Surfactants bond chemically as well as physically and become adsorbed to the particle's surface. The dynamic interplay between colloidal particle diffusion, surfactants, water evaporation, and surfactant desorption and adsorption on the particles during the film forming process results in a non-uniform distribution of the surfactant across the entire dried film [5]. Flurosurfactants, among the various forms of surfactants, were shown to significantly reduce surface tension. As a result, they are used in paint formulations to prevent surface tension gradients due to faster solvent evaporation at the coating edges than in the middle. Owing to the high diffusion coefficient and solubility of water, surfactantcontaining polymers were shown to have a negative effect on barrier properties when exposed to water or vapor [6].
Due to their vast applications, surfactant-polymeric interactions are widely studied. The nature of these interactions depends upon the net charge present in either one of the components or both [7]. At a critical aggregation concentration, surfactant molecules interact with polymers, forming micelle-like clusters along the polymer chains. There is no contact between the surfactant and the polymer underneath this concentration. Studies showed that the surfactant in the solvent system affects the drying rate and the levelling of the polymeric films [4].
Several researchers studied the effect of surfactant and plasticizers in altering the intrinsic viscosity of polymer-solvent(s) systems [8][9][10][11][12][13][14]. Shirakbari et al. [15] studied two surfactants: sodium lauryl sulfate (anionic) and nonylphenol ethoxylate (non-ionic) with 40 ethoxylate units and evaluated their effects on the latex film in altering the contact angle. Muller et al. [16] studied the effect of non-volatile plasticizers on solvent diffusion in polymeric coatings. The drying rate of the solvent with a high plasticizer content was faster in the case of low solvent loading. The interactions of various polymers and surfactants have been studied and analyzed in the literature [4,[16][17][18][19][20][21][22][23][24]. The surfactant-assisted drying of polymer coatings has received less attention. Few researchers [16,25] have looked at the effects of plasticizers, including TPP and fluorine-based surfactants, on mutual diffusion coefficients, drying rates, and levelling effects of polymer/surfactant solutions. The results have shown an increase in drying rate by almost 10-15%. Few studies [4,24] have been conducted on fluorine-based surfactants in organic solvents, and one study has been referred to in water-based coatings.
In our earlier publications [26][27][28], we used various surfactants to minimize the residual solvent in organic and water-based polymeric coatings. The effects of a watersoluble anionic, non-ionic, and fluoro-surfactant on the polymeric coating were studied. Water-soluble surfactants can aid in maintaining the homogeneity of the polymer solution at various stages of drying in order to achieve dense polymeric films with no phase separation. The effect of triphenyl phosphate on the drying of poly (styrene)-p-xylene coatings was investigated. In different coatings with 5% poly(styrene) and 0% to 2% triphenyl phosphate, the residual solvent was substantially reduced as the triphenyl phosphate loading increased. With a 1300 µm initial thickness and a 2% triphenyl phosphate loading, the maximum decrease was found to be 91.33%. The presence of triphenyl phosphate did not produce any morphological changes in the different coatings of various thicknesses.
The optimal method is not only to elucidate drying of glassy polymer coatings in the presence of surfactant, but also to enhance production and reduce its cost through mathematical modeling [3]. Modeling of drying of glassy coatings is a highly complicated process including a large number of adjustable parameters, or parameters obtained from independent experiments, such as sorption experiments, as reviewed recently by Arya et al. [3]. The number of a model parameters increases when a surfactant is added into the drying mixture to further enhance drying. The aim of this work was to develop a simple mathematical model based on comprehensive methodology, namely machine learning algorithms, in order to simulate gravimetric drying data. The application of machine learning in coatings science and engineering is not a new idea [29][30][31][32][33][34][35].
In this work, a machine learning technique was applied to gravimetric data for a system of poly(styrene)-p-xylene in the presence of a surfactant such as triphenyl phosphate (TPP). This system was chosen due to its wide applications in everyday life [3]. Gravimetry is a direct, non-destructive technique used to measure the residual solvent content in drying and the drying rate. The actual prediction of the gravimetric rate is crucial for important applications such as the online control of industrial dryers. More specifically, the predictions of a model could be used to manipulate the process conditions of a dryer such as the flow rate and temperature of the drying medium (air, etc.).
Nowadays, machine learning techniques (MLTs) and artificial intelligence are receiving attention from researchers from different fields of engineering. These techniques have wide applications in the fields of engineering, medical, biotechnology, finance, business, etc. While developing a mathematical model from first principles is quite challenging, these techniques are extremely useful in developing models for complex systems. These are data-driven techniques that are based on the black box principle and therefore do not require system knowledge. If we are unable to construct mathematical models for complex processes, we can conduct a variety of experiments and generate input-output data for these processes. A regression model can be developed using these experimental data with the help of a machine learning technique that develops a relationship between the input and output data. This regression model performs well in extrapolating and interpolating. It can predict the output for any given value of input. This model will help researchers to avoid new experiments in order to understand the process further. There are a number of MLTs available, such as artificial neural networks, support vector regression machines, regression trees, etc. [36][37][38][39][40][41][42]. Each technique has its pros and cons. Regression tree models are popular in the literature because of their ability to fit higher-order non-linear data, great interpretability, and to provide good prediction accuracy. In this study, a regression tree model was developed to predict weight loss for the given values of time, TPP, and initial thickness. For developing a regression tree model, all the drying data were taken from our previously published article [28].
Five sets of data were used to train and validate the model predictions. These sets are in the practical range of commercial application of surfactants in coatings.

Modeling Based on Machine Learning Technique: Regression Tree Model
Regression tree is a well-known machine learning technique. This technique can be used to develop regression and classification models as well. MLTs are based on either supervised or unsupervised learning. In the case of supervised learning, a model is trained/learned/developed from the given input-output data. The data are divided into two parts, i.e., training and testing data. The model is fitted to the training data, and the trained model's accuracy is evaluated using the testing data. If the accuracy is satisfactory, this model can be used to predict output for fresh inputs from the same system. These can be derived from the process's history or produced experimentally. In unsupervised learning, we only have input data, no output, and the model learns on its own. Supervised learning methods can be very useful in developing models for complicated and highly non-linear processes. Regression tree is based on supervised learning.
For a detailed description of regression trees, one can refer to Breiman et al. [43] and Hastie et al. [44]. There are three types of nodes that make up a regression tree. The first node in the tree is a root node with no incoming edges, while all other nodes have exactly one incoming edge. There will be one incoming edge and at least two outgoing edges on the internal node. The nodes at the end of the tree are called leaves (also known as terminal or decision nodes). The tree's final results are stored in terminal/decision nodes. Using a specific criterion, each internal node divides the instances into two sub-spaces. Each split is marked by the appearance of two new branches further down the tree. To measure the target value, a tree is usually constructed using a collection of binary rules, i.e., recursive binary splitting, until the terminal leaf node becomes saturated. Consider a training set . , x M contains inputs/predictors or explanatory variables, say x ∈ R M , and y ∈ I, where I is a numerical response. Figure 1 depicts a simple decision tree with three inputs/predictors (x1, x2, and x3) and four output values (y1, y2, y3, and y4). Now, a test is applied to one of the inputs, say xi, at each internal node in the tree. One can move to either the left or right sub-branch of the tree, depending on the results of the test. Eventually, it arrives at a leaf node and makes a prediction. All of the training data points that hit the leaf are averaged in this prediction.

Modeling Based on Machine Learning Technique: Regression Tree Model
Regression tree is a well-known machine learning technique. This technique can be used to develop regression and classification models as well. MLTs are based on either supervised or unsupervised learning. In the case of supervised learning, a model is trained/learned/developed from the given input-output data. The data are divided into two parts, i.e., training and testing data. The model is fitted to the training data, and the trained model's accuracy is evaluated using the testing data. If the accuracy is satisfactory, this model can be used to predict output for fresh inputs from the same system. These can be derived from the process's history or produced experimentally. In unsupervised learning, we only have input data, no output, and the model learns on its own. Supervised learning methods can be very useful in developing models for complicated and highly non-linear processes. Regression tree is based on supervised learning.
For a detailed description of regression trees, one can refer to Breiman et al. [43] and Hastie et al. [44]. There are three types of nodes that make up a regression tree. The first node in the tree is a root node with no incoming edges, while all other nodes have exactly one incoming edge. There will be one incoming edge and at least two outgoing edges on the internal node. The nodes at the end of the tree are called leaves (also known as terminal or decision nodes). The tree's final results are stored in terminal/decision nodes. Using a specific criterion, each internal node divides the instances into two sub-spaces. Each split is marked by the appearance of two new branches further down the tree. To measure the target value, a tree is usually constructed using a collection of binary rules, i.e., recursive binary splitting, until the terminal leaf node becomes saturated. Consider a training set = {( , ), . . . , ( , )} made of observations from random vectors ( , ). Vector = ( , . . . , ) contains inputs/predictors or explanatory variables, say ∈ ℝ , and ∈ ℐ, where ℐ is a numerical response. Figure 1 depicts a simple decision tree with three inputs/predictors (x1, x2, and x3) and four output values (y1, y2, y3, and y4). Now, a test is applied to one of the inputs, say xi, at each internal node in the tree. One can move to either the left or right sub-branch of the tree, depending on the results of the test. Eventually, it arrives at a leaf node and makes a prediction. All of the training data points that hit the leaf are averaged in this prediction. There are various algorithms for determining which of the inputs can split the node (starting from the root node) and for determining the best split value at a node. In the case There are various algorithms for determining which of the inputs can split the node (starting from the root node) and for determining the best split value at a node. In the case of regression, the sum of squared errors (SSE) is typically used. The SSE for a tree T is given as where m C = 1 n C ∑ i C y i is the prediction for leaf C.
In regression trees, the first split is based on the input/predictor, and its values are in the training set that yields the lowest SSE value, and so on for further splits. Either a tree can be grown to its full depth, or its depth can be controlled by using some stopping criterion. Generally, a deep tree may overfit the data. By using some depth-controlling criterion, small/shallow trees can be grown. This methodology of converting a deep tree into a smaller/shallow tree is known as pruning. Breiman et al. [43] suggested pruning methods. According to these methods, a tree is allowed to grow to its full extent, then it is tested whether the tree is overfitting the data. The over-fitted tree is then converted into a smaller tree by reducing sub-branches that do not contribute to the accuracy of the generalization.
Various studies showed that the pruning of a tree can improve its generalization ability, especially in noisy domains. A more successful approach to finding regression trees uses the idea of cross-validation. First of all, our complete data set was converted into two parts, i.e., training set and test set. Further, the training set was converted randomly into two parts, i.e., training and validation sets (say, 50% for training and 50% for validation). Then, the largest possible tree is grown by using a training set only, which may overfit the data. In order to prune the tree, cross-validation is used. The sum of squared error is measured on the validation data on each pair of leaf nodes with a similar parent and the sum of squared error is compared to see if replacing those two nodes and creating a leaf for their parent would reduce the sum of squared error. This process is repeated until the validation data error is no longer affected by pruning.
In the present work, we have three input/predictors, i.e., time (x 1 ), TPP (x 2 ), and initial coating thickness (x 3 ), and one target variable (output), i.e., weight loss (y). Our output variable is continuous, so a regression tree has been created that could predict weight loss for given values of inputs. A total of 16,258 samples are obtained experimentally. These samples are divided into two parts, i.e., 12,960 samples are used for the training, whereas the remaining 3298 are used to test the prediction accuracy of the trained tree. The regression tree is grown with the help of MATLAB (7.0, 2004, Mathworks India Pvt. Ltd., Bangalore, India) software. A MATLAB code is developed with the help of inbuilt functions available in the machine learning toolbox of the MATLAB. In the code, x (training input samples) contained 12,960 samples (a data matrix of 12,960 × 3) whereas y (corresponding training output samples) contained 12,960 samples (a data matrix of 12,960 × 1), similarly X (testing output samples) contained 3298 samples (a data matrix of 3298 × 3) and Y (corresponding testing output samples) contained 3298 samples (a data matrix of 3298 × 1). These data files are loaded into the program with the help of the "load" function. Furthermore, a regression tree has been fitted on the training data (x,y) with the help of the "fitrtree" function. The "view" function is used to view the regression tree generated for the given data. Then, this regression tree model is used to predict output values (Yfit1) for given input values (X) with the help of the "predict" function. With the help of the "loss" function, mean squared error (MSE) is calculated between predicted values (Yfit1) by the regression tree and actual outputs (Y). MSE 0 indicates 100% match between predicted values and actual outputs.

Results and Discussion
The MSE between the predicted values of the tree (Yfit1) and actual outputs (Y) is obtained as 8.8415 × 10 −6 . This tree is grown to its full extent (without pruning); it has not over fitted the data and predicted weight loss perfectly for the given testing inputs (X). This tree is very large (with 294 nodes); it is not possible to present it here, but we have shown its pruned version in Figure 2 (tree with six nodes only, pruned to the level of 288 nodes). The "prune" function is used to prune the tree up to a desired level, so the tree was reduced to optimum size without compromising the prediction accuracy. Although our tree with full depth produced excellent results, and the model can be used without any doubt for our system to predict weight loss for given values of time, TPP, and initial thickness, we still randomly developed a small tree (pruned tree but not having optimum depth). This pruned tree has predicted outputs with less accuracy compared to a tree with all 294 nodes because the obtained MSE was 2.3248 × 10 −4 . The purpose of developing this tree is to present it here, so the reader can understand it easily.
shown its pruned version in Figure 2 (tree with six nodes only, pruned to the level of 288 nodes). The "prune" function is used to prune the tree up to a desired level, so the tree was reduced to optimum size without compromising the prediction accuracy. Although our tree with full depth produced excellent results, and the model can be used without any doubt for our system to predict weight loss for given values of time, TPP, and initial thickness, we still randomly developed a small tree (pruned tree but not having optimum depth). This pruned tree has predicted outputs with less accuracy compared to a tree with all 294 nodes because the obtained MSE was 2.3248 × 10 −4 . The purpose of developing this tree is to present it here, so the reader can understand it easily.

Conclusions
Regression tree, one of the well-known machine learning techniques has been utilized to model the surfactant-assisted drying of poly(styrene)-p-xylene coatings in this study. To improve the solvent removal rate and to reduce drying-induced flaws, triphenyl phosphate is used as a surfactant. A regression tree is constructed to predict weight loss using input values. The model produced accurate results and it can reliably be used to estimate weight loss for specific time, TPP, and initial thickness values. The model predictions are within 1% of the experimental data. As proven by this and other publications, regression tree is a powerful and straightforward strategy for creating a regression model for generating experimental data. This model eliminates the requirement to perform any further experiments for this system. The effects of the molecular weights of polymers, drying temperature, and air flow rate on weight loss, solvent concentration, polymer concentration, depth profiling can be studied as future scope of work in order to construct a comprehensive model for this system.

Conclusions
Regression tree, one of the well-known machine learning techniques has been utilized to model the surfactant-assisted drying of poly(styrene)-p-xylene coatings in this study. To improve the solvent removal rate and to reduce drying-induced flaws, triphenyl phosphate is used as a surfactant. A regression tree is constructed to predict weight loss using input values. The model produced accurate results and it can reliably be used to estimate weight loss for specific time, TPP, and initial thickness values. The model predictions are within 1% of the experimental data. As proven by this and other publications, regression tree is a powerful and straightforward strategy for creating a regression model for generating experimental data. This model eliminates the requirement to perform any further experiments for this system. The effects of the molecular weights of polymers, drying temperature, and air flow rate on weight loss, solvent concentration, polymer concentration, depth profiling can be studied as future scope of work in order to construct a comprehensive model for this system.
Author Contributions: D.T.: main researcher, methodology, software, writing-original draft, visualization, writing-review and editing; J.S.: co-researcher, methodology, software, writing-review and editing, visualization, project administration; R.S.: supervisor, validation, formal analysis, investigation, writing-review an editing, visualization, project administration; G.D.V.: supervisor, formal analysis, investigation; R.K.A.: supervisor, conceptualization, methodology, resources, validation, formal analysis, investigation, methodology, software, writing-review and editing, visualization, project administration, funding acquisition. All authors have read and agreed to the published version of the manuscript.