Use of Radial Basis Function Network to Predict Optimum Calcium and Magnesium Levels in Seawater and Application of Pretreated Seawater by Biomineralization as Crucial Tools to Improve Copper Tailings Flocculation

: The combined use of the Radial Basis Function Network (RBFN) model with pretreated seawater by biomineralization (BSw) was investigated as an approach to improve copper tailings ﬂocculation for mining purposes. The RBFN was used to set the optimal ranges of Ca 2 + and Mg 2 + concentration at di ﬀ erent Ph in artiﬁcial seawater to optimize the performance of the mine tailings sedimentation process. The RBFN was developed by considering Ca 2 + and Mg 2 + concentration as well as pH as input variables, and mine tailings settling rate (Sr) and residual water turbidity (T) as output variables. The optimal ranges of Ca 2 + and Mg 2 + concentration were found, respectively: (i) 169–338 and 0–130 mg · L − 1 at pH 9.3; (ii) 0–21 and 400–741 mg · L –1 at pH 10.5; (iii) 377–418 and 703–849 mg · L − 1 at pH 11.5. The settling performance predicted by the RBFN was compared with that measured in raw seawater (Sw), chemically pretreated seawater (CHSw), BSw, and tap water (Tw). The results highlighted that the RBFN model is greatly useful to predict the settling performance in CHSw. On the other hand, the highest Sr values (i.e., 5.4, 5.7, and 5.4 m · h –1 ) were reached independently of pH when BSw was used as a separation medium for the sedimentation process.


Introduction
Copper (Cu) is the main product of the Chilean mining industry. Cu is usually found in the form of sulfide ores and is processed using a pyrometallurgical method, which involves the following operations: (1) ore extraction, (2) mineral processing, (3) smelting, and (4) refining. Specifically, mineral processing includes comminution, the froth flotation process to recover Cu from sulfide ores, and dewatering to recover and recycle water from concentrates and tailings [1].
The progressive depletion of high-grade ores in the near future will constrain mining factories to process a higher amount of rock to keep stable the production of valuable minerals, thus,

Artificial Seawater
Artificial seawater (ASw) was obtained by adding different chemical reagents to distilled water following the composition shown in Table 2 and according to Mobin and Sharman [20]. Ultra-high purity chemical reagents were used (Merck, Darmstadt, Germany). Different concentrations of Ca 2+ and Mg 2+ were set by adequately varying the dosage of CaCl 2 and MgCl 2 × 6H 2 O, respectively.

Pretreated Seawater by Biomineralization
To obtain pretreated seawater by biomineralization (BSw), the concentrations in raw seawater of Ca 2+ and Mg 2+ were reduced through precipitation by the ureolytic bacterial strain B. subtilis LN8B, isolated from the hypersaline lagoon of the desert of San Pedro de Atacama, Chile [21]. BSw was obtained from bioreactors filled with polyvinyl alcohol and alginate beads (PVA-Alg beads) with entrapped cells of B. subtilis LN8B, according to the experimental system and procedure as described by Arias et al. [18].

Chemically Pretreated Seawater
Raw seawater was chemically pretreated (CHSw) to partially remove Ca 2+ and Mg 2+ , using the procedure as described by Cruz et al. [1] with some changes as follows: 1.4 L of raw seawater was alkalinized by adding 10 M NaOH to reach a pH of 10.5. Afterward, CO 2 gas was flushed at Minerals 2020, 10, 676 4 of 18 3 L min −1 for 6 min, and simultaneously, the solution of NaOH was added for keeping the pH at 11. Such treatment resulted in a white-colored solution because of the presence of microcrystals of Ca 2+and Mg 2+ -based salts, which were removed by a vacuum filtration system equipped with a pump (Vacuubrand industry, Wertheim, Germany) and 12 µm filters (Ahlstrom-Munksjö, Helsinki, Finland).

Tap Water and Raw Seawater
Tap water (Tw), coming from a reverse osmosis process containing average concentrations of Ca 2+ and Mg 2+ of 74 ± 11 and 23 ± 5 mg·L −1 , respectively, was collected from the aqueduct supplying water to the city of Antofagasta. In contrast, raw seawater (Sw) was obtained from San Jorge Bay of Antofagasta, Chile. Prior to use, raw seawater was filtrated progressively with filters of 10, 5, and 1 µm porous size, respectively, to remove the main suspended impurities. The average Ca 2+ and Mg 2+ concentrations were detected equal to 444 ± 8 and 1283 ± 13 mg·L −1 , respectively.

