Artificial Intelligence Models to Predict the Influence of Linear and Cyclic Polyethers on the Electric Percolation of Microemulsions

This book chapter presents three predictive models, based on artificial neural networks, to determine the percolation temperature of different AOT microemulsions in the presence of different additives (crown ethers, glymes, and polyethylene glycols), which were developed in our laboratory by different authors. An artificial neural network model has been developed for each additive. The models developed, multilayer perceptron, were implemented with different input variables (chosen among the variables that define the packing or its chemical properties) and different intermediate layers. The best model for crown ethers has a topology of 10-8-1, for glymes the selected topology is 5-5-1, and for polyethylene glycol, the best topology was 5-8-8-5-1. The selected models are capable of predicting the electrical percolation temperature with good adjustments in terms of the root mean square error (RMSE), presenting values below 1°C for glymes and polyethylene glycols. According to these results, it can be concluded that the models presented good predictive capacity for percolation temperature. Nevertheless, the adjustments obtained for the crown ethers model indicate that it would be convenient to study new input variables, increase the number of cases, and even use other training algorithms and methods. predictive on and the


Introduction
Microemulsions can be considered as the mixture of three, even four, basic components; two of these components have different polarity, while the third component, surfactant, gives the system thermodynamic stability (the presence of another surfactant, cosurfactant, facilitates the self-organization of the system is often needed) [1]. The authors affirm that as a result of this mixture, a microheterogeneous dynamic structure is obtained, with a continuous phase, constituted by the main solvent, in which microdroplets of a different phase are integrated (composed of the other solvent limited by surfactant molecules). By presenting two different hydrophobicity environments, microemulsions can be used as solvents for substances of different polarity [1].
Attending to Moldes et al. [1], the microemulsions show a low conductivity (10 −9 -10 −7 Ω −1 ‧cm −1 ) [2,3] and this remains stable while the temperature is below a specific value [1]. However, when the temperature reaches a certain value, the conductivity increases violently [1,4,5]. The point in which this event occurs is called percolation threshold [1]. This behavior is determined by the rigidity of the surfactant film that is determined by the way in which the surfactant molecules fit one with another and the presence of other substances, for example, additives [1,6,7]. It has been reported that the presence of additives in AOT microemulsions, for example, glymes and polyethylene glycols, facilitates the percolation and as a result reduces the percolation threshold [1,2,8], due to that additive are incorporated in the surfactant film and reduces their rigidity and the stabilizing forces [1]. This book chapter focuses on different artificial neural network (ANN) models developed in our laboratory to determine the percolation temperature of AOT/iC 8 / H 2 O microemulsions under the influence of three different additives, crown ethers [9] and linear polyethers (glymes and polyethylene glycols) [1].
ANNs are a modeling tool to capture complex relationships between input and output data [10]. ANNs are formed by interconnected artificial neuronal units [11] that simulate the biological neuron function, that is, use the input data in conjunction with a synaptic weight to generate an output response [12]. ANN models can provide good results in different fields such as: (i) in geology, to predict lithology in the subsurface [13]; (ii) in computing to schedule energy tasks in cloud data centers [14]; and (iii) in agricultural sciences to estimate Proctor parameters in soils [15] or in food technology to control the aging time in red wine [16], inter alia.
Nevertheless, the procedure to obtain a good prediction model is basically by trial and error, by varying the hidden layers' number and the input variables, the training cycles, among others [17]. According to this, ANN models require a lot of time analysis and computing power.
The crown ethers database (97 cases) was divided into two groups. The first group, training group (78 cases), was used to develop each prediction model, and a second group, validation group (19 cases), was used to choose the best model developed [9]. The glymes database (43 cases) was divided into the training group (32 cases) and the validation group (11 cases) [1]. Finally, for the polyethylene glycols database (82 cases), 68 cases were for the training group and 14 cases for the validation group [1].

