## 2 Method
### Machine Learning Algorithms  
Machine learning algorithms, such as Support Vector Machines (SVMs), learn to distinguish between different classes of data points, including normal and abnormal segments of the signal. SVMs, for example, learns a hyperplane that separates the data points of different classes with the maximum margin. Given a set of training data with labels \((x_{i},y_{i})\), where \(x_{i}\) represents the feature vector of the \(i\)-th data point and \(y_{i}\) represents its class label, SVMs solve the following optimization problem:  
\[\min_{\omega,b,\xi}\frac{1}{2}\left|\omega\right|\right|^{2}+C\sum_{i=1}^{N} \xi_{i} \tag{4}\]  
Subject to:  
\[y_{i}\bigg{(}\omega^{T}x_{i}+b\bigg{)}\geq 1-\xi_{i}, \xi_{i}\geq 0\]  
where \(\omega\) represents the weight vector, \(b\) represents the bias term, \(\xi_{i}\) represents the slack variables, and \(C\) is a regularization parameter. Changes in the signal can be detected based on the classification results of the SVM model.  
Key steps of the Support Vector Machine (SVM) algorithm (see Figure 2) are as follows:  
1. Input data: Receive a set of labeled training examples.
2. Feature mapping: Map input feature vectors to a higher-dimensional space using kernel functions.
3. Optimization objective: Find the optimal hyperplane that maximizes the margin between classes in the transformed space.
4. Soft margin: Introduce a slack variable to allow for misclassification of some data points, balancing margin maximization and classification error minimization.  
Here is a schematic representation of the change detection methods applied to a randomly generated biomedical signal (see Figure 3).  
Figure 3: Schematic representation of change detection methods applied to a biomedical signal. The original biomedical signal (blue curve) is analyzed using three methods: classical statistical techniques,  
Figure 2: Support Vector Machine (SVM) workflow. An SVM classifies data by finding the optimal hyperplane that separates two classes with maximum margin. Kernel functions map data into a higher-dimensional space to improve separability. The soft margin approach allows for some misclassification, balancing accuracy and generalization. The kernel trick efficiently computes dot products in the transformed space. The SVM training process involves solving a convex optimization problem to learn the hyperplane parameters. Once trained, the SVM can predict class labels for new data points based on their distance from the hyperplane.  
Continuous Wavelet Transform (CWT), and Support Vector Machine (SVM). Changes detected by the statistical method are highlighted in the red shaded area, indicating sensitivity to shifts in mean and standard deviation. Changes identified by the CWT method are shown in the green shaded area, demonstrating the method's ability to capture time-frequency variations. The SVM-detected changes are marked by black arrows, showcasing its capability to recognize subtle and complex patterns in the signal. This visualization underscores the varying effectiveness of each method in different contexts of signal complexity and change characteristics.  
The blue curve represents the original signal, which is a combination of multiple sinusoidal components.  
1. Change detected (statistical method): The red shaded area indicates the region where the statistical method detected changes due to shifts in mean and standard deviation.
2. Change detected (CWT method): The green shaded area shows where the Continuous Wavelet Transform (CWT) method detected changes, capturing variations in the time-frequency domain.
3. Change detected (SVM): The black arrows highlight points where the Support Vector Machine (SVM) detected changes, effectively identifying subtle and complex patterns in the signal.