Sedimentation Tests
Sedimentation tests were carried out with artificial tailings 15% w/w suspended in 5 different aqueous media, as follows: ASw, BSw, CHSw, Tw, and Sw. The adopted procedure is schematically summarized in Figure 1: water to the city of Antofagasta. In contrast, raw seawater (Sw) was obtained from San Jorge Bay of Antofagasta, Chile. Prior to use, raw seawater was filtrated progressively with filters of 10, 5, and 1 µm porous size, respectively, to remove the main suspended impurities. The average Ca 2+ and Mg 2+ concentrations were detected equal to 444 ± 8 and 1283 ± 13 mg·L −1 , respectively.

Sedimentation Tests
Sedimentation tests were carried out with artificial tailings 15% w/w suspended in 5 different aqueous media, as follows: ASw, BSw, CHSw, Tw, and Sw. The adopted procedure is schematically summarized in Figure 1: Step 1: the mine tailings are added to the aqueous medium by filling a beaker and homogenized by mechanical mixing at 500 rpm for 10 min; - Step 2: pH is regulated at a specific set point (i.e., 9.3, 10.5, 11.5) by adding different volumes of 10 M NaOH solution; - Step 3: the anionic polyacrylamide flocculant SNF 60430 obtained from Centinela copper mine (Antofagasta, Chile) is added to the aqueous suspension according to a dosage of 20 g·ton −1 and the mechanical mixer is turned down to 170 rpm and kept constant for 30 s; - Step 4: the aqueous suspension filling the beaker is poured into a graduated cylinder and kept in static conditions for 1 h; - Step 5: the volume of supernatant is collected after one hour of sedimentation process and used to measure the turbidity T (FNU), while for the solid fraction (Cp), it is measured using Equation (1), where mt is the artificial tailing mass, is water density (1g·cm −3 ), is the initial total volume of water needed to form the pulp, and is the supernatant volume. The percentage of water recovery (% WR) is calculated with Equation (2).

-
Step 1: the mine tailings are added to the aqueous medium by filling a beaker and homogenized by mechanical mixing at 500 rpm for 10 min; - Step 2: pH is regulated at a specific set point (i.e., 9.3, 10.5, 11.5) by adding different volumes of 10 M NaOH solution; - Step 3: the anionic polyacrylamide flocculant SNF 60430 obtained from Centinela copper mine (Antofagasta, Chile) is added to the aqueous suspension according to a dosage of 20 g·ton −1 and the mechanical mixer is turned down to 170 rpm and kept constant for 30 s; - Step 4: the aqueous suspension filling the beaker is poured into a graduated cylinder and kept in static conditions for 1 h; - Step 5: the volume of supernatant is collected after one hour of sedimentation process and used to measure the turbidity T (FNU), while for the solid fraction (Cp), it is measured using Equation (1), where m t is the artificial tailing mass, ρ w is water density (1g·cm −3 ), Vi is the initial total volume of water needed to form the pulp, and Vs is the supernatant volume. The percentage of water recovery (% WR) is calculated with Equation (2). A video camera recorded the sedimentation process that took place in the graduated cylinder. For each sedimentation test, the related video was processed to calculate the following parameter: (i) the mine tailings settling rate, Sr (m·h −1 ), described by Equation (3).
where h (m) is the height of the clarified surface water and t (h) is the time taken by the clarified surface water to reach the minimum height in the graduated cylinder.

Experimental Setting
To maximize the efficiency of the sedimentation process of mine tailings in ASw, it was necessary to find the optimal concentrations of Ca 2+ and Mg 2+ ions by varying the pH. This study tested operating conditions where the concentration of the Ca 2+ and Mg 2+ ions was set lower than that typical in seawater. The value of pH was set higher than 9 due to the flotation process operating condition (the flotation process precedes the sedimentation process). The value of pH 9.3 was used as the initial value because of BSw (the biomineralization process pH is set to 9.3). The three-level full factorial experimental plan (3 3 experimental tests) was elaborated as reported in Table 3: Ca 2+ concentration ranging between 0 and 418.89 mg·L −1 ; Mg 2+ concentration ranging between 0 and 1327; finally, pH ranging between 9.3 and 11.5. A third value, intermediate between the extremes of each interval, was used to complete the 3 × 3 matrix of experiments. Finally, a Radial Basis Function Network (RBFN) model [22] was used by considering a three-level factorial design with three independent input variables: Ca 2+ concentration, Mg 2+ concentration, and pH; two response output variables: mine tailing settling rate (Sr) and supernatant turbidity (T). Numerical simulations were performed using the software of numerical computing MATLAB (version 2009a, MathWorks, Natick, MA, USA).