Artificial neural networks
All models used a multilayer perceptron-type architecture composed of three different types of layers. The first layer is called input layer in which the data are received; the next layer/layers, called intermediate layer(s) (intended to process the information and transmit it to the following layers); and finally the output layer where all treated data are received and the predicted value is generated.
The general learning process of a neural network (shown below) is described in detail in the original papers [1,9]. Data are presented to the neural network as a vector where x n represents the input value in a neuron i Eq. (1).
Then, the data are distributed to the first intermediate layer where, in each artificial neuron, two mathematical operations were carried out. These two processes are performed by the propagation function (Eq. (2)) and the activation function Eq. (3), where w ik is the weight between the previous neuron i and the neuron k and bias k is the bias value for the neuron k. These two functions are responsible for receiving, unifying, processing, and sending information in the intermediate and output layers. All these processes can be observed in Figure 1.
During the training, the predicted value (obtained in the output neuron) is compared to the real value and the error is calculated.
This error is used in the next step to modify some parameters within the neural network and to try to improve the predicted value in the next neural cycle. This process is repeated according to the parameters established by the operator of the neural network and the training ends. Once the training is finished, the reservation data for validation are used to choose the best model developed according to the statistics used.

Application of Expert Systems -Theoretical and Practical Aspects
Achieving a satisfactory model is a trial and error process in which the operator of the neural network must develop different models, for example, using different architectures (varying the number of neurons in the input layer and the intermediate layers). To establish a reasonable number of models, different approaches can be used to limit it. In the three models discussed here, the test range (δ) that determines the intermediate neurons number (Eq. (4)) has been used, where α corresponds to the number of training cases and β to the number of input variables [1,9].

Statistical parameters and software use
Different statistical parameters can be used to check the model's adjustments. In our department, two of the most important are usually used: (i) the determination coefficient (R 2 ) (used to determine the correlation between the experimental and the predicted values) and (ii) the root mean square error (RMSE) (Eq. (5)), where T p is the percolation temperature; the superscripts pred and exp correspond to the predicted value and the experimental value, respectively; and n is the number of cases [1,9]. These parameters are used to choose the best model based on the values of the validation group.
All ANN models were developed with commercial software from Neural Planner Software [1,9].

Results and discussion
According to Moldes et al. [1], temperature leads to electric percolation in microemulsions due to the transfer of charge and mass between collided microdroplets. This transfer is effective when microdroplets collide with enough energy (effective collisions) and a structural reorganization of the surfactant layers of the microdroplets occurs producing a pore through which the exchange of mass and load occurs [1].
An increase in temperature increases the possibility of effective collisions between microdroplets, so that facilitates the phenomenon. Certainly, a modification on the surfactant film interactions can cause a reduction, or an increase, in the effective collisions. This effect can be caused by the presence of additives in the microemulsion [1,9].

Percolation temperature in crown ethers
Moldes et al. [9] report that crown ethers capture ions and transfer them to the surfactant film where decrease the repulsions between the surfactant's head groups in the surfactant film. This results in a stabilization of the structure and, consequently, the effective collisions between microdroplets decrease. For this reason, the percolation threshold increases because more energy is required to produce effective collisions between microdroplets, with this effect being predominant at low additive concentration [9].
In addition to this, Moldes et al. state that crown ethers can interact with the surfactant film causing destabilization, making the film less rigid, which facilitates effective collisions and favors the electric percolation [9]. This effect is given at high concentrations of additive [9,18,19].

Percolation temperature in glymes and polyethylene glycols
According to Dasilva-Carbalhal et al., glymes are considered as simply acyclic analogues from the group indicated above, the crown ethers, and can exhibit less cation affinity than their cyclic corresponding [2]. The glymes would be linked to the polar surfactant head group in AOT film, taking the place of water molecules in the hydration sphere [1,2]. Due to the polar groups of the molecules would be located in the microdroplet aqueous core, the surfactant film reduces its rigidity, facilitating, and therefore, increasing the number of effective collisions and the percolation threshold will be achieved at lower temperatures [1].
Polyethylene glycols have a similar effect due to the molecule acting as a bridge between microdroplets and thus facilitating the percolation process [1,2,8,20].

