# Ventricular Fibrillation Prediction and Detection: A Comprehensive Review of Modern Techniques
## 2 Modern ECG Signal Processing Techniques for Detection and Prediction of Ventricular Fibrillation
### Machine Learning Algorithms
#### 2.1.1 Supervised Methods  
Supervised methods involve training algorithms on a labeled dataset, where each training example is associated with a label indicating the correct class. in the context of the ECG signal, these labels indicate the presence or absence of ventricular fibrillation. We will explore some of the most commonly used supervised algorithms:  
* Support Vector Machines (SVM): Support vector machines are machine learning algorithms that work by finding an optimal hyperplane that separates the data into two distinct classes. In the case of the ECG signal, SVM can be used to distinguish between normal and abnormal beats associated with ventricular fibrillation. SVM uses kernel functions to transform the data into a higher dimensional space where a linear hyperplane can more easily separate the classes. The Gaussian Kernel (RBF) is commonly used in ECG signal processing due to its ability to handle nonlinear data. SVM optimizes the edge, the distance between the data points of the two classes, and the separating hyperplane. This minimizes the risk of overfitting and improves the generalizability of the model. Examples of works that use SVM in the detection of ventricular fibrillation are [11; 12; 13].  
A robust ventricular fibrillation prediction algorithm using only time-domain and nonlinear features while maintaining a one-minute prediction resolution was proposed in [14]. The authors used nine time-domain features and seven nonlinear features. SVMs with different kernels were used as classifiers. The authors obtained a high accuracy of 94.7% and a sensitivity of 100% by using two HRV features and Gaussian kernel SVM without complicated preprocessing of HRV signals. The advantages of the method are high accuracy and low computational burden, beneficial aspects for the embedded system, and real-time applications, which could help alert people earlier and, thus, improve patient survival chances.  
* Random Forest: Random forest is a classification algorithm that builds multiple decision trees during training and improves accuracy by aggregating their predictions. The bagging (bootstrap aggregating) technique is used to generate training datasets by sampling with replacement, which leads to a reduction in model variance. Random forest provides feature importance measures, allowing the identification of the most relevant features of the ECG signal for ventricular fibrillation detection. Examples of works with random forest are [13; 15; 16].
* k-Nearest Neighbors (k-NN): The k-NN algorithm is a classification method that assigns classes based on the majority class among the k-nearest neighbors of an unknown point. The algorithm uses distance measures, such as Euclidean distance, Hamming distance, Chebyshev distance, and other types of distances, to determine nearest neighbors. We note that the selection of the k value influences the performance of the algorithm; values that are too low can lead to overfitting, while values that are too high can lead to underfitting. Examples of works with KNN are [13; 17]  
In the paper [18], the authors carried out a detailed study on the possibilities of detection and prediction of ventricular fibrillations using features extracted in the time domain, frequency and complexity measures using neural networks and supervised classifiers available in the Matlab 2019 environment in the machine learning toolbox.