# Data-Driven Analyses of Low Salinity Waterflooding in Carbonates
## 2 Methodology
### Data Analysis Methods  
Machine learning (ML) methods were used to analyze the effect of single and multiple controlling parameters on the incremental oil recovery by LSW. Linear and nonlinear correlations were developed between different independent variables, such as dimensionless rock/fluid properties and oil recovery factor. The correlation coefficients were calculated to quantify the correlation strength. Simple and multivariable linear regression models were applied to analyze the data. Simple linear correlations were developed by the least-squares method, which minimizes the summed squares of the vertical separation between the actual and the predicted recovery factor values from the regression of each independent variable. Multivariable linear regression models were used to study correlation among a group of independent variables and recovery factors. Nonlinear regression methods are more accurate in data analysis because they assume that the relationship between coefficients is not linear, which is more realistic in many cases. Machine learning algorithms (such as decision tree (DT), artificial neural network (ANN), and support vector machine (SVM)) were applied to assess the contribution of different parameters to the LSW effect. Sensitivity analysis was conducted to select the number of simulations, and 5000 simulations were run based on the results of the analysis (Table 3). The best training and testing coefficients were obtained with 5000 simulations for ML models. ANN is based on the analysis of connections between components, which are also known as neurons in input, hidden, and output layers [65]. Variables called weights are assigned to the connections to represent the contribution of the input variables to output [65]. The structure of ANN model was chosen based on the sensitivity analysis (Table 4). Oil/brine parameters based on 500 data entries were used in the analysis. In the ANN used here, 1 hidden layer with 4 neurons was chosen. Coefficient of determination, R2, is the squared correlation coefficient, R. The values of the coefficients vary from 0 to 1, representing a no linear relationship and good linear relationship, respectively. R2 is calculated by:  
\[\text{R}^{2}=1-\frac{\sum_{i=1}^{\text{N}}\left(\text{RF}_{\text{i}}-\text{ RF}_{\text{i}}\right)^{2}}{\sum_{i=1}^{\text{N}}\left(\text{RF}_{\text{i}}- \overline{\text{RF}_{\text{i}}}\right)^{2}} \tag{6}\]  
where RFi is the predicted RF, and RFi is the mean of RF. The DT method is a supervised ML algorithm which is based on a group of nodes called root, decision, and leaf nodes [66]. Each leaf represents a numeric value for an \begin{table}
\begin{tabular}{c c c c} \hline \hline \multirow{2}{*}{**Number of Layers**} & \multirow{2}{*}{**Number of Neurons**} & \multicolumn{2}{c}{**Results**} \\ \cline{3-4}  & & **Training R** & **Testing R** \\ \hline
**1** & 2 & 0.162 & 0.034 \\
**1** & 4 & 0.204 & 0.044 \\
**2** & 2 & 0.150 & 0.017 \\ \hline \hline \end{tabular}
\end{table} 
Table 4: Sensitivity analysis for ANN. \begin{table}
\begin{tabular}{c c c c c c c} \hline \hline \multirow{2}{*}{**Models**} & \multicolumn{5}{c}{**Number of Simulations**} \\ \cline{2-7}  & \multicolumn{2}{c}{**100**} & \multicolumn{2}{c}{**1000**} & \multicolumn{2}{c}{**5000**} \\ \cline{2-7}  & **Training R** & **Testing R** & **Training R** & **Testing R** & **Training R** & **Testing R** \\ \hline SVM & 0.711 & 0.598 & 0.718 & 0.611 & 0.730 & 0.611 \\ DT & 0.678 & 0.657 & 0.685 & 0.613 & 0.687 & 0.628 \\ ANN & 0.751 & 0.527 & 0.759 & 0.592 & 0.754 & 0.593 \\ \hline \hline \end{tabular}
\end{table} 
Table 3: Sensitivity analysis for number of simulations. important independent variable [67]. The SVM model is also a supervised learning method that is used in handling regression and classification problems [67]. This model can fit variables using a nonlinear transformation equation to predict responses of predictor data [68,69].