Artificial neural networks for crown ethers
To develop this neural model, Moldes et al. [9] selected different input variables to predict the percolation temperature, which was chosen for being related to the molecule's structure and its nature. The input variables were: (i) additive concentration -[Additive]-, (ii) log P, (iii) molecular mass -M m −, (iv) maximum number of bonds between rings -B M −, (v) minimum number of bonds between rings -B m −, (vi) number of atoms that conforms a ring in a crown ether -A ring −, (vii) number of heteroatoms -A H −, (viii) number of oxygen atoms -nº O-, (ix) number of nitrogen atoms -nº N-, (x) number of benzene rings in the molecule -nº benz- [9].
The additive concentration supplies information about the influence of different quantities of additive [9]. Log P (partition coefficient between water and 1-octanol) provides information about the polarity (hydrophobicity) of a substance; finally, the other variables could provide information about molecular structure [9].
All these variables were also chosen, based on the knowledge obtained in previous works [21][22][23], and with the purpose to find which are the most important variables to determine the percolation temperature and develop a general model to be able to determine it with any type of additive [9].
As stated above, the trial and error method was used to determine the best artificial neural network. The best model developed by Moldes et al. [9], according to validation group, was the model with ten neurons in the first layer (input), eight neurons in the intermediate layer (hidden) and one neuron in the output layer (i.e., presents an architecture of 10-8-1) (Figure 2). The selected ANN model presents, for the validation group, a determination coefficient around 0.724 [9]. Although this value is not very high, the root mean square error must be taken into account because it gives an idea of the deviation from the experimental value of the validation cases. In this sense, it can be seen that the RMSE is slightly greater than 1.1°C [9]. This value can be considered valid due to it being close to the limit of 1°C, which is, in our opinion, the barrier to the use of an ANN model. In Figure 3, the predicted values versus the experimental values of percolation temperature for validation group are shown (blue triangle). It can be seen, taking as reference the line with slope 1, that several points are far from the ideal prediction. It is these points that cause the RMSE in the validation group to exceed the threshold value of 1°C.
The ANN 10-8-1 presents, for the training group, a determination coefficient around 0.933 and RMSE of 1.625°C [9]. In Figure 4, the predicted values versus the experimental values of percolation temperature for training group are shown (blue triangle). It can be seen that different points are far from the ideal prediction, especially in the range 30-35°C.
The most important input variables to predict the percolation temperature of crown ethers are the additive concentration, the number of benzenes, and log P [9].
According to the values obtained for the training group and the validation group, it can be said that the model developed could be used for the prediction of the percolation temperature. However, taking into account the RMSE values and the dispersion presented by some of the training and validation cases, it could be concluded that the model developed by Moldes et al. [9] should be improved to get the RMSE value to fall below 1, in both groups.