Physical and Chemical Analyses
Ca 2+ and Mg 2+ concentrations were measured by using Merck ® equipment (cat. No. 1.14815.0001 and 1.00815.0001, respectively; Darmstadt, Germany) and corroborated by Atomic Absorption spectrophotometry analyses, whereas pH was measured by using a digital pH meter model HI5222 (Hanna instruments, Woonsocket, RI, USA). Measures of turbidity were performed with turbidimeter model H198713 (Hanna instruments, Woonsocket, RI, USA).

Statistical Analysis
The average values of the experimental data-Sr, T, Cp, % WR, and the NaOH consumption-are presented as a function of two factors: type of water and pH. The standard deviations of each set of experiments are represented in the corresponding figure (as bars). Comparisons of the means of Sr, T, Cp, % WR, and the NaOH consumption were performed to identify statistical significance as a function of water type and pH. Minitab software version 19.1 (State College, PA, USA) through ANOVA general linear model tests, was used to conduct the statistical analysis. Comparisons between water types and pH values were evaluated with the Tukey test. In all investigated cases, the level of significance was set p < 0.05.

Radial Basis Function Network (RBFN)
Neural networks can represent non-linear assignments of multiple inputs to one or more outputs. These can also be applied to regression problems. The neural network is capable of mapping input variables to continuous values. An important class of neural networks is RBFN. The RBFN consists of an input layer, a hidden layer (Radial Basis Layer), and an output layer (linear layer). The structure of the RBFN is presented in Figure 2, where the inputs are represented by p 1 and the outputs by a 2 .
Minerals 2020, 10, x FOR PEER REVIEW 6 of 20 between water types and pH values were evaluated with the Tukey test. In all investigated cases, the level of significance was set p < 0.05.

Radial Basis Function Network (RBFN)
Neural networks can represent non-linear assignments of multiple inputs to one or more outputs. These can also be applied to regression problems. The neural network is capable of mapping input variables to continuous values. An important class of neural networks is RBFN. The RBFN consists of an input layer, a hidden layer (Radial Basis Layer), and an output layer (linear layer). The structure of the RBFN is presented in Figure 2, where the inputs are represented by p 1 and the outputs by a 2 . In the Radial Basis Layer, the distance between the input vector pi and the rows of the weight wi 1 are calculated, and then multiplied by the bias bi. The net input for the neuron i ( ) in the Radial Basis Layer is calculated by Equation (4): where bi is the bias, which is related with standard deviation σ with Equation (5).
The transfer function used in the Radial Basis Layer or hidden layer is a Gaussian function, which is commonly used in the neural network community. Equation (6) and  Finally, the linear layer or the output layer is represented by Equation (7): In the Radial Basis Layer, the distance between the input vector p i and the rows of the weight w i 1 are calculated, and then multiplied by the bias b i . The net input for the neuron i (n i ) in the Radial Basis Layer is calculated by Equation (4): where b i is the bias, which is related with standard deviation σ with Equation (5).
The transfer function used in the Radial Basis Layer or hidden layer is a Gaussian function, which is commonly used in the neural network community. Equation (6) and Figure 3 represent it. Finally, the linear layer or the output layer is represented by Equation (7): The performance of the RBFN is evaluated using the mean squared error (MSE). The next equations describe the sequence to calculate the MSE using the RBFN. Let us consider the following training points, in Equation (8): The neuron in the hidden layer is calculated by Equations (9) and (10): Grouping terms, the following points are obtained in Equation (11): Then, the response a 2 is determined in the output layer through Equation (12): Finally, the MSE performance index is determined using Equation (13) for the training set [23]: The newrb function of MATLAB was used for modeling the sedimentation rate and turbidity using the RBFN. Two RBFNs were built, one for the sedimentation rate and another for the turbidity. Both networks have three input variables (Ca 2+ and Mg 2+ concentrations and pH). The newrb function works with the following code: net = newrb (p, t, GOAL, SPREAD). The p matrix represents the input variables and t the output variables. GOAL is the target error and SPREAD represents the spread width, which can take different values that will influence the MSE. The network is developed by adding one neuron at a time, and each calculates the MSE. In the iterative process, the MSE value is compared with the GOAL, and if the MSM is equal to or less than GOAL, then, the process converges; otherwise, another neuron is added and so on [24]. This iterative process is performed for various values of SPREAD.
It is worth indicating that the RBFN was selected because a recent study shows that the RBFN performs better than multi-layer perceptron networks when it is applied to response surface methodology [25]. Another advantage of the RBFN over other neural networks is that during RBFN learning, the inputs are fed directly from the hidden layer without any weight, and the weights are only manifested between the hidden and the output layer. Such weights are modified depending on the error. Thus, the RBFN requires a much shorter learning time compared to multi-layer feedback neural networks used in other practical applications, and therefore, the convergence time is also considerably short [26]. Table 4 summarizes the results in terms of Sr, Cp, % WR, and T of the 27 experimental sedimentation tests in artificial seawater (ASw). The results were obtained combining factorially the three selected Minerals 2020, 10, 676 8 of 18 parameters (i.e., Ca 2+ , Mg 2+ , and pH), as indicated in the first three columns of Table 4. The ionic strength of ASw (I) is also incorporated. Note that when the concentration is 0 mg·L −1 for both Ca 2+ and Mg 2+ ions, the ionic strength is 0.52 mol·L −1 . This condition is due to the composition of ASw, which has other salts described in Table 2. Table 4. Results of sedimentation tests in ASw.

