Ensembles of tree-based machine learning models for electrofacies classification using well log data: a case study from an Iranian oil field
摘要
Electrofacies classification is essential for reservoir characterization, as it links well-log responses to lithological and petrophysical properties. A data-driven workflow was developed for electrofacies classification using routine well logs from an Iranian oil field. The dataset comprised 44,719 depth-indexed data points from eleven wells, using seven routine well logs (Caliper, True Formation Conductivity, Sonic Transit Time, Gamma Ray, Compensated Gamma Ray, Bulk Density, and Neutron Porosity). The preprocessing workflow involved quality screening, missing-value handling, caliper adjustment, selective outlier treatment, and class balancing applied to the training data. Three tree-based classifiers, Random Forest, Extreme Gradient Boosting (XGBoost), and LightGBM, were trained individually and integrated through soft voting and stacking-based ensemble strategies. Generalization was assessed via three blind-test experiments in a leave-one-well-out design, each time training on eight wells and predicting electrofacies in the unseen well. Model performance was evaluated using three complementary metrics: Accuracy, Macro F1-score, and Cohen’s kappa to account for the pronounced class imbalance in the dataset. Based on Macro F1-scores, the hybrid stacking approach achieved values of approximately 50.7, 81.1, and 62.9 for Wells B, E, and H, respectively. Relative to the average performance of the individual tree-based models, hybrid stacking resulted in an approximate improvement of 2–4 percentage points in Wells E and H, while showing a decrease in Well B due to the absence of Type 5 (Anhydrite) in that well, which limits the model’s ability to generalize to all facies classes. These results demonstrate that ensemble learning can enhance electrofacies prediction in typical wells and provide quantitative insights into subsurface heterogeneity. Beyond predictive performance, improved electrofacies classification helps reduce uncertainty in reservoir evaluation, supports more cost-effective development planning, and strengthens operational decision-making. The proposed workflow addresses a key limitation of prior single-algorithm approaches by demonstrating validated cross-well generalization with measurable performance improvements.