{'fraction_non_alphanumeric': 0.014678208505833647, 'fraction_numerical': 0.0, 'mean_word_length': 5.181395348837209, '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}}
Application of Machine Learning Algorithm for Predicting Produced Water Under Various Operating Conditions in an Oilwell


 Production optimization is often required to manage increase of undesired reservoir fluids especially water in oil and gas wells. However, this activity needs to be guided by science and data rather than a trial-and-error approach of changing the operating conditions of the well to determine the corresponding production response. Well performance models are often used to predict well behavior at different operating conditions but one of the disadvantages of this method is the inability to predict the water cut based on given well parameters. In this work, we applied the random Forest Regression model, well test data and well performance model to predict the expected water cut while changing the operating conditions of a well.
 We had used four wells to demonstrate the application of machine learning to produced water prediction under different operating conditions. Well performance model which is a combination of Presssure Volume Temperature (PVT) model, inflow performance relationship (IPR) model and vertical lift performance (VLP) model was used to generate the well parameters transferred to the machine learning algorithm. A histogram and box plot were first drawn to understand the distribution of the data and filter the outliers within the dataset because outliers skew the model results. A correlation matrix was now used to understand the relationship between the water cut and the following variables: Flowing Tubing Head Pressure, the Bean Size, the Gas Oil Ratio, and liquid production.
 Thereafter the Random Forest model was applied to the well parameters to get the predicted values. After getting our predicted values from our model, the model results were evaluated with three regression evaluation metrics, the mean absolute error, the mean squared error and the root mean squared error to compare the predicted water cut values with the actual values and return the margin of error in the predictions. The Mean Absolute Error, Mean Squared Error, and Root Mean Squared Error results were within acceptable tolerance. Therefore, given the minimal error values we can conclude that the model can successfully predict water cut values at different operating conditions.
 Based on our evaluation, the bar chart predicted values and actual values showed minimal error margins indicating the model's accuracy can be trusted.
 This paper presents a novel way to estimate the water cut of a well under various operating conditions, a prediction that is not available using existing well performance models.