Independent Parameters
Response Parameters  Figure 4 shows the decrease in Sr and T for high Mg 2+ concentrations (1327 mg·L −1 ) at pH 10.5-11.5, which demonstrates the effect of pH and Mg 2+ in Sr and T. Furthermore, it is noted that at pH 10.5, the sedimentation rates are the highest and at pH 11.5, the turbidity values are the lowest.
With this explanation, it is observed that the graphs in Figure 4 do not show an ordered and proportional sequence, and this result can be due to the non-monotonous behavior of such ions in the progress of the process [27]. Therefore, the model capable of fitting the data is complex. An adjustment was made with the Multiple Regression method by using Minitab software version 19.1 (State College, PA, USA) and two equations governing the behavior of the settling rate (Sr) and turbidity (T) were obtained. However, the adjusted R 2 of those equations resulted in being 14% and 35%, respectively. Several multiphase systems do not follow a second-order polynomial behavior like what was observed here. The immediate consequence is incorrect optimization. In these cases, the most popular alternative is to use ANNs [28]. For this reason, the RBFN method was chosen, and it was advantageous to show more comprehensively the results (see Section 3.2).
To better understand the results of Sr and T obtained from the sedimentation tests, in Figure 5, such response parameters are studied in the function of the solution ionic strength (I). It is well known that I depends on the dissociation degrees of salts in water and the concentration of ions and their valence [29]; therefore, the nine combinations of Ca 2+ and Mg 2+ concentrations resulted in nine different values of I, as indicated in the X-axis of the graphs in Figure 5.
According to Mpofu et al. [30], an increase in ionic strength can reduce the repulsive force barrier between particles by compressing the thickness of the double layer, thus, enabling particle aggregation and consequently, improving sedimentation process performance. As all ions dissolved in the water contribute to the value of ionic strength and not only those divalent investigated in this study, it is crucial to know the complete chemical composition of water. The experimental results show that at pH 9.3, 10.5, and 11.5, high settling rate and a low residual turbidity are achievable with the following conditions: (i) at pH = 9.3 with I = 0.68 mol·L −1 ; (ii) at pH = 10.5 with I = 0.60 mol·L −1 ; (iii) at pH = 11.5 with I = 0.60 mol·L −1 .
Minerals 2020, 10, x FOR PEER REVIEW 9 of 20 With this explanation, it is observed that the graphs in Figure 4 do not show an ordered and proportional sequence, and this result can be due to the non-monotonous behavior of such ions in the progress of the process [27]. Therefore, the model capable of fitting the data is complex. An adjustment was made with the Multiple Regression method by using Minitab software version 19.1 (State College, PA, USA) and two equations governing the behavior of the settling rate (Sr) and turbidity (T) were obtained. However, the adjusted R 2 of those equations resulted in being 14% and 35%, respectively. Several multiphase systems do not follow a second-order polynomial behavior like what was observed here. The immediate consequence is incorrect optimization. In these cases, the most popular alternative is to use ANNs [28]. For this reason, the RBFN method was chosen, and it was advantageous to show more comprehensively the results (see Section 3.2).
To better understand the results of Sr and T obtained from the sedimentation tests, in Figure 5, such response parameters are studied in the function of the solution ionic strength (I). It is well known that I depends on the dissociation degrees of salts in water and the concentration of ions and their valence [29]; therefore, the nine combinations of Ca 2+ and Mg 2+ concentrations resulted in nine different values of I, as indicated in the X-axis of the graphs in Figure 5. According to Mpofu et al. [30], an increase in ionic strength can reduce the repulsive force barrier between particles by compressing the thickness of the double layer, thus, enabling particle aggregation and consequently, improving sedimentation process performance. As all ions dissolved in the water contribute to the value of ionic strength and not only those divalent investigated in this study, it is crucial to know the complete chemical composition of water. The experimental results show that at pH 9.3, 10.5, and 11.5, high settling rate and a low residual turbidity are achievable with the following conditions: (i) at pH = 9.3 with I = 0.68 mol L −1 ; (ii) at pH = 10.5 with I = 0.60 mol·L −1 ; (iii) at pH = 11.5 with I = 0.60 mol·L −1 . Figure 6 shows the trends of % WR, Cp, and NaOH, varying the concentrations of Ca 2+ and Mg 2+ and the pH according to the selected ranges. It can be seen that the Ca 2+ concentration minimally affects the performance of the sedimentation process of the three selected response parameters. A different conclusion is reached when the effect of Mg 2+ concentration is taken into account: when the Mg 2+ concentration increases, % WR, and Cp decrease, while NaOH consumption increases. For example, at the highest concentration of Mg 2+ (i.e., 1327 mg·L −1 ), % WR decreases approximately by 20%, Cp decreases from 0.5 to 0.3, and NaOH consumption is 5-8 times higher in the pH range 10.5-11.5, than in the range 9.3-10.5. This result is due to the strong buffer effect of seawater in a zone that coincides with the formation of solid magnesium species [31,32]. These results agree with those  Figure 6 shows the trends of % WR, Cp, and NaOH, varying the concentrations of Ca 2+ and Mg 2+ and the pH according to the selected ranges. It can be seen that the Ca 2+ concentration minimally affects the performance of the sedimentation process of the three selected response parameters. A different conclusion is reached when the effect of Mg 2+ concentration is taken into account: when the Mg 2+ concentration increases, % WR, and Cp decrease, while NaOH consumption increases. For example, at the highest concentration of Mg 2+ (i.e., 1327 mg·L −1 ), % WR decreases approximately by 20%, Cp decreases from 0.5 to 0.3, and NaOH consumption is 5-8 times higher in the pH range 10.5-11.5, than in the range 9.3-10.5. This result is due to the strong buffer effect of seawater in a zone that coincides with the formation of solid magnesium species [31,32]. These results agree with those reported by Ramos et al. [15], who stated that the presence of magnesium precipitates deactivated the functional groups of anionic polyacrylamides. The flocculant lost selectivity, thus, being unable to bridge particles that led to large aggregates. However, in the pH range considered in this study, calcium is mainly dissolved in solution, so its impact on flocculant performance is not as relevant as magnesium. Minerals 2020, 10, x FOR PEER REVIEW 11 of 20

