{'fraction_non_alphanumeric': 0.029741291505398247, 'fraction_numerical': 0.008148299042574863, 'mean_word_length': 5.087414755114693, 'pattern_counts': {'":': 0, '<': 0, '<?xml version=': 0, '>': 0, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
The Implementation of Machine Learning in Lithofacies Classification using Multi-well Logs Data

– Lithofacies classification is a process to identify rock lithology by indirect measurements. Usually, the classification is processed manually by an experienced geoscientist. This research presents an automated lithofacies classification using a machine learning method to increase computational power in shortening the lithofacies classification process's time consumption. The support vector machine (SVM) algorithm has been applied successfully to the Damar field, Indonesia. The machine learning input is various well-log data sets, e.g., gamma-ray, density, resistivity, neutron porosity, and effective porosity. Machine learning can classify seven lithofacies and depositional environments, including channel, bar sand, beach sand, carbonate, volcanic, and shale. The classification accuracy in the verification phase with trained lithofacies class data reached more than 90%, while the accuracy in the validation phase with beyond trained data reached 65%. The classified lithofacies then can be used as the input for describing lateral and vertical rock distribution patterns.


Introduction
Several years ago, the lithofacies classification used a conventional method that consists of a manual process by an expert geologist, which is very inefficient and time-consuming. Therefore, several alternative approaches to the issue of facies classification from well data have been proposed. Hall (2016) introduced a Geophysical Tutorial where he showed a simple application of machine learning techniques for facies classification with a small dataset of seven wireline logs and associated interpreted facies extracted from ten wells of the H ugoton gas field in southwest Kansas. Several studies, i.e., Zhao et al. (2015), Bestagini et al. (2017), Sidahmed et al. (2017), Bhattacharya and Mishra (2018), explored the usage of machines learning for classifying facies. Rock image classification using a deep convolution neural network has been done by Cheng and Guo (2017). Integrating well log interpretations for lithofacies classification and permeability modeling using probabilistic neural networks (PNNs) has been done by Al-Mudhafar (2017). Saikia et al. (2019) developed reservoir facies classification using Convolutional Neural Networks. The usage of a support vector machine (SVM) for automation of the facies classification process has been conducted by Halotel et al. (2020). This paper describes a study for automatization in classifying lithofacies with a machine learning method that quickly utilizes several well line log data to carry out the lithofacies classification from several well-log data. This machine learning will apply the SVM algorithm for predicting lithofacies. Predictions from these models using both raw and processed log features are then combined and compared with facies labels in a blind well. We applied the lithofacies classification method to the Damar field, Indonesia.

Materials and Methods
The research was conducted from April to September 2020 in Geophysical Laboratory, Geophysics Sub Department, Mathematics and Natural Sciences Faculty, Universitas Gadjah Mada.
We use the data sets from the Damar field, Indonesia, which consist of nineteen (19) wells and a lithofacies label for each depth interval. There are seven classes of lithofacies have been determined manually by geologist according to the petrography and rock cores analysis from the Damar field, i.e., channel (Ch), bar sand (BaS), beach sand (BeaS), carbonate (Cb), volcanic (Vc), coal (Co) and shale (Sh). Table 1 shows well log data availability from the Damar field that was used in this study. We use five logs from each well in this work to predict the lithofacies class, as listed below:  Gamma Ray (GR); Density (RHO); Resistivity (ILD); Neutron Porosity (NPHI); Effective Porosity (PHIE). Among the data sets, eight (8) well log data have lithofacies interpreted manually by the geologists, while eleven (11) well log data have no lithofacies classification. We use these eight (8) well log data that manually interpret lithofacies for training and blind test. We use eleven (11) well log data that have not manually interpreted facies for the automatic prediction implementation phase. The sample of manually interpreted lithofacies and well log data from well BMR-01 is shown in Figure 1. With manually interpreted lithofacies classification, these well-log data will then be used to train machine learning.

Facies Classification Algorithm
This study uses the support vector machine (SVM) algorithm from the Scikit-learn library in a python environment to build facies classification machine learning. The accuracy of the facies prediction has determined the success of the machine learning process. The accuracy of the training and verification test will define the suitable parameter for facies prediction. The input for the machine learning is five logs from each well, e.g., Gamma Ray (GR), Density (RHO), Resistivity (ILD), Neutron Porosity (NPHI), and Effective Porosity (PHIE). The output of this machine is the prediction of the lithofacies log. The lithofacies log comprises lithofacies classes that correspond to the facies classes being trained. The machine learning will then train seven classes of lithofacies, i.e., channel (Ch), bar sand (BaS), beach sand (BeaS), carbonate (Cb), volcanic (Vc), coal (Co), and shale (Sh). Some steps will be undertaken in this implementation, i.e., training or learning phase, verification phase, validation phase, and implementation. The training or learning phase will give the machine knowledge with trained facies classes. The verification phase is a process to test the ability of the machine to predict facies classes when presented with the trained data as the input. The validation phase is a process to test the ability of the device to predict facies classes when given with beyond trained data as the input and comparing their result to the manually interpreted facies classes. The validation phase is often named with a blind test. The implementation phase is done when the trained machine has already been trusted to classify facies classes automatically, and the results could be used for further applications.

Results
The training or learning phase will give the machine knowledge with trained facies classes. Verification to the result of the training phase could be seen as the ability of the machine to predict facies class when given the trained data as the input. The confusion matrix describes the relation between actual facies classes and predicted facies classes. The actual facies classes are trained by machine learning, while the expected facies classes have resulted from machine learning. The confusion matrix in the verification phase is shown in Table 2. The accuracy in the verification phase could reach 90%.
On the other hand, the confusion matrix in the validation phase or blind test is shown in Table 3. The blind test was done by comparing the predicted facies classes with non-trained facies classes data. A blind test was done vertically along with a certain well depth. The accuracy in this validation phase could reach 65%. In addition, the accuracy in the validation phase is often less than the accuracy in the verification phase because, in the validation phase, the machine learning has to process external data that has not been previously trained as the input. Furthermore, the accuracy in the validation phase could be improved by preconditioning the input of the OK log data. Some noises of the well-log data will decrease the accuracy.   Figure 2. and Figure 3 exhibit results of the blind test in the validation phase from BMR-05 and TMR-02 wells. The figures show the well-log data that become the input to the machine learning and display the results of the facies classification. The figures also display the comparison between the predicted facies and the manually interpreted facies. Qualitatively, the vertical lithofacies classified by the machine learning already have a pattern that is close to the manually interpreted lithofacies classification. Visually, the shale and carbonate facies have a higher degree of similarity than the other facies due to the clarity of features within the shale and carbonate facies in the gamma-ray and density log data. The shale facies will have a high value of gamma-ray log and a middle value of the density log. Meanwhile, the carbonate facies will have a low value of gamma-ray log and a high value of the density log. In the TMR-02 log, there is a misclassification between the volcanic and the carbonate facies. This is because the volcanic facies has features that similar to the carbonate facies.

Discussion
The implementation phase is carried out with a degree of confidence in the accuracy of the validation phase or blind test. The implementation phase is carried out to automatically classify lithofacies with the machine learning upon eleven well-log data that have not been manually interpreted. Figure 4. shows well logs and facies results with machine learning classification on BMR-06 and BMR-10 well. Figure 5 shows well logs and facies results with machine learning classification on TMR-07 and TMR-05 well.

Conclusion
In this paper, we proposed machine learning for classifying lithofacies. The proposed method uses a support vector machine (SVM) algorithm and has been applied successfully to Indonesia's Damar field. Machine learning is able to classify seven classes of lithofacies and depositional environments, namely channel, bar sand, beach sand, carbonate, volcanic, and shale. Classified lithofacies using machine learning can be used as an input for describing lateral and vertical rock distribution patterns.