## 4 Discussion of the Comparison Results  
Method 1: This calculates the mean and standard deviation of the time series data to characterize the signal. The mean value represents the average amplitude of the signal over time. It gives an idea of the central tendency of the signal. The standard deviation quantifies the amount of variation or dispersion in the signal. A small standard deviation indicates that the data points tend to be close to the mean, while a large standard deviation indicates that the data is spread out over a wider range of values. This section, which was based on statistical properties, failed to detect changes in the first example. Therefore, Method 1, which relies on the mean and standard deviation of the signal, may fail to detect changes in certain scenarios due to its sensitivity to outliers and its assumption of Gaussian distribution. In the first example with the synthetic signal, the changes introduced to the signal were random perturbations added to specific time points. These changes were essentially outliers compared to the rest of the signal, which made them detectable using classical statistical techniques such as thresholding based on mean and standard deviation. However, in the second example with the nonlinear signal, the changes are inherent in the signal itself. The signal is a combination of multiple sinusoidal components with varying frequencies, including a nonlinear component (\(0.5 sin(2\pi 20t)^{2}\)). In this case, the changes are not outliers but rather intrinsic features of the signal. Classical statistical techniques based on mean and standard deviation are not suitable for detecting such changes because they are not caused by random perturbations but are part of the signal's structure. To detect changes in signals with intrinsic nonlinearities or complex structures like the one in the second example, more sophisticated techniques may be required. Such methods can capture the dynamic and non-stationary nature of the signal and identify changes based on shifts in frequency content, temporal patterns, or other relevant features. Method 2: The short-time Fourier transform (STFT) is used to analyze the frequency content of the signal as it changes over time. The time series is divided into overlapping segments (windows) to compute the Fourier transform of each segment. This allows us to observe how the frequency content of the signal evolves over time. The output of the STFT is a time-frequency representation (spectrogram), which shows how the amplitude of different frequency components changes over time. It is particularly useful for analyzing non-stationary signals, like EEG, which can exhibit varying frequency content. In the provided examples, the second method attempts to detect changes in the synthetic EEG signal using time-frequency analysis, specifically the Continuous Wavelet Transform (CWT). However, it is important to note that the ability of the CWT to detect changes depends on various factors, including the characteristics of the signal, the choice of the wavelet function, and the threshold applied for change detection. Method 3: This involves the use of a Support Vector Machine (SVM) classifier for change detection in the time series data. Features are extracted from sliding windows of the time series data. In this case, the mean and standard deviation of the signal are used as features. These features are computed for segments of the signal to help the SVM model learn the characteristics of \"normal\" versus \"changed\" states in the signal. The SVM classifier is trained using the extracted features and their corresponding labels (normal/spike). Then the SVM model is created. Once trained, the SVM model predicts labels for the entire time series based on the feature matrix, allowing for the detection of changes over time (in this case, whether spikes or other anomalies are present).