# Unconventional Wells Interference: Supervised Machine Learning for Detecting Fracture Hits
## 2 Materials and Methods
### ML Model Development
#### 2.2.2 Data Preparation for ML Model Training  
As shown in Figure 11, the non-temporal data were first transformed into a constant time series, of the same size as the other time-series datasets, and then concatenated and input into the LSTM layer. Additionally, all input and output variables were normalized, so that the model was agnostic of the parameters' physical units. Proper normalization factors, based on the minimum and maximum parameter values that the model ingested (full ranges of pressure, production rates, distance, etc. ), were used to normalize each of the parameters within the range of [0, 1]. To prepare the data for the training and testing of the model, the source data from all 35 wells on Pads 133, 137, and 138 were used. Then, those 35 wells were mixed and matched to generate the binary permutation of wells with repetition, for a total number of 1225 ordered well pairs. Transforming the input data structure into vector data reflects the inherent causality of the communication between the wells within each data vector. A standard time range of 1000 days was used for all training datasets. Each temporal dataset had the time values computed with reference to DOFP at Well ID 137-42006 in Pad 137. All data prior to the reference point were truncated. The LSTM layer's input data had dimensions of (\(m\), \(t\), \(n\)), where the first element, \(m\), is the total number of the datasets in a batch supplied to the model (number of training/validation or testing datasets), the second element, \(t\), is the size of time series, and the third element, \(n\), is the number of input features. For the sample model illustrated in Figures 11 and 12, \(t\) = 1000 and \(n\) = 14. The feature variables were the initial well distance based on a drilling survey, the binary tracking indicator (0 for a non-fracking day and 1 for a fracking day), and the remaining twelve parameters, which were the measured values, interpolated values, time derivatives of the measured values, and time derivatives of the interpolated values for each pressure, as well as the oil and water production measurements. The model output had dimensions of (\(m\), \(t\), \(s\)), in which the first two dimensions are the same as in the model input, and the last dimension, \(s\), is a single output variable for the probability of a frac hit at each time step. To generate training targets for the ML model, the algorithm for computing the frac-hit probability, \(p\_fl\), as a function of the input features was uniformly applied as shown below:  
\[p\_fl=\sum_{k=1}^{n}f(\
u_{k}) \tag{1}\]  
where \(\
u_{k}\) is the \(k\)th input feature, and \(f\) is the probability contribution function of \(\
u_{k}\). The frac-hit probability can thus be computed as a sum of the outputs of individual feature-dependent functions. The following linear function was used to initially approximate the target frac-hit probability, \(P\_fl\):  
\[P\_fl=\sum_{k=1}^{n}c_{k}\
u_{k} \tag{2}\]  
where the coefficients, \(c_{k}\), for the key features related to the frac hits were used in the calculations. After inspecting the available data and manually testing for various coefficients, their non-zero values were estimated as shown in Table 3.  
These values were arrived at by trial and error after extensive review and analysis of the available data and domain-knowledge guidance, with some degree of expert judgement in identifying the frac hit features hidden in the data. Initially, fourteen relevant features were pre-screened and then down-selected to six. The major challenge was the lack of a well-defined frac-hit likelihood measure, especially in low likelihood cases. \begin{table}
\begin{tabular}{c c c c c c c} \hline \hline
**Feature** & \(\mathbf{p}\) & \(\dot{\mathbf{p}}\) & \(\mathbf{O}\) & \(\dot{\mathbf{o}}\) & \(\mathbf{w}\) & \(\dot{\mathbf{w}}\) \\ \hline \(c_{k}\) & 0.1 & 0.8 & 0.01 & 0.04 & 0.01 & 0.04 \\ \hline \hline \end{tabular} Note: See the symbol definitions at the end of the article.  
\end{table}