A method for analyzing and identifying attention-evoked EEG features based on random forest
Through random forest algorithm and wavelet transformation technology, the problems of large number of electrodes and low classification accuracy in EEG signal detection are solved, high accuracy and rapid attention-induced EEG feature detection are achieved, and the practice of EEG signal detection technology is promoted. application.
Patent Information
- Application Number
- CN202211329631.9
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2022-10-27
- Publication Date
- 2024-11-01
- Estimated Expiration
- Not applicable · inactive patent
AI Technical Summary
Among the existing EEG signal detection technology, the number of EEG electrodes is large, the acquisition and preparation process is complex, and the classification accuracy is low, which limits the application of EEG signal detection technology in practice.
Using the random forest-based attention-induced EEG feature analysis and recognition method, through signal preprocessing, wavelet packet energy feature analysis and random forest classification model, combined with wavelet transformation and random forest algorithm, the feature selection steps are reduced, and the detection speed and accuracy are improved. .
High accuracy and high accuracy attention-induced EEG feature detection, significantly improve detection speed, and enhance the practical application ability of EEG signal detection technology.
Smart Images

Figure CN115590533B_ABST
Abstract
Description
Technical Field
[0001] The present invention belongs to the technical field of brain-computer interface and pattern recognition, and specifically relates to a method for analyzing and identifying attention-induced electroencephalogram characteristics based on random forest. Background Art
[0002] Nowadays, the operation of complex systems is increasingly dependent on the operator's brainpower, and the operator's mental load is related to the excessive demand on the neural and cognitive systems. In the operation of complex systems such as transportation, aviation, and nuclear power plants, attention is a key ability required to perform tasks, which affects the alertness, accuracy, and responsiveness of brain functions. In the cognitive process, the operator will be subjected to various mental loads at different operation stages, and different operation stages require the operator to adopt different operation strategies.
[0003] The study of mental workload based on EEG signals has received increasing attention. EEG signals represent the function and state of the brain. Electroencephalogram (EEG) is an electrophysiological monitoring method that directly and non-invasively measures the activity of brain neurons. Due to the correlation between the power spectrum characteristics of different frequency bands and the level of mental workload, EEG is now an effective tool for qualitative and quantitative assessment of mental workload. Current studies have shown that δ reflects sleepiness, θ reflects frustration or mental depression, α reflects a state of quietness and concentration, and β reflects a state of tension, emotion, or excitement. Lal and Craig recruited sleep-deprived participants to complete simulator-driven tasks; the results showed that δ and θ waves increased significantly during fatigue. Subsequently, Eoh found that α, β, β / α, and (α+θ) / β were significantly different in different driving cycles. Ahn collected multimodal data to explore the neurophysiological correlates of mental state and found that β waves in the central frontal region decreased significantly with prolonged driving time. Budi et al. analyzed four EEG features using fast Fourier transform and showed that over time, delta and theta activities were stable, alpha decreased slightly, beta decreased significantly after the alert baseline (fatigue occurred), alpha + theta / beta increased significantly, and alpha / beta increased minimally. In recent years, various methods have been used to distinguish the level of mental workload by EEG patterns and extract relevant EEG rhythms in various situations to derive sensitivity changes. Chai et al. selected 11 frontal electrodes and used PSD based on autoregressive (AR) model to classify mental workload. The impact of 11-channel data was slightly lower, but the processing time was shortened. The study also selected 16 channels using ICA and scalp mapping backprojection, and used PSD to extract features, and then used Bayesian neural network for classification. The accuracy of load and alert classification was 75.5%. Liu et al. used hidden Markov and principal component analysis algorithms to train the model. The classification reduced the feature dimension and increased the detection speed. However, a large number of clues were used to build the model, and only one state of mental fatigue could be distinguished. Wu et al. selected electrodes related to mental fatigue: Fp1, T7, T8, P1, P2, P3, P4, P5, P6, P7 and P8, characterized by power spectrum ratios of (δ+θ) / (α+β), (α+θ) / β, θ / β, α / β, and applied a deep contraction spare automatic contraction coding network to evaluate and identify three types of fatigue levels (working state, sleepiness and excitement), with an average accuracy of 81.5%. Zhang et al. extracted the wavelet entropy, sample entropy and peak-to-peak value of the occipital region using a sliding window, and determined four levels of normal state, mild fatigue and excessive fatigue. Although this method can reduce the number of EEG channels, it has the characteristics of electromyography (EMG) and electrooculography (EOG), which increases the difficulty of practical application. Fahimi et al. proposed a framework based on convolutional neural network (CNN) for detecting attentional mental state from single-channel EEG data, which significantly improved the accuracy of attention detection.Hu et al. fused sample entropy, fuzzy entropy and two other features to distinguish various mental workloads, and the average highest recognition rate of single-channel EEG was 94.0%.
[0004] In the current research on evaluating mental workload, there are many problems such as the large number of EEG electrodes, complex collection and preparation process, and low classification accuracy, which limit the application of EEG signal detection technology in practice. Therefore, considering that the random forest algorithm can handle high-dimensional features without feature selection, and shows strong robustness in many data sets, the classification model constructed based on EEG signal feature analysis can improve the speed and accuracy of attention-induced EEG feature detection. Summary of the invention
[0005] Based on the above technical status, the purpose of the present invention is to provide an attention-induced EEG feature analysis and recognition method based on random forests, so as to improve the speed and accuracy of attention-induced EEG feature detection and provide strong technical support for promoting the practical application of EEG signal detection technology.
[0006] The technical solution adopted by the present invention is as follows: a method for analyzing and identifying attention-induced EEG features based on random forest, comprising the following steps:
[0007] Step 1: EEG signal preprocessing
[0008] (1) Reset the reference electrode
[0009] The reference electrode was set to lead Fz, and the transition was set to the average reference of the bilateral mastoids;
[0010] (2) Removing horizontal and vertical eye electrical signals
[0011] Independent component analysis is used to separate source signals from linear mixed signals of multiple source signals, thereby correcting artifact signals caused by eye blinking;
[0012] (3) Removal of artifacts
[0013] The amplitude threshold method was used to set the threshold range of the amplitude to ±100 μv, with a time interval of 100 ms, and the signal greater than 100 μv within every 100 ms was removed;
[0014] (4) Baseline correction
[0015] Perform baseline correction on the data segment, and the range of baseline correction is set to -300 to 0ms before the mark point;
[0016] (5) Filtering
[0017] A recursive (Infinite Impulse Response, IIR) filter is used for filtering, with a frequency range of 0.1-40Hz and an order set to 4th order.
[0018] Step 2: EEG signal wavelet packet energy feature analysis
[0019] (1) Wavelet basis selection
[0020] The multi-resolution analysis characteristics of wavelet transform are used to decompose the preprocessed EEG signals into multiple scales, thereby extracting five sub-frequency band signals, namely delta (δ: 0-4Hz), theta (θ: 4-8Hz), alpha (α: 8-14Hz), beta (β: 14-30Hz), and gamma (γ: 30-40Hz);
[0021] (2) Implementation of wavelet packet energy analysis algorithm
[0022] ①Convert the time domain EEG signal to the frequency domain and extract 5 sub-band signals. According to the energy conservation principle of wavelet decomposition and reconstruction, the wavelet transform algorithm is used to decompose the EEG signal into 5 independent frequency bands (δ, θ, α, β, γ). When performing wavelet packet decomposition, in order to reduce the time and space complexity, the signal is first downsampled, and the sampling rate of the EEG signal is reduced from 1000Hz to 256Hz;
[0023] ② Calculate the wavelet packet energy. represents the wavelet decomposition coefficient corresponding to the i-th wavelet node in the j-th layer, then the energy value of this node is Then calculate the wavelet packet energy values of the five frequency bands respectively. The wavelet packet energy formula is as follows:
[0024] in represents the energy value of the i-th wavelet node in the j-th layer, represents the wavelet decomposition coefficient corresponding to the i-th wavelet node of the j-th layer, and k represents the compact set of wavelet decomposition;
[0025] ③Calculate the total energy of wavelet packet.
[0026] Calculate the sum of the energy of the five frequency bands, and the wavelet total packet energy formula is as follows:
[0027] E totle =E δ +E θ +E α +E β +E γ
[0028] ④ Calculate the wavelet packet energy of frequency parameters. Calculate the relative wavelet packet energy values of 8 frequency parameters (δ, θ, α, β, γ, α / θ, β / α, θ / β).
[0029] ⑤ Calculate the relative wavelet packet energy mean of each lead at different stages to obtain the wavelet packet energy parameters with statistical significance.
[0030] ⑥ Draw the difference brain topography. When selecting characteristic leads using the brain topography method, the difference method is used to draw the difference brain topography under different states, taking the wavelet packet energy in the initial stage as a reference.
[0031] Step 3: Analysis and identification of attention-evoked EEG features based on random forest
[0032] (1) Bootstrap resampling of training samples to generate multiple new training sample sets
[0033] Randomly select n samples with replacement from n training samples to generate a new training sample set, which may contain duplicate samples;
[0034] (2) Construct a decision tree for each new training sample set. During the decision tree generation process, multiple features are randomly selected from the candidate feature set as candidate features for the current node decision, and the feature that can most effectively divide the training sample is selected from the multiple features;
[0035] (3) Vote on the outputs of multiple decision trees and make decisions based on the principle of majority rule
[0036] Sampling both the training samples and features can ensure the independence of each decision tree and make the voting output more unbiased. The output value of the random forest model is used for effect evaluation, and the least squares method is used to generate a regression tree. The output value of each regression tree is averaged as the final classification result. Assuming that the training sample set is Φ and the output of the regression tree is Rtree(x), the least squares regression tree generation process includes:
[0037] ① Select the optimal segmentation variable f and its segmentation threshold t, and solve the smallest (f, t) pair. The solution formula is as follows:
[0038]
[0039] Among them, x i is the i-th sample in the training sample set, and its label value is y i , R1 and R2 are two division units of the feature space, and C1 and C2 are the output values of R1 and R2 respectively.
[0040] ② Use the (f, t) pair selected in ① to divide the feature space regions R1 and R2 and determine their output values. The solution formula is as follows:
[0041] R1(f,t)={x|x f ≤t},R2(f,t)={x|x f >t}
[0042] N m Represents the total number of feature space regions, μ m Indicates the output value of R1 and R2.
[0043] ③Continue to repeat steps ① and ② for the two sub-areas until the stopping condition is met.
[0044] ④ Divide the feature space into M regions R1', R2', ..., R M ', generate a decision tree, and the solution formula is as follows:
[0045]
[0046] , where μ' m Indicates R1'~R' M Each unit in the is a fixed output value.
[0047] (4) Fusion of models using weighted average of model output values
[0048] The random forest prediction model was constructed using N feature space regional features to obtain N groups of prediction values. The area under the receiver operating characteristic curve (ROC) of the N groups of prediction values was calculated. The prediction values were weighted averaged by the AUC of each group. The weighted average prediction value was recorded as p f (i), the solution formula is as follows:
[0049] p n (i) represents the predicted value of the nth feature space region, AUC n represents the area under the operating characteristic curve of the nth feature space region, i represents the feature space region, and L represents the number of feature space regions.
[0050] Step 4: Model performance test
[0051] The AUC value of the EEG signal feature classification model of each lead is calculated. The more models with a weighted average AUC value greater than 0.5 at a certain lead, and the smaller the P value of the KW test corresponding to the EEG feature, the more sensitive this lead is to attention-induced EEG signals.
[0052] The effects achieved by the present invention are: combining wavelet transform and random forest EEG processing and classification, without the need for feature selection, showing strong robustness, using unbiased estimation for generalized errors, and having strong generalization ability. Experimental verification shows that the model has higher accuracy than other models, is more suitable for the classification of EEG signal changes caused by attention-related factors, and can effectively improve the speed and accuracy of attention-induced EEG feature detection. BRIEF DESCRIPTION OF THE DRAWINGS
[0053] Figure 1 It is a schematic diagram of the overall process of the method of the present invention;
[0054] Figure 2 It is a schematic diagram of the feature analysis and identification process in the method of the present invention;
[0055] Figure 3 It is a wavelet entropy value diagram of the EEG signal when the wavelet base is db3, db5, and db6 in the method of the present invention;
[0056] Figure 4 It is a schematic diagram of the wavelet decomposition process in the method of the present invention;
[0057] Figure 5 It is a test case result diagram based on the method of the present invention. DETAILED DESCRIPTION
[0058] The following is combined with Figure 1-5 The random forest-based attention-induced EEG feature analysis and recognition method of the present invention is further explained.
[0059] Figure 1 It is a schematic diagram of the overall process of the method of the present invention, see Figure 1 The method of the present invention processes the input signal in four steps: signal preprocessing, wavelet packet analysis, feature analysis and feature recognition, and feature classification, and then performs a model performance test. It has been verified that the model has a very high classification accuracy and can significantly improve the speed and accuracy of attention-induced EEG feature detection.
[0060] In the signal preprocessing step of the signal input, the input EEG signal is taken to re-set the reference electrode, remove the horizontal and vertical eye electrical signals, remove the artifacts, correct and filter the EEG signal data, and use a recursive (Infinite Impulse Response, IIR) filter with a frequency range of 0.1-40Hz, the order is set to 4th order, and the range of the data segment baseline correction is set to -300 to 0ms before the marking point. The reference electrode is set to the Fz lead, and the transition is set to the average reference of the bilateral mastoids; the independent component analysis method is used to separate the source signal from the linear mixed signal of multiple source signals, so as to correct the artifact signal caused by blinking to remove the horizontal and vertical eye electrical signals. In the removal of artifacts, correction, and filtering operations, the amplitude threshold method is used to set the threshold range of the amplitude to ±100μv and the time interval to 100ms, so that only the signal within the value range of ±100μv is retained every 100ms, and then the data segment is baseline corrected and filtered.
[0061] Wavelet packet analysis is to perform offline wavelet packet energy feature analysis on multi-lead electroencephalogram (EEG) data, quantify the characteristics of each frequency band energy in different task stages of different lead EEG signals during attention-related tasks, and then analyze the differences in wavelet packet energy features of different frequency bands of each lead EEG signal. Since the eye-closing action has a greater impact on the signals of the FP1 and FP2 leads in the frontal area, the data of FP1 and FP2 are not processed, and the temporal area is mainly related to hearing and is not processed either. Finally, the EEG signal data of 14 leads in the frontal area (F3, Fz, F4), the middle frontal area (FC5, FC6), the central area (C3, Cz, C4), the parietal area (P3, Pz, P4), and the occipital area (O1, Oz, O2) are analyzed in the 32 leads of the EEG signal.
[0062] For the EEG signal data of the 14 leads selected above, the entropy analysis method is used to calculate the wavelet entropy values of the function dbn when the wavelet bases are db3, db5 and db6, see Figure 3 , is the wavelet entropy value diagram of the EEG signal when the wavelet bases are db3, db5, and db6 in the method of the present invention. Finally, db6 is determined as the wavelet base. Then, the time domain EEG signal is converted to the frequency domain, and the multi-resolution analysis characteristics of the wavelet transform are used to perform multi-scale decomposition on the pre-processed EEG signal, thereby extracting 5 independent sub-frequency band signals, such as Figure 4As shown, it is a schematic diagram of the wavelet decomposition process in the method of the present invention. The five extracted sub-frequency bands are delta (δ: 0-4Hz), theta (θ: 4-8Hz), alpha (α: 8-14Hz), beta (β: 14-30Hz), and gamma (γ: 30-40Hz). When decomposing, in order to reduce the time and space complexity, the signal is first downsampled, and the sampling rate of the EEG signal is reduced from 1000Hz to 256Hz.
[0063] Calculate the wavelet packet energy and the total wavelet packet energy, where the wavelet packet energy values of the five sub-frequency bands are calculated respectively. The wavelet packet energy formula is as follows:
[0064] in represents the energy value of the i-th wavelet node in the j-th layer, represents the wavelet decomposition coefficient corresponding to the i-th wavelet node of the j-th layer, and k represents the wavelet decomposition compact set. The time domain signal is decomposed by 7 layers of wavelets, and then the wavelet packet energy values of the 5 sub-frequency bands and the total wavelet packet energy values of the 5 sub-frequency bands are calculated respectively. The formula is as follows:
[0065]
[0066] E totle =E δ +E θ +E α +E β +E γ
[0067] Among them, E totle is the total energy value of the wavelet packet in the five sub-frequency bands, E δ 、E θ 、E α 、E β 、E γ Represent the wavelet packet energy values of the five sub-frequency bands respectively.
[0068] Then, the relative wavelet packet energy values of eight frequency parameters (δ, θ, α, β, γ, α / θ, β / α, θ / β) are calculated based on the wavelet packet energy values of the five sub-frequency bands and the total wavelet packet energy value of the sum of the energies of the five sub-frequency bands.
[0069] The relative wavelet packet energy values are as follows:
[0070]
[0071] Where P δ , P θ , P α , P β , P γ , Pα / θ , P β / α , P θ / β They represent the relative wavelet packet energy values of δ, θ, α, β, γ, α / θ, β / α, and θ / β respectively.
[0072] Based on the above method, the relative wavelet packet energy mean of each lead at different attention-related task stages was calculated.
[0073] When using the brain topography method to select feature leads, the initial stage wavelet packet energy was used as a reference, and the difference method was used to draw the difference brain topography of the attention state (attention state = attention stage wavelet packet energy - resting stage wavelet packet energy) and the selection state (selection state = selection stage wavelet packet energy - attention stage wavelet packet energy).
[0074] Then the third step of the method of the present invention is carried out: feature analysis and feature recognition. Figure 2 , Figure 2 1 is a schematic diagram of the feature analysis and identification process in the method of the present invention, which is specifically introduced as follows.
[0075] A total of n training samples of relative wavelet packet energy features extracted from each lead are bootstrapped and resampled to generate multiple training sample sets, and the new sample sets may contain repeated samples.
[0076] A decision tree is constructed for each new training sample set. During the generation of the decision tree, h features are randomly selected from the candidate feature set as candidate features for the current node decision each time, and the feature that can most effectively divide the training sample is selected from the h features as the classification result.
[0077] The outputs of multiple decision trees are voted on and decisions are made according to the principle of majority rule. The least squares method is used to generate a regression prediction tree, and the output values of each regression prediction tree are averaged as the final classification result. The output of the regression prediction tree is represented as Rtree(x), and the least squares regression tree generation process includes:
[0078] ① Select the optimal segmentation variable f and its segmentation threshold t, and solve the smallest (f, t) pair. The solution formula is as follows:
[0079]
[0080] Among them, x i is the i-th sample in the training sample set, and its label value is y i , R1 and R2 are two partitioned areas of the feature space, and C1 and C2 are the output values of R1 and R2 respectively.
[0081] ② Use the (f, t) pair selected in ① to divide the feature space regions R1 and R2 and determine their output values. The solution formula is as follows:
[0082] R1(f,t)={x|x f ≤t},R2(f,t)={x|x f >t},
[0083] N m Represents the total number of feature space regions, μ m Indicates the output value of R1 and R2.
[0084] ③Continue to repeat steps ① and ② for the two divided regions until the complete regression tree is satisfied.
[0085] ④ Divide the feature space into M regions R1', R2', ..., R' M , generate a decision tree, and the solution formula is as follows:
[0086]
[0087] , where μ' m Indicates R1'~R' M Each unit in corresponds to a fixed output value, M=64.
[0088] The fourth step is to classify features based on AUC values:
[0089] The random forest prediction model is constructed using N feature space regional features to obtain the predicted value. The area under the receiver operating characteristic curve (ROC) (AUC) value of the predicted value is calculated, and the predicted value is weighted averaged by the AUC of each group. The weighted average predicted value is recorded as p f (i) where:
[0090] p n (i) represents the predicted value of the nth feature space region, AUC n represents the area under the operating characteristic curve of the nth feature space region, i represents the feature space region, and L represents the number of feature space regions.
[0091] The present invention uses the "leave one out cross validation method" to establish the attention-evoked EEG feature analysis model. That is, one volunteer is selected as the test sample each time, and the remaining volunteers are used as training samples. The training set is cross-validated ten-fold, and the optimal control parameters of the random forest model are determined by traversal, including the number of decision trees and the number of features randomly sampled when the decision tree branches. Finally, the AUC value is used as the evaluation index of the accuracy of the classification model.
[0092] The present invention selects support vector machine (SVM), convolutional neural network (CNN), gradient boosting decision tree (GBDT), long short-term memory network (LSTM), and Transformer for comparison with the method of the present invention, and the results are shown in Table 1.
[0093]
[0094]
[0095] Table 1 Comparison of results of different algorithms
[0096] The more models with a weighted average AUC value greater than 0.5 at a certain lead, and the smaller the P value of the KW test corresponding to the EEG feature, the more sensitive this lead is to the attention-induced EEG signal. As can be seen from Table 1, the five classification methods can accurately detect different degrees of mental workload, and the classification accuracy of random forest is higher than that of the other three classification methods, which shows the accuracy of EEG feature selection. The CNN method is dominant in excessive fatigue, indicating that CNN is sensitive to excessive mental fatigue and is suitable for small sample EEG recognition. Moreover, LSTM and SVM are more effective than CNN and GBDT. The advantage of CNN is local feature extraction, while LSTM and SVM can effectively capture the global information of EEG signals, which is more competitive for EEG signal classification. On the other hand, the performance of the Transformer model is based on the self-attention mechanism, and its parameters are large, so more data is needed to train and improve generalization ability. The lack of data leads to limited performance and overfitting of methods based on deep learning. It shows that the random forest model of the present invention is the optimal model to avoid overfitting.
[0097] An example of a test of the present invention is Figure 5 As shown. It can be seen that the attention-induced EEG feature analysis and identification method based on random forest proposed in the present invention has the characteristics of high data utilization, fast processing speed, and few lead selections. It is a research hotspot of brain-computer interface and machine learning, and has important application prospects in personnel monitoring of complex operating systems such as aerospace.
[0098] The above is a detailed description of the attention-induced EEG feature analysis and recognition method based on random forest proposed by the present invention, but it is obvious that the scope of the present invention is not limited to this. Various changes to the above embodiments are within the scope of the present invention without departing from the scope of protection defined by the attached claims.
Claims
1. A method for analyzing and identifying attention-induced EEG features based on random forest, comprising the following steps: S1: EEG signal preprocessing Select the EEG signal data of 14 leads, including frontal area: F3, Fz, F4, frontal middle area FC5, FC6, central area: C3, Cz, C4, parietal area: P3, Pz, P4, occipital area: O1, Oz, O2, set the reference electrode of the input EEG signal to the Fz lead, set the conversion to the average reference of the bilateral mastoids, then remove the horizontal and vertical eye electrical signals, remove artifacts, correct, and filter; S2: EEG signal wavelet packet energy feature analysis S2.1 The EEG signal obtained in step S1 is subjected to multi-scale decomposition by using the multi-resolution analysis characteristics of wavelet transform to extract five sub-frequency band signals: δ (δ: 0-4Hz), θ (θ: 4-8Hz), α (α: 8-14Hz), β (β: 14-30Hz), and γ (γ: 30-40Hz); when performing wavelet packet decomposition, the signal is first downsampled, and the sampling rate of the EEG signal is reduced from 1000Hz to 256Hz; S2.2 calculates the wavelet packet energy values of the five sub-frequency bands respectively. The wavelet packet energy formula is as follows: in represents the energy value of the i-th wavelet node in the j-th layer, represents the wavelet decomposition coefficient corresponding to the i-th wavelet node of the j-th layer, and k represents the compact set of wavelet decomposition; The time domain signal is decomposed by 7 layers of wavelet, and then based on the above formula, the wavelet packet energy values of the 5 sub-frequency bands are calculated as follows: Where E δ 、E θ 、E α 、E β 、E γ Represents the wavelet packet energy values of δ, θ, α, β, and γ; S2.3 calculates the sum of the energies of the five sub-frequency bands. The wavelet total packet energy formula is as follows: AND totle =And δ +E θ +E α +E β +E γ S2.4 calculates the relative wavelet packet energy values of the eight frequency parameters δ, θ, α, β, γ, α / θ, β / α, and θ / β as follows: Where P δ , P θ , P α , P β , P γ , P α / θ , P β / α , P θ / β They represent the relative wavelet packet energy values of δ, θ, α, β, γ, α / θ, β / α, and θ / β respectively; S2.5 calculates the relative wavelet packet energy mean of each lead at different stages to obtain the wavelet packet energy parameter with statistical significance; S2.6 uses the brain topography method to select characteristic leads, takes the wavelet packet energy in the initial stage as a reference, and uses the difference method to draw the difference brain topography between the attention state and the selection state; S3: Analysis and identification of attention-evoked EEG features based on random forest S3.1 extracts a total of n training samples of relative wavelet packet energy features on each lead and performs bootstrap resampling to generate multiple training sample sets; S3.2 constructs a decision tree for each new training sample set. During the decision tree generation process, multiple features are randomly selected from the candidate feature set as candidate features for the current node decision, and the feature that can most effectively divide the training sample is selected from the multiple features; S3.3 vote on the outputs of multiple decision trees and make decisions according to the principle of majority rule; S3.4 Fusion of models using weighted average of model output values The random forest prediction models were constructed using the feature space regional features to obtain the predicted values, and the area under the operating characteristic curve (AUC) of the predicted values was calculated. The predicted values were weighted averaged by the AUC of each group.
2. The method for analyzing and identifying attention-induced EEG features based on random forest according to claim 1, further characterized in that: In the above step S1, when removing the horizontal and vertical electrooculogram signals, the independent component analysis method is used to separate the source signal from the linear mixed signal of multiple source signals, so as to correct the artifact signal caused by blinking.
3. The method for analyzing and identifying attention-induced EEG features based on random forest according to claim 2, further characterized in that: In the above step S1, when removing artifacts, the amplitude threshold method is used to set the threshold range of the amplitude to ±100μv, the time interval is 100ms, and the signal greater than 100μv within every 100ms is removed; when performing baseline correction on the data segment, the range of baseline correction is set to -300~0ms before the mark point; then a recursive filter is used for filtering, the frequency range is 0.1-40Hz, and the order is set to 4th order.
4. The method for analyzing and identifying attention-induced EEG features based on random forest according to claim 1, further characterized in that: In the above step S3.2, when constructing the decision tree, the least squares method is used to generate a regression prediction tree. The output of the regression prediction tree is represented by Rtree(x). The least squares regression tree generation process includes: ① Select the optimal segmentation variable f and its segmentation threshold t, and solve the smallest (f, t) pair. The solution formula is as follows: Among them, x i is the i-th sample in the training sample set, and its label value is y i , R1 and R2 are two partitioned regions of the feature space, C1 and C2 are the output values of R1 and R2 respectively; ② Use the (f, t) pair selected in ① to divide the feature space regions R1 and R2 and determine their output values. The solution formula is as follows: R1(f,t)={x|x f ≤t},R2(f,t)={x|x f >t}, N m Represents the total number of feature space regions, μ m Represents the output value of R1 and R2; ③Continue to repeat steps ① and ② for the two divided areas until the complete regression prediction tree is satisfied; ④ Divide the feature space into M regions R'1, R'2, ..., R' M , generate a decision tree, and the solution formula is as follows: where μ' m Indicates R'1~R' M Each unit in the is a fixed output value.
5. The method for analyzing and identifying attention-induced EEG features based on random forest according to claim 1, further characterized in that: In the above step S3.4, the AUC weighted average prediction value is recorded as p f (i) where: p n (i) represents the predicted value of the nth feature space region, AUC n represents the area under the operating characteristic curve of the nth feature space region, i represents the feature space region, and L represents the number of feature space regions.
6. The method for analyzing and identifying attention-induced EEG features based on random forest according to claim 1, further characterized in that: In the wavelet packet energy feature analysis of the EEG signal in the above step S2, the EEG signal data of 14 leads, including the frontal area (F3, Fz, F4), middle frontal area (FC5, FC6), central area (C3, Cz, C4), parietal area (P3, Pz, P4), and occipital area (O1, Oz, O2), are analyzed among the 32 leads of the EEG signal.
7. The method for analyzing and identifying attention-induced EEG features based on random forest according to claim 6, further characterized in that: In the above step S2.1, db6 is used as the wavelet basis, and the wavelet entropy value map of the EEG signal is calculated using the entropy analysis method. Then the time domain EEG signal is converted to the frequency domain, and the pre-processed EEG signal is decomposed into multiple scales using the multi-resolution analysis characteristics of the wavelet transform.
