## 3 Materials and Methods
### Regression Models for Well Log Prediction  
As well logs are a visual representation of numerical data for a well interval, regression prediction models were selected for the prediction of the AC log. In accordance with the correlation matrix of the available logs, nine were selected for the training of the machine learning model. As many of the machine learning algorithms cannot be used with categorical variables, One-Hot Encoding was used to transform well names. After including the names and spatial coordinates of wells, 14 features in total were available for building models. The entire dataset is first divided into a training set (learning set) and a model testing set. To evaluate the accuracy of the trained model, the learning set is further divided into a model validation set. This avoids the bias of a model that would be built on only part of the data. For this purpose, K-Means validation was used to ensure that each data point in the learning process was part of the learning set and part of the validation set. Of the total number of values that each variable can take, 30% were used to test the model. A total of 17 regression models were used to predict the acoustic log. The base models were built using a sci-kit learn python package with default hyperparameters [40] (Table 1).  
After the learning process, the accuracy of the algorithm was evaluated (Figure 4). The most common regression performance metrics are the Mean Absolute Error (MAE), the Mean Squared Error (MSE), the Root Mean Squared Error (RMSE), and the coefficient of determination R\({}^{2}\). The performance metrics were calculated according to formulae described in [45], where \(X_{i}\) represents the predicted \(i^{th}\) value, and \(Y_{i}\) is the actual, measured \(i^{th}\) value. The regression models predict the \(X_{i}\) element of the corresponding \(Y_{i}\) element in the measured data.  
\begin{table}
\begin{tabular}{c c c c c c c c c c c c c c c c} \hline \hline  & **ET** & **RF** & **XGB** & **DT** & **KNN** & **LCB** & **MLP** & **GB** & **SVR** & **AB** & **RIDGE** & **KR** & **LR** & **LASSO** & **PLS** & **ELNT** \\ \hline
**RMSE** & 1.61 & 1.95 & 2.64 & 2.77 & 2.81 & 3.44 & 4.08 & 4.13 & 4.66 & 6.51 & 7.88 & 7.88 & 7.88 & 8.80 & 10.17 & 10.83 \\
**R\({}^{2}\)** & 1.00 & 1.00 & 0.99 & 0.99 & 0.99 & 0.99 & 0.98 & 0.98 & 0.98 & 0.96 & 0.94 & 0.94 Each of these parameters has its advantages. MAE is given in the units of the variable values:  
\[MAE=\frac{1}{m}{\sum_{i=1}^{m}}|X_{i}-Y_{i}|, \tag{1}\]  
MSE is used to calculate the loss function:  
\[MSE=\frac{1}{m}{\sum_{i=1}^{m}}(X_{i}-Y_{i})^{2}, \tag{2}\]  
RMSE is used to calculate the learning curve:  
\[RMSE=\sqrt{\frac{1}{m}{\sum_{i=1}^{m}}(X_{i}-Y_{i})^{2}}, \tag{3}\]  
The highest score for MAE, MSE, and RMSE is 0, and the lowest score is +\(\infty\).  
R\({}^{2}\) is used for the indirect assessment of the reliability of predictions (shows how well the regression line describes the data):  
\[R^{2}=1-\frac{{\sum_{i=1}^{m}}(X_{i}-Y_{i})^{2}}{{\sum_{i=1}^{m}}(\overline{Y}- Y_{i})^{2}}, \tag{4}\]  
where the best score is +1 and the worst score is--\(\infty\).  
Figure 4: Predictions of acoustic logs (AC), density logs (DEN), and compensated neutron logs (CN) with an LSTM neural network in well WB, where (**a**) presents the actual predicted values (red) over the measured ones (blue) with the coefficient of determination (R\({}^{2}\)) and root mean squared error (RMSE) as metrics, and (**b**) shows the predicted values in the missing intervals of the training wells.