# Proposal for a System Model for Offline Seismic Event Detection in Colombia
## 4 Seismic Detection Model Proposal
### Classification Process
To focus on the P-wave dynamics, in the _P-wave picking_ subprocess, the identification of the time where the P-wave arrived is performed. This picking time annotation is commonly found in the Sfiles. Then, in the _Signal synchronization_ subprocess, the picking time obtained in the _P-wave picking_ is used to determine the exact sample where the P-wave arrived, relying on the defined sampling rate used in the _Signals re-sampling_ subprocess, and a standard amount of samples is selected for a homogeneous duration time for each signal component. Therefore, all the signals representing an event start at the same time according to their P-wave time and end at the same time depending on the selected duration time. The last _Pre-processing_ subprocess is the _Windows extraction_ subprocess whose purpose is to extract segments from the signals where the P-wave dynamics are contained and segments where there is no P-wave. The window length in samples is subject to the P-wave picking time and the window duration. A 2-s window is a recommended length [55]. It is necessary to obtain non-P-wave windows as well, since the classification algorithm learns to distinguish between the attributes of a P-wave and the attributes of a non-P-wave signal. Therefore, it is recommended to have the same number of windows concerning P-waves and non-P-waves to avoid class imbalance issues. With the _Window extraction_ subprocess, the dataset of filtered, re-sampled, and synchronized signals associated with the events turns into a windows dataset with two classes, P-wave and non-P-wave, which is a common approach for the binary classification of seismic events. With the window dataset, it is possible to generate a feature dataset that is commonly used by some feature-oriented machine learning techniques. A feature is a description of a record; the seismic events can be statistically described in terms of time, frequency, and non-linearity, among others. The features selection has a huge impact on the classification model's metrics, since they define how the classification algorithm perceives the seismic events. Each event is represented by a set of features in a matrix, and each feature acts as an input to the classification algorithm. The _Pre-processing_ stage differs from feature-based learning algorithms and time-series learning algorithms. The _Signals filtering_, _Signals re-sampling_, and _Signals normalization_ subprocesses may be skipped depending on the time series technique, and some extra processes must be carried out, such as checks for stationarity, correlation, and autocorrelation. It is necessary to indicate the location of the P-wave in the signals (_P-wave picking_) to synchronize the signal's arrival and duration throughout the dataset (_Signals synchronization_) and to determine the characteristics of the moving window (_Window extraction_). The input dataset for a feature-based technique is a set of single values that describes the original P-waves and non-P-waves in the seismic signals. Among the most commonly used machine learning feature-based algorithms applied to P-wave detection are Hidden Markov Models [56], Bayesian Networks [57], Support Vector Machines [58; 59; 60], Logistic Regression [53; 61; 62] and Artificial Neural Networks (ANN) [63; 64; 65; 66; 67; 53; 67]. Conversely, the input dataset for a time-series technique is a set of signals split into P-wave signals and non-P-wave signals. Among the most used time-series forecasting techniques (TTF) for P-wave detection are Autoregressive Integrated Moving Average (ARIMA) [68], Seasonal ARIMA (SARIMA) [69], and ARIMA with Exogenous Regressors (ARIMAX) [70]. Some time-series forecasting recent methods used for P-wave detection include Pure Linear Neural Networks (PLNN) [71] and Polynomial Neural Networks (PNN) [72]. By following the suggested set of subprocesses and using a machine learning algorithm as the ones previously described, the classification process outputs a classification model and a set of metrics associated with that classification model.