# Investigation and Optimization of EOR Screening by Implementing Machine Learning Algorithms
## 4 EOR Screening Modeling
### Results and Discussion  
Among these five algorithms, random forest is an ensemble method based on decision trees. After optimization, the SVM algorithm exhibited the lowest modeling accuracy. Consequently, our subsequent analysis will focus on the results obtained from RF, ANNs, and naive Bayes. Table 13 shows the accuracy of classification using optimized parameters. In this study, the ANNs model is more suitable for the training and learning of big data. The Bayesian network model has low classification accuracy due to the phenomenon of classification imbalance. The RF classification model has the highest accuracy. The RF, ANNs, and naive Bayes classification models were evaluated according to the precision, recall, accuracy, and _F1 Score_. Using the hyper-parameter combination found via a random search, the random forest model was established to predict the test set containing 192 samples, where the accuracy increased by 2.61% from 88.54% to 91.15%. After the random forest model determines the combination of hyper parameters via the random search, classes 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, and 11 correspond to steam flooding, combustion, hot water flooding, and CO\({}_{2}\) miscible flooding, CO\({}_{2}\) immiscible flooding, nitrogen miscible flooding, nitrogen immiscible flooding, hydrocarbon miscible flooding, hydrocarbon immiscible flooding, microbial flooding, surfactant flooding, and polymer flooding. The prediction effects of the optimized random forest model, ANNs model, and Bayesian model on the test set are shown in Tables 14-16. The prediction effect of each specific EOR technique is displayed. To express the effect more intuitively, it is visualized via the receiver operating characteristic (ROC) curve and the confusion matrix. \begin{table}
\begin{tabular}{c c c c} \hline \hline
**Parameters** & **Hidden\_Layer\_Sizes** & **Activation** & **Solver** & **Learning\_Rate** & **Alpha** \\ \hline Value & (150,) & tanh & adam & constant & 0.0001 \\ \hline \hline \end{tabular}
\end{table} 
Table 11: Hyper-parameter values of ANNs after random search optimization. \begin{table}
\begin{tabular}{c c c c} \hline \hline
**Parameters** & **C** & **Kernel** & **Gamma** \\ \hline Value & 1000.0 & ’sigmoid’ & 0.001 \\ \hline \hline \end{tabular}
\end{table} 
Table 12: Hyper-parameter values of SVM after random search optimization. \begin{table}
\begin{tabular}{c c c c} \hline \hline  & **RF** & **ANNs** & **SVM** \\ \hline Training set & 98.95\% & 95.03\% & 98.43\% \\ Test set & 91.15\% & 82.29\% & 70.84\% \\ \hline \hline \end{tabular}
\end{table} 
Table 13: Accuracy of different algorithms on training set and test set after optimization. The classification results of the test set are visualized via the ROC curve, as shown in Figures 10-12. It can be seen that the ROC curve of the random forest model performs best, mostly concentrated in the upper left corner, which means the prediction accuracy is good. The conclusion that the test area under the ROC curve (AUC) values are all greater than \begin{table}
\begin{tabular}{c c c c c c} \hline \hline
**Test Set Category** & **Method** & _Precision_ & _Recall_ & _F1 Score_ & **Number** \\ \hline class0 & Steam & 0.95 & 0.86 & 0.90 & 81 \\ class1 & Combustion & 0.00 & 0.00 & 0.00 & 4 \\ class2 & Hot water & 0.00 & 0.00 & 0.00 & 1 \\ class3 & CO\({}_{2}\) miscible & 0.61 & 0.68 & 0.64 & 25 \\ class4 & CO\({}_{2}\) immiscible & 0.44 & 0.27 & 0.33 & 15 \\ class5 & Nitrogen miscible & 0.50 & 1.00 & 0.67 & 1 \\ class6 & Nitrogen immiscible & 0.00 & 0.00 & 0.00 & 1 \\ class7 & Nitrogen immiscible & 0.00 & 0.00 & 0.00 & 38 \\ class8 & Hydrocarbon & & & & \\ class9 & Microbial & 1.00 & 1.00 & 1.00 & 1 \\ class10 & Surfactant & 0.00 & 0.00 & 0.00 & 0 \\ class11 & Polymer & 0.63 & 0.68 & 0.65 & 25 \\ \hline \hline \end{tabular}
\end{table} 
Table 16: Naive Bayes model classification’s _Precision, Recall_, and _F1 Score_.