scieee AI-readable full text Open interactive document viewer

Comparative Analysis of Crude Oil and Gas Production Prediction Using Various Machine Learning Models

Saloni Sharma; Dr. Garima Tyagi

Abstract

Accurate forecasting of crude oil and gas production is critical to the strategic planning and operational efficiency of the energy industry. Traditional statistical approaches often fall short in capturing the non-linear and dynamic patterns inherent in petroleum production data. This research paper explores the application of machine learning (ML) and deep learning techniques to predict petroleum and gas production more accurately using historical and geological datasets. The study conducts a comparative analysis of four predictive models—Linear Regression, Random Forest, XGBoost, and LSTM—based on their performance metrics, including R-squared (R²), Mean Absolute Error (MAE), and Root Mean Squared Error (RMSE). The research methodology includes data preprocessing, normalization, model training, and validation using an 80-20 train-test split. The models are evaluated not only in terms of predictive accuracy but also in their ability to handle complex data structures. To enhance practical usability, the models are integrated into an interactive Streamlit dashboard that enables real-time prediction and visualization. Among the evaluated models, LSTM demonstrated superior performance due to its ability to capture time-series dependencies effectively. This paper concludes that deep learning approaches, when combined with interactive analytics tools, offer a robust framework for production forecasting in the energy sector.

Full text

