| Algorithm 2: ECG Fatigue Recognition Engine |
|
Input: ECS Output: classification accuracy Acc 1: Begin 2: import ECS to python |
| 3: Y ECS; Hi 0.1 Hz; Lo 30 Hz; T 0.3; 4: PECS = bandpass filtering (Y, Hi, Lo); 5: PECS = Trend processing (PECS); 6: QRS_Filter = sin (1.5 , 3.5 15); 7: for each of PECS do 8: SIM = correlate (PECS, QRS_Filter) 9: if SIM > T 10: RI = index (PECS); 11: HF = calculate HRV feature (RI); 12: end if 13: end for 14: train_label, train_data, test_label, test_data = Select 80% of data(HF); 15: test_label, test_data = Select 20% of data(HF); 16: model = LightGBM train (train_label, train_data); 17: classification accuracy as Acc = LightGBM dict (test_label, test_data, model); |