Artificial neural networks for glymes
Moldes et al. [1] selected for this ANN model different input variables based on the knowledge obtained in the previous works [9,[21][22][23]. In this case, the variables used by Moldes et al. [1] were: (i) additive concentration -[Additive]and (ii) log P were used for being one of the most important variables in the previous model [9]. The variables (iii) molecular mass -M m − and (iv) the number of oxygen in the molecule -nº O-were used because they had also been taken into account in the crown ethers model. Finally, (v) number of carbon atoms -nº C-(which had already been used in a previous model [23], and had shown good results) was taken into account. Neural network (10-8-1) selected by Moldes et al. [9] to predict the percolation temperature for crown ethers.
Artificial Intelligence Models to Predict the Influence of Linear and Cyclic Polyethers… DOI: http://dx.doi.org /10.5772/intechopen.92646 Authors reported that the best model, taking into account the results of the validation group, is the model constituted by five, five and one neurons in the input, hidden and output layer, respectively ( architecture 5-5-1, Figure 5) [1].  [1,9]. Dashed line corresponds to the line with slope 1.  [1,9]. Dashed line corresponds to the line with slope 1.
The selected model presents for validation group a determination coefficient with a value of close to 0.988 [1]. This high value corresponds to an RMSE value around 0.750°C [1] and it is considered a very good adjustment because it is below the reference error set at 1°C. For the training group, the selected neural network also has good adjustments, both in terms of R 2 (0.999) and the associated RMSE value (below 0.200°C) [1].
These good adjustments, both in determination coefficient and in the root mean square error, can be seen in Figures 3 and 4, where the predicted and experimental values for the validation and training groups are compared. It can be seen that for both the training and the validation, the points fit almost perfectly to the line with slope 1, except, perhaps, a point in the validation group (bottom left of graph 3) where a point that deviates slightly can be seen.

Artificial neural networks for polyethylene glycols
The last model proposed by Moldes et al. [1] is a neural network model with 5-8-8-5-1 architecture, that is, five input variables in the first layer; three hidden layers with 8, 8, and 5 neurons; and an output layer with one neuron, the percolation temperature (Figure 6).
The variables used were the same as those used in the model developed to predict the percolation temperature in glymes, that is: (i) additive concentration -[Additive]-, (ii) log P, (iii) molecular mass -M m −, (iv) the number of oxygen in the molecule -nº O-and (v) the number of carbon atoms -nº C- [1].
This model provides a good determination coefficient (0.990) with an RMSE below 1°C for validation group [1]. This good fit for the validation group can also be observed for the training group (Figures 3 and 4). In these figures, it can be seen how data fit perfectly (R 2 of 0.999 [1]) to the slope line 1, with all points falling over the line. For the validation group, two points are observed outside but with a very small distance.  Once again, the RMSEs are below 1°C, which can be considered satisfactory, so that, the network could be used to determine the percolating temperature of polyethylene glycols.
Analyzing the results obtained by the authors, it can be verified that the most important input variable for the determination of the percolation temperature is the concentration of additive followed by log P. Attending to Moldes et al. [1], similar behavior is observed for both models regarding the importance of the variables. In these two models, the importance of the additive concentration clearly exceeds the importance of log P. All input variables remain in a range of similar importance for glymes and polyethylene glycols.
This behavior seems to indicate that the additive concentration and log P should be input variables to be taken into account whenever a percolation temperature prediction model is designed.
As stated earlier, the most important input variables for the crown ether model are additive concentration, benzene number, and log P; so, the idea of developing a single model to predict the percolation temperature of these types of substances should include necessarily these three variables.
Given the results obtained by the authors, it can be seen that the models developed to predict the temperature of percolation in glymes and polyethylene glycols present very good results; however, the predictability for the model developed for crown ethers offers more humble results.

Conclusions
The works collected in this book chapter are about prediction tools for percolation temperature under the presence of crown ethers, glymes, and polyethylene glycols as additives. Neural network (5-8-8-5-1) selected by Moldes et al. [1] to predict the percolation temperature for polyethylene glycols.

Author details
Manuel Alonso-Ferrer, Gonzalo Astray Dopazo* and Juan Carlos Mejuto Department of Physical Chemistry, Faculty of Sciences, University of Vigo, Ourense, Spain *Address all correspondence to: gastray@uvigo.es The predictive models were developed based on artificial neural networks and according to the data provided by Moldes al. [1,9]: (i) the best model to predict the percolation temperature in crown ethers is a model with an architecture of 10-8-1 that presents for validation dataset an RMSE around 1.1°C, (ii) for glymes the architecture selected is 5-5-1, and (iii) for polyethyleneglycol the best architecture was 5-8-8-5-1. The last two models present a root mean square error under 1°C, which demonstrates its good performance and improves the model developed for crown ethers.
Taking into account the importance of the variables used for each of the models developed by the authors, it can be concluded that the inclusion of the additive concentration and log P should be required for any general model that may arise in the future.
To finish, it would be interesting to try the development of a joint model using the variables with the greatest importance of the models developed in our laboratory; it also would be very convenient to improve the new model with the inclusion of new experimental cases, new input variables, other training algorithms, and even including different machine learning models such as random forest, support vector machines, among others.