Analysis of the Radial Basis Function Network (RBFN) Model
Artificial neural networks allow experimental data to be processed, generating a predictive dataset (RBFN output data) which is suitable for achieving the optimal solution of non-linear equations [33]. After calibration, the RBFN model turns to be a potent tool capable of predicting, with accuracy, the output response variables from any combination of input values (independent variables). Recall that the RBFN structure has an input layer, a hidden layer, and an output layer. Within our case, the RBFN has three input variables (Ca 2+ concentration, Mg 2+ concentration, and pH) and two output variables (Sedimentation Rate, Sr, and Turbidity, T). The MATLAB computer

Analysis of the Radial Basis Function Network (RBFN) Model
Artificial neural networks allow experimental data to be processed, generating a predictive dataset (RBFN output data) which is suitable for achieving the optimal solution of non-linear equations [33]. After calibration, the RBFN model turns to be a potent tool capable of predicting, with accuracy, the output response variables from any combination of input values (independent variables). Recall that the RBFN structure has an input layer, a hidden layer, and an output layer. Within our case, the RBFN has three input variables (Ca 2+ concentration, Mg 2+ concentration, and pH) and two output variables (Sedimentation Rate, Sr, and Turbidity, T). The MATLAB computer program was used to find the optimal number of neurons and the width (w) described in Section 2.7. The objective function was to minimize MSE [34].
In data processing with RBFN, 27 data points were processed for settling rate and turbidity. In the first step, the three input variables were normalized to values in the range [0, 1] to facilitate the calculation and eliminate the influence of dimension. In the second step, the function newrb (p,t, GOAL, SPREAD) of MATLAB was applied with a GOAL of 0.05. Several values of SPREAD were employed and SPREAD values of 2.49 and 0.4 were found for the settling rate and turbidity, respectively. For these SPREAD values, 20 and 25 neurons were obtained for settling rate and turbidity networks. Figure 7 provides the RBFN structures obtained. Table 5 presents weight w and bias b values for hidden (w 1 , b 1 ) and output layer (w 2 , b 2 ) for settling rate and turbidity, respectively. program was used to find the optimal number of neurons and the width (w) described in Section 2.7. The objective function was to minimize MSE [34]. In data processing with RBFN, 27 data points were processed for settling rate and turbidity. In the first step, the three input variables were normalized to values in the range [0, 1] to facilitate the calculation and eliminate the influence of dimension. In the second step, the function newrb (p,t, GOAL, SPREAD) of MATLAB was applied with a GOAL of 0.05. Several values of SPREAD were employed and SPREAD values of 2.49 and 0.4 were found for the settling rate and turbidity, respectively. For these SPREAD values, 20 and 25 neurons were obtained for settling rate and turbidity networks. Figure 7 provides the RBFN structures obtained. Table 5 presents weight w and bias b values for hidden (w 1 , b 1 ) and output layer (w 2 , b 2 ) for settling rate and turbidity, respectively.  Table 5. Settling rate and turbidity weights (w) and bias (b) values from processing data by MATLAB.

