Skip to main content
. 2023 Oct 11;23(20):8386. doi: 10.3390/s23208386
Algorithm 1: EEG Fatigue Recognition Engine
Input: EES
Output: classification accuracy Acc
1: Begin
2: import EES to python
3: Read the EES and select the signal of two of the channels
4: X EES; H 0.15 Hz; L 40 Hz; D 50 Hz;
5: for each of EES do
6:  PEES = bandpass filtering(X, H, L);
7:  PEES = depressionfiltering(PEES, D);
8: end for
9: for each of PPS do
10:  FF = calculate frequency (fourier transform(PEES));
11:  EF = calculate entropy (PPS);
12: end for
13: train_label, train_data = Select 80% of data(FF + EF);
14: test_label, test_data = Select 20% of data(FF + EF);
14: model = LightGBMtrain (train_label, train_data);
15: classification accuracy as Acc = LightGBMdict(test_label, test_data, model);