# Classification of Logging Data Using Machine Learning Algorithms
## 3 Method
### Training and Evaluating Machine Learning Models  
The data dump program reads the specified folder containing log data files in xls format. The program generates dataframes of training and test sets of wells from all files. This division into training and test sets is carried out proportionally to the value of the proportion variable. For example, if proportion = 0.1, then it is possible to create a set of test wells that will be represented by different parts of the whole set of wells, each time in the amount of 10% of the whole set. The training set is formed from the remaining 90% of the wells. Therefore, it is possible to implement k-fold cross-validation so that the data of one well are either only in the training set or only in the test set and there is no data leakage. The generated dataframes as data dumps are written to \(\backslash\)ROZ_dumps_2024. The data dump name describes the number of wells used for dump generation (96), the floating window size, the number of the test part from the set S, and the normalization flag. For data classification, we can use a wide range of classifiers available as part of sklearn frameworks [53, 54] and PyCaret [55, 56] or installed separately. Preliminary experiments with SVM showed that SVM works dozens of times slower than the slowest of the algorithms listed in Table 4. The physical nature of SVM must take into account all training data using the kernel (\(\exp(-\mathrm{g}\mid\mathrm{x}-\mathrm{x}^{\prime}\mid\mathrm{1}\,2)\), where \(\mathrm{g}\) is specified by parameter greater than 0), the complexity of the calculation of which depends on the number of input parameters (\(n_{features}\)) and training examples (\(n_{samples}\)). In other words, the time complexity of the O(n) algorithm is between the quadratic \(O\left(n_{features}\times n_{samples}^{2}\right)\) and cubic \(O(n_{features}\times n_{samples}^{3})\) programming problem. As a result, the use of SVM with a window depth greater than 100 is extremely difficult due to a sharp slowdown in operation. The libSVM library allows us to increase the speed of SVM operation with a nonlinear kernel by increasing the cache size. But even in this case, the speed of SVM operation is hundreds of times lower than LightGBT. Figure 4: Well log dataset with floating data window size up\(\_\)w = 5 and dn\(\_\)w = 5. The application of deep learning in many problems gives good results, but preliminary experiments on well logging data from uranium deposits [16] did not reveal any advantages of deep learning over decision tree ensembles (XGBoost, LightGBT). In our opinion, the reason for this is that the interpretation is performed on inaccurate data based either on experts' estimates of different classes or on core data, which are also not 100% reliable in sandy soils. In addition, the application of deep learning usually requires the additional transformation of the input data. Therefore, the application of deep learning, primarily convolutional networks, is considered as a task for future research with the appropriate transformation of the input dataset and conducting large-scale computational experiments. For these reasons, the following classifiers were used in the process of experiments, taking into account the preliminary experience [19]: LGBM, RF, XGB, kNN, DT, MLP, NB, support vector machines with linear kernel (linear SVMs). The UWL dataset was used to solve the lithology classification (LC) and ROZ identification (ROZ) problems. In selecting the main metric for evaluating the classification quality, we considered the following factors:  
1. The dataset is not balanced. It means that the number of objects of different classes in the dataset is different--class 2: 6876; class 1: 35,812;class 8: 28,073 (ROZ). 2. In the ROZ classification task, objects of all three classes are equally important for the researcher.