Settling Rate Sr
Turbidity T   According to values shown in Table 6, the statistical parameter R 2 resulting from the calibration process was 0.98 and 0.99 for Sr and T, respectively. These values, coupled with other statistical parameters reported in Table 6, corroborate the reliability of the RBFN model in simulating results from the sedimentation process. Figure 8 shows graphically the fitting between experimental data and those predicted by the RBFN model. According to values shown in Table 6, the statistical parameter R 2 resulting from the calibration process was 0.98 and 0.99 for Sr and T, respectively. These values, coupled with other statistical parameters reported in Table 6, corroborate the reliability of the RBFN model in simulating results from the sedimentation process. Figure 8 shows graphically the fitting between experimental data and those predicted by the RBFN model.

Radial Basis Function Network (RBFN) Validation
There are different methods of network validation. These methods mainly depend on the amount of data available. According to Kopal et al. [35], three ways of validation are known. For a small dataset, the following validation method is adequate. The idea of this method is to train the network several times using the following methodology: from a set composed of a number n of samples or points, one of them is omitted, and the neural network is trained; then, the next point is omitted, and the neural network is re-trained; therefore, one point at a time is removed and the network is trained. This process is iteratively performed as long as n subsets of response data are generated. One of them is left for validation; therefore, n − 1 sets of responses are used to calibrate the model, and the remaining one is used for its validation.
The validation results are displayed in Figure 9, where the calculated values (average data) are compared with the last 27th set of data (validation). According to the previously described procedure, the validation for the Settling rate (Sr) and Turbidity (T) have adjusted R 2 of 0.90 and 0.92, respectively.

Radial Basis Function Network (RBFN) Validation
There are different methods of network validation. These methods mainly depend on the amount of data available. According to Kopal et al. [35], three ways of validation are known. For a small dataset, the following validation method is adequate. The idea of this method is to train the network several times using the following methodology: from a set composed of a number n of samples or points, one of them is omitted, and the neural network is trained; then, the next point is omitted, and the neural network is re-trained; therefore, one point at a time is removed and the network is trained. This process is iteratively performed as long as n subsets of response data are generated. One of them is left for validation; therefore, n − 1 sets of responses are used to calibrate the model, and the remaining one is used for its validation.
The validation results are displayed in Figure 9, where the calculated values (average data) are compared with the last 27th set of data (validation). According to the previously described procedure, the validation for the Settling rate (Sr) and Turbidity (T) have adjusted R 2 of 0.90 and 0.92, respectively. According to values shown in Table 6, the statistical parameter R 2 resulting from the calibration process was 0.98 and 0.99 for Sr and T, respectively. These values, coupled with other statistical parameters reported in Table 6, corroborate the reliability of the RBFN model in simulating results from the sedimentation process. Figure 8 shows graphically the fitting between experimental data and those predicted by the RBFN model.

Radial Basis Function Network (RBFN) Validation
There are different methods of network validation. These methods mainly depend on the amount of data available. According to Kopal et al. [35], three ways of validation are known. For a small dataset, the following validation method is adequate. The idea of this method is to train the network several times using the following methodology: from a set composed of a number n of samples or points, one of them is omitted, and the neural network is trained; then, the next point is omitted, and the neural network is re-trained; therefore, one point at a time is removed and the network is trained. This process is iteratively performed as long as n subsets of response data are generated. One of them is left for validation; therefore, n − 1 sets of responses are used to calibrate the model, and the remaining one is used for its validation.
The validation results are displayed in Figure 9, where the calculated values (average data) are compared with the last 27th set of data (validation). According to the previously described procedure, the validation for the Settling rate (Sr) and Turbidity (T) have adjusted R 2 of 0.90 and 0.92, respectively.

