Electrocardiogram (ECG) can visually reflect the physiological electrical activity of human heart, which is important in the field of arrhythmia detection and classification. To address the negative effect of label imbalance in ECG data on arrhythmia classification, this paper proposes a nested long short-term memory network (NLSTM) model for unbalanced ECG signal classification. The NLSTM is built to learn and memorize the temporal characteristics in complex signals, and the focal loss function is used to reduce the weights of easily identifiable samples. Then the residual attention mechanism is used to modify the assigned weights according to the importance of sample characteristic to solve the sample imbalance problem. Then the synthetic minority over-sampling technique is used to perform a simple manual oversampling process on the Massachusetts institute of technology and Beth Israel hospital arrhythmia (MIT-BIH-AR) database to further increase the classification accuracy of the model. Finally, the MIT-BIH arrhythmia database is applied to experimentally verify the above algorithms. The experimental results show that the proposed method can effectively solve the issues of imbalanced samples and unremarkable features in ECG signals, and the overall accuracy of the model reaches 98.34%. It also significantly improves the recognition and classification of minority samples and has provided a new feasible method for ECG-assisted diagnosis, which has practical application significance.
Current epilepsy prediction methods are not effective in characterizing the multi-domain features of complex long-term electroencephalogram (EEG) data, leading to suboptimal prediction performance. Therefore, this paper proposes a novel multi-scale sparse adaptive convolutional network based on multi-head attention mechanism (MS-SACN-MM) model to effectively characterize the multi-domain features. The model first preprocesses the EEG data, constructs multiple convolutional layers to effectively avoid information overload, and uses a multi-layer perceptron and multi-head attention mechanism to focus the network on critical pre-seizure features. Then, it adopts a focal loss training strategy to alleviate class imbalance and enhance the model's robustness. Experimental results show that on the publicly created dataset (CHB-MIT) by MIT and Boston Children's Hospital, the MS-SACN-MM model achieves a maximum accuracy of 0.999 for seizure prediction 10-15 minutes in advance. This demonstrates good predictive performance and holds significant importance for early intervention and intelligent clinical management of epilepsy patients.
Heart sounds are critical for early detection of cardiovascular diseases, yet existing studies mostly focus on traditional signal segmentation, feature extraction, and shallow classifiers, which often fail to sufficiently capture the dynamic and nonlinear characteristics of heart sounds, limit recognition of complex heart sound patterns, and are sensitive to data imbalance, resulting in poor classification performance. To address these limitations, this study proposes a novel heart sound classification method that integrates improved Mel-frequency cepstral coefficients (MFCC) for feature extraction with a convolutional neural network (CNN) and a deep Transformer model. In the preprocessing stage, a Butterworth filter is applied for denoising, and continuous heart sound signals are directly processed without segmenting the cardiac cycles, allowing the improved MFCC features to better capture dynamic characteristics. These features are then fed into a CNN for feature learning, followed by global average pooling (GAP) to reduce model complexity and mitigate overfitting. Lastly, a deep Transformer module is employed to further extract and fuse features, completing the heart sound classification. To handle data imbalance, the model uses focal loss as the objective function. Experiments on two public datasets demonstrate that the proposed method performs effectively in both binary and multi-class classification tasks. This approach enables efficient classification of continuous heart sound signals, provides a reference methodology for future heart sound research for disease classification, and supports the development of wearable devices and home monitoring systems.