Career Point International Journal of Research (CPIJR) ©2022 CPIJR ǀ Volume 3 ǀ Issue 4 ǀ ISSN: 2583-1895 July-September 2025 | DOI: https://doi.org/10.5281/zenodo.17336310 29 Comparative Analysis of Crude Oil and Gas Production Prediction Using Various Machine Learning Models Saloni Sharma1, Dr. Garima Tyagi2 1Student(BCA) School of Computer Application and Technology, Career Point University, Kota (Raj.), India 2Professor, School of Computer Application and Technology, Career Point University, Kota (Raj.), India Abstract: Accurate forecasting of crude oil and gas production is critical to the strategic planning and operational efficiency of the energy industry. Traditional statistical approaches often fall short in capturing the non-linear and dynamic patterns inherent in petroleum production data. This research paper explores the application of machine learning (ML) and deep learning techniques to predict petroleum and gas production more accurately using historical and geological datasets. The study conducts a comparative analysis of four predictive models—Linear Regression, Random Forest, XGBoost, and LSTM—based on their performance metrics, including Rsquared (R²), Mean Absolute Error (MAE), and Root Mean Squared Error (RMSE). The research methodology includes data preprocessing, normalization, model training, and validation using an 80-20 train-test split. The models are evaluated not only in terms of predictive accuracy but also in their ability to handle complex data structures. To enhance practical usability, the models are integrated into an interactive Streamlit dashboard that enables real-time prediction and visualization. Among the evaluated models, LSTM demonstrated superior performance due to its ability to capture time-series dependencies effectively. This paper concludes that deep learning approaches, when combined with interactive analytics tools, offer a robust framework for production forecasting in the energy sector. Keywords: Crude Oil Prediction, Gas Production Forecasting, Machine Learning, LSTM, Random Forest, XGBoost, Linear Regression, Streamlit Dashboard, Time-Series Analysis, Energy Data, MAE, RMSE, R² Score, Deep Learning, Forecasting Models, Petroleum Industry, Predictive Analytics. Introduction: Career Point International Journal of Research (CPIJR) ©2022 CPIJR ǀ Volume 3 ǀ Issue 4 ǀ ISSN: 2583-1895 July-September 2025 | DOI: https://doi.org/10.5281/zenodo.17336310 30 The oil and gas sector is a fundamental pillar of modern civilization, powering essential services and infrastructure around the globe. With fluctuating demands and global economic pressures, accurate production forecasting has become vital for energy companies striving to maintain operational efficiency and strategic foresight. As the world continues to depend on fossil fuels, improving our ability to forecast production levels has both financial and environmental implications. Traditionally, production forecasting in the petroleum sector relied on statistical methods like regression and time-series analysis. However, these methods struggle to model complex, nonlinear relationships and often fail when faced with real-world data variability. The evolution of machine learning has ushered in a new era where data-driven models can learn patterns from historical and geological data, adapt to unseen inputs, and make accurate predictions over time. Machine learning models such as Random Forest and XGBoost are particularly useful due to their ensemble nature and ability to manage feature interactions. Similarly, deep learning models like Long Short-Term Memory (LSTM) are well-suited for time-series forecasting, offering a way to understand temporal dependencies in production data. These models provide not only accuracy but also scalability and adaptability in ever-changing energy markets. In this research, we evaluate and compare four powerful algorithms—Linear Regression, Random Forest, XGBoost, and LSTM—for their effectiveness in forecasting crude oil and gas production. Real-world datasets including features like flow rate, average pressure, condensate, and water-gas ratio were used to train these models. The project utilizes standard performance metrics—R², MAE, and RMSE—to assess how well each model generalizes to unseen data. A major strength of this research is the integration of model outcomes into an interactive Streamlit dashboard. This tool allows stakeholders to visualize production predictions in real time, select models dynamically, and filter datasets based on their needs. This feature ensures that insights derived from complex ML algorithms are easily accessible and actionable for both technical experts and business managers. Overall, this study emphasizes the potential of machine learning and deep learning models in revolutionizing production forecasting in the petroleum sector. By offering a comparative analysis combined with a practical deployment solution, it presents a holistic approach to datadriven energy management. The outcomes of this research can guide more informed decisionmaking, risk mitigation, and strategic planning in energy operations. Review of Literature: Career Point International Journal of Research (CPIJR) ©2022 CPIJR ǀ Volume 3 ǀ Issue 4 ǀ ISSN: 2583-1895 July-September 2025 | DOI: https://doi.org/10.5281/zenodo.17336310 31 The field of petroleum production forecasting has seen a significant shift with the introduction of machine learning and deep learning methodologies. Traditional models like ARIMA and exponential smoothing, although once standard in production prediction, are now considered limited in their capacity to deal with the complex and non-linear nature of geological data. Recent literature explores the use of advanced algorithms to overcome these challenges. Singh and Sharma (2020) conducted a detailed study on the use of Long Short-Term Memory (LSTM) networks for oil production forecasting. Their research highlighted how LSTM models, due to their memory retention capabilities, outperformed classical time-series models in capturing temporal patterns and long-term dependencies. Their work validated that deep learning can be a more effective alternative for forecasting tasks involving sequential data. Kumar and Patel (2021) expanded on this by performing a comparative analysis of multiple machine learning models, including Random Forest and XGBoost, on energy sector datasets. Their findings supported the use of ensemble learning methods, which showed better generalization capabilities and robustness in modelling noisy, non-linear data commonly found in petroleum production. Several other researchers have contributed to the growing body of knowledge in this domain. Zhang and Jin (2019) focused on the implementation of ensemble models and reported promising results when forecasting oil well performance. Meanwhile, Brownlee (2018) emphasized the importance of combining domain expertise with machine learning frameworks to improve model reliability and interpretability. Moreover, the technical infrastructure supporting this research has evolved. Libraries like Scikit-learn and TensorFlow have become standard tools for implementing, training, and validating ML models. Their extensive documentation and active community support provide the foundation for developing scalable and reproducible models. In this project, these libraries were used to ensure consistency and performance across different modelling techniques. Despite the extensive progress in predictive modelling, a gap remains in translating these complex models into user-friendly platforms that enable real-time interaction and decisionmaking. Most existing studies focus heavily on accuracy and model comparison but do not integrate these insights into usable interfaces. This paper bridges that gap by embedding ML and DL models into a Streamlit dashboard, offering an intuitive, real-time forecasting tool. In summary, the review of literature reveals a consistent trend: machine learning and deep Career Point International Journal of Research (CPIJR) ©2022 CPIJR ǀ Volume 3 ǀ Issue 4 ǀ ISSN: 2583-1895 July-September 2025 | DOI: https://doi.org/10.5281/zenodo.17336310 32 learning models are transforming petroleum production forecasting. However, by coupling them with interactive visual analytics platforms, this project advances both technical accuracy and practical application in the energy industry. Research Gap Identified: Despite numerous studies and existing models for comparative analysis of crude oil and gas production, several important gaps have been identified through an in-depth analysis of previous research: 1. Lack of Real-Time Visualization Tools:- Most existing studies focus solely on model accuracy without integrating predictive outputs into interactive platforms. There's limited work on combining ML models with real-time dashboards for operational decisionmaking. 2. Limited Comparative Studies Across Multiple ML Models:- While individual models like LSTM or Random Forest are widely researched, fewer studies offer a side-by-side comparison of multiple ML and DL algorithms specifically for crude oil and gas production forecasting. 3. Underutilization of Deep Learning for Temporal Patterns:- Traditional ML approaches dominate most petroleum forecasting literature. The potential of deep learning models like LSTM, which are excellent for capturing time-series dependencies, remains underexplored in real-world production datasets. 4. Minimal Feature Engineering and Influencer Analysis:- Existing research often neglects the identification and analysis of key production influencers like CGR, WGR, or pressure variations. Your project highlights these using feature importance analysis from XGBoost. 5. Scalability and Deployment Not Addressed:- Many academic papers stop at model evaluation and fail to discuss deployment in scalable environments. Your work contributes by deploying models through a Streamlit dashboard, offering real-world usability and scalability. Research Objective: The primary objective of this study is to do comparative analysis of crude oil and Gas Production Prediction using machine learning models. To achieve this goal, the study outlines the following specific objectives: 1. To analyze historical crude oil and gas production data to identify key trends, patterns, Career Point International Journal of Research (CPIJR) ©2022 CPIJR ǀ Volume 3 ǀ Issue 4 ǀ ISSN: 2583-1895 July-September 2025 | DOI: https://doi.org/10.5281/zenodo.17336310 33 and correlations influencing production outputs. 2. To apply and compare multiple machine learning and deep learning algorithms (Linear Regression, Random Forest, XGBoost, and LSTM) for forecasting production. 3. To evaluate model performance using appropriate metrics such as R² (coefficient of determination), MAE (Mean Absolute Error), and RMSE (Root Mean Squared Error). 4. To identify the most effective prediction model in terms of accuracy, speed, and scalability for time-series petroleum data. 5. To perform feature importance analysis to determine the most influential variables (e.g., CGR, pressure, WGR) in predicting production. 6. To visualize prediction results and error distributions through advanced graphs like Actual vs. Predicted, Residual plots, and heatmaps. 7. To deploy an interactive dashboard using Streamlit for real-time data upload, model switching, and visual interpretation for stakeholders and decision-makers. Research Methodology:  Dataset Used: o Two real-world datasets were used—one for gas production and one for petroleum flow. These datasets included variables such as Time, Total Flow, Cumulative Flow, Condensate, Water, CGR (Condensate-Gas Ratio), WGR (Water-Gas Ratio), and Average Pressure.  Tools and Technologies Used: o Python 3.x for coding and model development o Jupyter Notebook for data analysis and code execution o Pandas and NumPy for data manipulation o Matplotlib, Seaborn, and Plotly for visualizations o Scikit-learn for implementing Linear Regression and Random Forest o XGBoost for ensemble boosting o TensorFlow and Keras for LSTM (deep learning model) o Streamlit for dashboard creation and deployment  Techniques Applied: o Data Cleaning: Removed null values and duplicates. o Feature Engineering: Derived features from date and flow-related columns Career Point International Journal of Research (CPIJR) ©2022 CPIJR ǀ Volume 3 ǀ Issue 4 ǀ ISSN: 2583-1895 July-September 2025 | DOI: https://doi.org/10.5281/zenodo.17336310 34 o Normalization: MinMaxScaler used for model scaling o Train-Test Split: 80% for training, 20% for testing o Evaluation Metrics: MAE, RMSE, R² for performance measurement o Model Comparison: Compared all four models—Linear Regression, Random Forest, XGBoost, and LSTM o Visualization: Generated prediction vs. actual plots, residuals, and feature importance graphs. o Deployment: Developed an interactive Streamlit app for dynamic model comparison and data upload. Suggestive Framework: Description of the Flowchart Components -  Input Crude Oil and Gas Data: This is the first step where historical data related to crude oil and gas production is collected. This data may include: o Daily/monthly production rates o Temperature, pressure o Well information This dataset is typically stored in a CSV or Excel format and serves as the input for the analysis. Career Point International Journal of Research (CPIJR) ©2022 CPIJR ǀ Volume 3 ǀ Issue 4 ǀ ISSN: 2583-1895 July-September 2025 | DOI: https://doi.org/10.5281/zenodo.17336310 35  Data Preprocessing: Before training models, the raw data needs to be cleaned and prepared: o Handling missing values or null entries o Removing duplicates o Data type conversion o Scaling and normalization This ensures the dataset is clean and suitable for model training.  Feature Extraction: In this step, relevant features (input variables) are selected or engineered: o Identify features that most influence the output (e.g., pressure, flow rate) o Remove irrelevant or redundant columns o Possibly create new features through mathematical combinations These features help improve model accuracy.  ML Models (Linear Regression, Decision Tree, Random Forest, XGBoost): Multiple machine learning models are trained on the dataset: o Linear Regression: For baseline prediction o Decision Tree: For interpretability o Random Forest: For higher accuracy using ensemble learning o XGBoost: For robust and efficient boosting-based prediction These models are compared to find the best-performing one.  Analysis of Prediction: After training the models, their predictions are compared against actual values using: o Graphs (line plots, scatter plots) o Metrics like MAE, RMSE, and R² score This helps understand how well each model performed.  Forecast of Prediction Results: Here, the chosen model is used to forecast future crude oil and gas production values. These predictions are shown in graphs or Career Point International Journal of Research (CPIJR) ©2022 CPIJR ǀ Volume 3 ǀ Issue 4 ǀ ISSN: 2583-1895 July-September 2025 | DOI: https://doi.org/10.5281/zenodo.17336310 36 tables and are useful for decision-making.  Analysis of Prediction Results: The final stage includes: o Comparative analysis of all models o Drawing insights from forecasted values o Interpretation of which features impact production most This step ensures actionable results are derived from the models. Data Analysis & Interpretation: The data analysis and interpretation phase is a vital component of the machine learning pipeline for predicting crude oil and gas production. Once the models—such as Linear Regression, Decision Tree, Random Forest, and XGBoost—generate predictions, these outputs are subjected to rigorous analysis to evaluate their accuracy, reliability, and practical value. 1. Performance Evaluation To understand how well each model performs, we employ various statistical evaluation metrics: o Mean Absolute Error (MAE): Measures the average magnitude of errors in a set of predictions, without considering their direction. o Root Mean Square Error (RMSE): Provides insight into the magnitude of prediction errors and penalizes larger errors more than MAE. o R-squared (R²) Score: Indicates how well the model explains the variability of the target variable. A value closer to 1 means a better fit. These metrics help in quantitatively comparing the performance of different models and in selecting the most effective algorithm for prediction tasks. Career Point International Journal of Research (CPIJR) ©2022 CPIJR ǀ Volume 3 ǀ Issue 4 ǀ ISSN: 2583-1895 July-September 2025 | DOI: https://doi.org/10.5281/zenodo.17336310 37 2. Visual Analysis Beyond numerical metrics, visual tools offer an intuitive understanding of model predictions: o Line graphs compare actual vs predicted values over time to show how closely the model follows real-world trends. o Scatter plots reveal the correlation between observed and predicted values. o Residual plots are used to diagnose errors and detect patterns that might indicate model bias or poor fit. These visualizations help in uncovering underlying trends and highlight where the model might be underperforming.