Calcium and Magnesium Influence in Settling Rate (Sr) and Turbidity (T)
From the 3D surfaces plotted for different pH values (i.e., 9.3, 10.5, and 11.5) in Figure 10, it can be visibly noticed the variations of Sr (Figure 10a,c,e) and T (Figure 10b,d,f), predicted by the RBNF model as functions of Ca 2+ and Mg 2+ concentrations. The optimal range of the three independent variables can be found by setting as targets the maximization of tailings settling rate and the minimization of the supernatant turbidity.  At pH = 10.5 in Figure 10c, it can be noticed three points of the maximum value for Sr; two of them coincide with the two peaks indicated for pH = 9.3, whereas the third point is placed in correspondence of concentrations of Ca 2+ = 1-12 mg·L −1 and Mg 2+ = 608-875 mg·L −1 . At pH = 10.5, the mine tailings settling rates are, on average, higher than those at pH=9.3. This aspect is due to the different speciation of Ca 2+ and Mg 2+ ions induced by different values of pH. At pH = 9.3, Ca 2+ and Mg 2+ ions mainly are dissolved in an ionized state or form positively charged complexes (i.e., Ca(OH) + and Mg(OH) + ). In both cases, the presence of positive charges on their surface drives them to be adsorbed by the negatively charged polymer flocculant in competition with colloidal solids or also be adsorbed by colloidal solids and stabilize them. For this condition of pH (i.e., 10.5), the area of minimum turbidity is for concentrations of Ca 2+ lower than 251 mg·L −1 and Mg 2+ between 400 and 800 mg·L −1 (Figure 10d). Figure 10e for pH = 11.5 shows a unique maximum peak of Sr at the highest Ca 2+ and lowest Mg 2+ concentration simultaneously. In these conditions of pH, mine tailings settling rate and supernatant turbidity are, on average, both lower than those evaluated at pH = 9.3 and pH = 10.5. Increased Mg 2+ removal leads to a higher sedimentation rate, while Ca 2+ plays a beneficial role within the concentration range. With this, it is suggested that the effort in the treatment of seawater be focused on removing Mg 2+ ions to reduce the presence of solid precipitates, but Ca 2+ does not show harmful effects. However, it is necessary to be careful with the selected treatment, since Jeldres et al. [16] used lime to form the precipitates, which were subsequently removed by vacuum filtration. Although the authors focused on reducing the magnesium content, the remaining calcium concentration was over 2000 ppm. Until now, it is unknown if such a concentration level impacts on the efficiency of the process. In general, the turbidity of the supernatant (Figure 10f) is lower than that obtained at pH 9.3 ( Figure 10b) and 10.5 (Figure 10d), especially the region with the highest magnesium concentration. The lower sedimentation rate leads to better quality clarification. Table 7 summarizes the range of maximum values of Sr and the relative areas of Ca 2+ and Mg 2+ concentrations at different pH. In contrast, Table 8 summarizes the range of minimum values of T and the relative areas of Ca 2+ and Mg 2+ concentrations at different pH. The values of both tables result from the analysis of 3D surfaces in Figure 10.   Table 9 shows, at different pH, the optimal ranges of Ca 2+ and Mg 2+ concentration for optimizing, simultaneously, settling rate and turbidity. To find these optimums, an analysis of the 3D graphics was carried out by selecting areas that have high Sr and low T. In this case, the peaks are areas that meet the requirements (Table 9).  Figure 11 reports the response of five parameters (mine tailings settling rate, turbidity, Cp, % WR, and 10 M NaOH solution volume consumption) for each aqueous medium investigated and three different pH (9.3, 10.5, and 11.5). For instance, in Figure 11a, the values of Sr resulting from four sedimentation tests are reported.  Table 9 shows, at different pH, the optimal ranges of Ca 2+ and Mg 2+ concentration for optimizing, simultaneously, settling rate and turbidity. To find these optimums, an analysis of the 3D graphics was carried out by selecting areas that have high Sr and low T. In this case, the peaks are areas that meet the requirements (Table 9).  Figure 11 reports the response of five parameters (mine tailings settling rate, turbidity, Cp, % WR, and 10 M NaOH solution volume consumption) for each aqueous medium investigated and three different pH (9.3, 10.5, and 11.5). For instance, in Figure 11a, the values of Sr resulting from four sedimentation tests are reported.  In this figure, it can be noticed that the highest Sr values (i.e., 5.4, 5.7, and 5.4 m·h −1 ) were reached independently of pH when BSw was used as the separation medium. The ANOVA analysis indicates significant differences between means of one type of water compared with the others when the Sr is evaluated, thus, obtaining the best results in BSw. This result is reasonable due to the presence of a high concentration of NH 4 + ion ranging from 4000 and 7000 mg·L −1 in the liquid bulk used to produce BSw.
The NH 4 + concentration in the medium is due to urea hydrolysis by urease enzyme from B. subtilis LN8B. Per mole of urea, urease enzyme hydrolyzes urea into one mole of carbonate ion and two moles of ammonium ion. Carbonate ions precipitate as calcium carbonate in the presence of calcium ions from seawater, decreasing its concentration as a soluble ion [18]. On the other hand, NH 4 + ions can remain in solution or form precipitates as struvite or another crystal, helping to reduce the soluble concentration of Mg 2+ from seawater [36]. Soluble ammonium reacting with OHdissolved in water forms NH 3 + and, at the same, reduces the concentration of OHthat, otherwise, would react with Ca 2+ and Mg 2+ to form solid complexes that reduce the performance of polyacrylamides (see Section 3.2).
Focusing the attention on BSw, it can be noticed that residual turbidity (Figure 11b), as well as Cp (Figure 11c) and % WR (Figure 11e), are not significantly affected by pH. A different conclusion is drawn when 10 M NaOH solution is considered: actually, this parameter shows a proportional dependence on pH; this result is expected as NaOH is used to regulate the pH. For CHSw, the highest mine tailings settling rate is reached at pH 10.5; the turbidity decreases with an inverse proportion tendency with pH, even if all results are remarkable, because the residual turbidity is less than 100 FNU; Cp fluctuates between 0.4 and 0.5; % WR ranges between 0.80 and 0.90; NaOH solution is used to modify pH, thus, showing a trend similar to BSw but less outstanding. Sedimentation performance in Tw shows a result independent of pH: the settling rate is approximately constant and equal to 3 m·h −1 ; residual turbidity is the highest at any pH (i.e., over 1000 FNU), thus, proving that salinity promotes the aggregation of colloidal solids; Cp and % WR do not vary significantly with pH and show values similar to those resulting from sedimentation tests in BSw; NaOH consumption to regulate the pH is small, as Tw does not have a buffer effect. Finally, the sedimentation process in Sw is the poorest performing except for residual turbidity: actually, the mine tailings settling rate ranges between 0.5 and 3.6 m·h −1 , decreasing with pH; residual turbidity is the lowest (i.e., less than 20FNU), which agrees with previous works [37]; Cp and % WR do not vary significantly, even if an inverse dependence on pH is noticed; the consumption of NaOH, as already discussed for BSw and CHSw, increases with pH. Interestingly, Tw represented the worst performing aqueous medium to conduct the sedimentation process, as tests carried out with it resulted in the highest residual turbidity coupled with a modest mine tailings settling rate. Table 10 shows the comparison between experimental data resulting from the sedimentation tests conducted in CHSw, BSw, Tw, and Sw with those predicted by the RBFN model that were calibrated with experiments in ASw. It is noticed that there is a high variability between experimental and predicted results for sedimentation tests conducted in BSw, Tw, and Sw. It is highlighted that the effectiveness of CHSw is well predicted by the RBFN model, whereas the effectiveness of BSw is not affected by pH, and those of Tw and Sw are overestimated, since the T for Tw was higher than that predicted, and T for Sw was lower than that predicted.

Conclusions
This work has investigated, by the use of RBFN methodology, the best chemical composition of partial desalinated seawater, in terms of Ca 2+ and Mg 2+ concentration, to optimize the sedimentation process performance. It was found that the optimal ranges of Ca 2+ and Mg 2+ concentration are respectively as follows: 169-338 and 0-130 mg·L −1 at pH 9.3; (ii) 0-21 and 400-741 mg·L −1 at pH 10.5; (iii) 377-418 and 703-849 mg·L −1 at pH 11.5. Furthermore, this study has proved that partial desalinized seawater is more efficient than raw seawater as well as tap water in conducting the sedimentation process for mining purposes. Such results can have a highly positive impact on the environment without depressing the economy, as mining factories could stop using freshwater as well as desalinated seawater to process ores, thus, reducing significantly the environmental as well as financial costs. Partial desalinized seawater needs less production costs than totally desalinated water, even less if pretreated seawater by biomineralization methods is preferred to chemical. Moreover, a partial desalinized water is better performing than seawater for the sedimentation process and causes less damages to pipelines and other devices used for mining purposes. Finally, partially desalinated water could replace completely freshwater currently used by mining factories, thus, preserving this strategic resource.
Author Contributions: G.V. performed the experiments, modeling, analysis of results and writing this article; D.A. participated in devising the presented idea and writing; R.J. analyzed the results of sedimentation assays and writing; A.P. participated in writing this article and editing the English language; M.R. participated in the design of the trials, reviewing this article, and funding acquisition; L.A.C. participated in project administration, modeling, funding acquisition, designing the experiments, and writing this article. All authors have read and agreed to the published version of the manuscript.

Funding:
The authors thanks the support of ANID through Anillo-Grant no. ACM 170005.

Conflicts of Interest:
The authors declare no conflict of interest.