CN115429273A - Electroencephalogram attention classification method and device, electronic equipment and storage medium - Google Patents

Electroencephalogram attention classification method and device, electronic equipment and storage medium Download PDF

Info

Publication number
CN115429273A
CN115429273A CN202211136549.4A CN202211136549A CN115429273A CN 115429273 A CN115429273 A CN 115429273A CN 202211136549 A CN202211136549 A CN 202211136549A CN 115429273 A CN115429273 A CN 115429273A
Authority
CN
China
Prior art keywords
electroencephalogram
attention
forest
electroencephalogram signals
signals
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Pending
Application number
CN202211136549.4A
Other languages
Chinese (zh)
Inventor
邱丽娜
伍骞
姚佳楠
郑颖诗
邱羽欣
叶晓倩
黄茗
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
South China Normal University
Original Assignee
South China Normal University
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by South China Normal University filed Critical South China Normal University
Priority to CN202211136549.4A priority Critical patent/CN115429273A/en
Publication of CN115429273A publication Critical patent/CN115429273A/en
Pending legal-status Critical Current

Links

Images

Classifications

    • AHUMAN NECESSITIES
    • A61MEDICAL OR VETERINARY SCIENCE; HYGIENE
    • A61BDIAGNOSIS; SURGERY; IDENTIFICATION
    • A61B5/00Measuring for diagnostic purposes; Identification of persons
    • A61B5/16Devices for psychotechnics; Testing reaction times ; Devices for evaluating the psychological state
    • A61B5/168Evaluating attention deficit, hyperactivity
    • AHUMAN NECESSITIES
    • A61MEDICAL OR VETERINARY SCIENCE; HYGIENE
    • A61BDIAGNOSIS; SURGERY; IDENTIFICATION
    • A61B5/00Measuring for diagnostic purposes; Identification of persons
    • A61B5/24Detecting, measuring or recording bioelectric or biomagnetic signals of the body or parts thereof
    • A61B5/316Modalities, i.e. specific diagnostic methods
    • A61B5/369Electroencephalography [EEG]
    • AHUMAN NECESSITIES
    • A61MEDICAL OR VETERINARY SCIENCE; HYGIENE
    • A61BDIAGNOSIS; SURGERY; IDENTIFICATION
    • A61B5/00Measuring for diagnostic purposes; Identification of persons
    • A61B5/24Detecting, measuring or recording bioelectric or biomagnetic signals of the body or parts thereof
    • A61B5/316Modalities, i.e. specific diagnostic methods
    • A61B5/369Electroencephalography [EEG]
    • A61B5/372Analysis of electroencephalograms
    • A61B5/374Detecting the frequency distribution of signals, e.g. detecting delta, theta, alpha, beta or gamma waves
    • AHUMAN NECESSITIES
    • A61MEDICAL OR VETERINARY SCIENCE; HYGIENE
    • A61BDIAGNOSIS; SURGERY; IDENTIFICATION
    • A61B5/00Measuring for diagnostic purposes; Identification of persons
    • A61B5/72Signal processing specially adapted for physiological signals or for diagnostic purposes
    • A61B5/7235Details of waveform analysis
    • AHUMAN NECESSITIES
    • A61MEDICAL OR VETERINARY SCIENCE; HYGIENE
    • A61BDIAGNOSIS; SURGERY; IDENTIFICATION
    • A61B5/00Measuring for diagnostic purposes; Identification of persons
    • A61B5/72Signal processing specially adapted for physiological signals or for diagnostic purposes
    • A61B5/7235Details of waveform analysis
    • A61B5/7253Details of waveform analysis characterised by using transforms
    • A61B5/7257Details of waveform analysis characterised by using transforms using Fourier transforms
    • AHUMAN NECESSITIES
    • A61MEDICAL OR VETERINARY SCIENCE; HYGIENE
    • A61BDIAGNOSIS; SURGERY; IDENTIFICATION
    • A61B5/00Measuring for diagnostic purposes; Identification of persons
    • A61B5/72Signal processing specially adapted for physiological signals or for diagnostic purposes
    • A61B5/7235Details of waveform analysis
    • A61B5/7253Details of waveform analysis characterised by using transforms
    • A61B5/726Details of waveform analysis characterised by using transforms using Wavelet transforms
    • AHUMAN NECESSITIES
    • A61MEDICAL OR VETERINARY SCIENCE; HYGIENE
    • A61BDIAGNOSIS; SURGERY; IDENTIFICATION
    • A61B5/00Measuring for diagnostic purposes; Identification of persons
    • A61B5/72Signal processing specially adapted for physiological signals or for diagnostic purposes
    • A61B5/7235Details of waveform analysis
    • A61B5/7264Classification of physiological signals or data, e.g. using neural networks, statistical classifiers, expert systems or fuzzy systems
    • A61B5/7267Classification of physiological signals or data, e.g. using neural networks, statistical classifiers, expert systems or fuzzy systems involving training the classification device

Abstract

The invention relates to an electroencephalogram attention classification method, an electroencephalogram attention classification device, electronic equipment and a storage medium. The electroencephalogram attention classification method comprises the following steps: acquiring electroencephalogram signals to be classified; preprocessing the electroencephalogram signals to obtain electroencephalogram signals with artifacts removed and power frequency interference removed; extracting the characteristics of the preprocessed electroencephalogram signals to obtain characteristic vectors corresponding to the electroencephalogram signals, wherein the characteristic vectors comprise power spectral density characteristics, differential entropy characteristics and wavelet transformation characteristics; and inputting the feature vector into a trained deep forest network of a cascade structure to obtain the attention classification corresponding to the electroencephalogram signal. The electroencephalogram attention classification method provided by the invention is based on the improved deep forest, improves the algorithm performance in electroencephalogram attention detection, and achieves a better classification effect.

Description

Electroencephalogram attention classification method and device, electronic equipment and storage medium
Technical Field
The invention relates to the technical field of electroencephalogram signal data processing, in particular to an electroencephalogram attention classification method and device, electronic equipment and a storage medium.
Background
Attention refers to the ability of a person's mental activities to point at and concentrate on something, an important psychological quality that people must possess in life and practice. Currently, attention detection methods can be mainly classified into three methods. One method is based on observation of external behaviors such as expressions, postures and the like, and the method depends on manual observation, has strong subjectivity and consumes a large amount of manpower. The second is instrument detection based on facial expression, eye sight and the like, the method monitors the tested external behaviors based on instruments, and provides more objective and accurate attention monitoring results than manual observation, but the method is difficult to distinguish some disguised behaviors, so that real attention is difficult to reflect accurately. The third is based on the detection of physiological signals, such as the attention detection by recording brain nerve activity signals through a brain imaging device, and the method can reflect the attention situation more objectively and accurately and can be used for the attention detection of specific events. Because of the advantages of portability, low cost and the like of electroencephalogram equipment, attention detection based on electroencephalogram signals is a commonly used method at present.
In the attention detection based on the electroencephalogram signal, the traditional method is to extract the electroencephalogram characteristics related to attention for analysis, such as energy or power spectrum of a specific frequency band. Although the method is easy to implement, the difference of the brain electrical energy levels of the brain and the scalp in different states is small, so that the attention is recognized by certain energy characteristics of brain electricity in a certain wave band, and high misjudgment rate can be caused. According to research, in recent years, more and more researches are carried out to classify attention by using a machine learning or deep learning algorithm and obtain good results. The aged people and others apply simulation to analyze and distinguish electroencephalogram signals of 6 subjects under attention and non-attention states, and the accuracy of the deep forest algorithm of the multi-granularity cascade forest on attention state recognition can reach more than 95%.
The deep forest has more stable learning ability for different sample data scales. Meanwhile, the deep forest can have better classification performance under the condition of not setting hyper-parameters. And (3) extracting the original characteristic vector on the electroencephalogram data through a sliding window by using a variable sliding window in the deep forest according to a preset step length. And sending the original characteristic vectors into a first-stage cascade forest, giving a prediction result of each sample, and splicing all the prediction vectors to form the input of a next-stage cascade forest. The cascade forest is generally composed of two different forests, such as a completely random forest and a random forest, in the training process, each tree in each completely random forest and each random forest generates probability distribution related to a category, and then the ratio of the whole forest to the categories can be obtained by averaging the various proportions of all the trees in the forest. And the deep forest simultaneously connects the input data and the output result of the previous layer and then uses the connected result as the input characteristic of the next layer, and the last layer calculates the average value of the three-dimensional vectors output by all the forests and uses the maximum one-dimension as the final output. As shown in fig. 1, fig. 1 is a flow chart of a multi-granularity cascading forest.
As a decision tree integration method, the multi-granularity cascade forest can learn very good characteristics on a small data set, so that higher algorithm precision is obtained. However, the cascaded random forests bring considerable calculation overhead, and meanwhile, the forest also has a situation that the performance of the classifier is not good or certain redundancy exists, so that the complexity of the whole model is too high, and the performance of the algorithm is also limited.
Disclosure of Invention
Based on this, the invention aims to provide an electroencephalogram attention classification method, an electroencephalogram attention classification device, an electronic device and a storage medium, and provides a set of two-channel electroencephalogram attention detection method based on improved deep forests by using an integrated pruning technology based on feature vectorization and quantum walking, so that the algorithm performance in electroencephalogram attention detection is improved, and a better classification effect is achieved.
In a first aspect, the invention provides an electroencephalogram attention classification method, which comprises the following steps:
acquiring electroencephalogram signals to be classified;
preprocessing the electroencephalogram signals to obtain electroencephalogram signals with artifacts removed and power frequency interference removed;
performing feature extraction on the preprocessed electroencephalogram signals to obtain feature vectors corresponding to the electroencephalogram signals, wherein the feature vectors comprise power spectral density features, differential entropy features and wavelet transformation features;
and inputting the feature vectors into a trained deep forest network of a cascade structure to obtain the attention classification corresponding to the electroencephalogram signals.
Further, inputting the feature vector into a trained deep forest network of a cascade structure to obtain an attention classification corresponding to the electroencephalogram signal, including:
extracting an original characteristic vector on the electroencephalogram data through a sliding window by using a variable sliding window according to a preset step length;
sending the original characteristic vectors into a first-stage cascade forest, giving a prediction result of each sample, and splicing all the prediction vectors to form the input of a next-stage cascade forest;
and (4) solving the average value of the three-dimensional vectors output by all the forests in the last layer of cascade forests, and taking the maximum one-dimension as the final output.
Furthermore, the structure of the cascade forest is constructed by an integrated pruning technology based on feature vectorization and quantum migration.
Further, the integrated pruning technology based on feature vectorization and quantum walking comprises the following steps:
vectorizing features of a decision tree in the cascading forest, wherein the features of the decision tree include: number of nodes, depth, and diversity contribution and margin score of the decision tree;
constructing the cascade forest into a weighted graph according to the characteristics of each decision tree in the cascade forest;
according to a continuous time quantum walking algorithm on the graph, selecting a Margin score and a decision tree with diversity contribution larger than a threshold value;
and (4) carrying out ascending order arrangement by using the fraction of quantum walking, and taking the first 35 percent as a final model.
Further, the feature extraction of the preprocessed electroencephalogram signal comprises the following steps:
extracting the characteristic waveforms of 5 frequency bands of the electroencephalogram signals: delta (1-3 Hz), theta (4-7 Hz) alpha (8-13 Hz), beta (14-30) and gamma (30-50 Hz);
carrying out time domain to frequency domain conversion on the characteristic waveforms of the 5 frequency bands through Fourier transform;
respectively extracting two frequency domain characteristics of power spectral density and differential entropy from the characteristic waveforms of the 5 frequency bands subjected to the time-frequency domain conversion;
and extracting wavelet transformation characteristics by adopting a time-frequency analysis method of wavelet transformation.
Further, preprocessing the electroencephalogram signal, including:
carrying out artifact processing by using a filtering means to remove ocular artifacts, myoelectric artifacts and electrocardio artifacts;
and removing power frequency interference by using notch filtering.
Further, acquiring the electroencephalogram signals to be classified, comprising:
acquiring an electroencephalogram signal of a subject by using an ESI NeuroScan system with 32 channels;
the electrode position is placed according to the standard of 10-20;
a ground electrode placed on the subject's forehead with the right mastoid as a reference;
sampling the EEG signal at a frequency of 250 Hz;
during data acquisition, the impedance of all electrodes was kept below 5k Ω.
In a second aspect, the present invention further provides an electroencephalogram attention classification device, including:
the electroencephalogram signal acquisition module is used for acquiring electroencephalogram signals to be classified;
the preprocessing module is used for preprocessing the electroencephalogram signals to obtain electroencephalogram signals with artifacts removed and power frequency interference removed;
the feature extraction module is used for performing feature extraction on the preprocessed electroencephalogram signals to obtain feature vectors corresponding to the electroencephalogram signals, and the feature vectors comprise power spectral density features, differential entropy features and wavelet transformation features;
and the attention classification module is used for inputting the feature vectors into a trained deep forest network of the cascade structure to obtain the attention classification corresponding to the electroencephalogram signals.
In a third aspect, the present invention also provides an electronic device, including:
at least one memory and at least one processor;
the memory to store one or more programs;
when executed by the at least one processor, cause the at least one processor to carry out the steps of a method of electroencephalographic attention classification according to any of the first aspects of the present invention.
In a fourth aspect, the present invention also provides a computer-readable storage medium,
the computer readable storage medium stores a computer program which, when executed by a processor, implements the steps of a method of electroencephalogram attention classification according to any one of the first aspects of the present invention.
The electroencephalogram attention classification method, the electroencephalogram attention classification device, the electronic equipment and the storage medium provided by the invention have the advantages that experimental results obtained by the method also show that the three characteristics of each EEG channel can realize attention detection, and a set of two-channel electroencephalogram attention detection method based on the improved deep forest is provided by using an integrated pruning technology based on characteristic vectorization and quantum walking, so that the algorithm performance in electroencephalogram attention detection is improved, and a better classification effect is achieved. And the accuracy rate of the symmetrical double channels is higher than that of the single channel, so that the classification accuracy rate of attention can be improved by combining the characteristics of the symmetrical double channels of the left and right brains. And the classification accuracy of the cascade forest and the random forest in the symmetrical double channels is the highest, and the classification accuracy is over 80 percent, which shows that the deep forest has higher classification effect on the EEG characteristics after PSD, DE and wavelet transformation.
For a better understanding and practice, the invention is described in detail below with reference to the accompanying drawings.
Drawings
FIG. 1 is a flow chart of a multi-granularity cascade forest;
FIG. 2 is a schematic diagram illustrating steps of an electroencephalogram attention classification method provided by the present invention;
FIG. 3 is a diagram of an electroencephalogram channel of an acquisition device used in one embodiment of the present invention;
FIG. 4 is a diagram of a cascaded forest structure;
FIG. 5 is a schematic diagram of a multi-granularity scan;
fig. 6 is an average classification accuracy of 155 tested EEG single-channel features on vs inattention in attention concentration;
FIG. 7 is the average classification accuracy of 155 subjects tested for vs inattention in concentration vs based on EEG symmetric dual channels;
fig. 8 is the average classification accuracy of 155 subjects tested for resting at vs in attention concentration based on EEG single channel features;
FIG. 9 is the average classification accuracy of 155 subjects tested for resting vs in attention concentration based on EEG symmetric dual channels;
FIG. 10 is the average classification accuracy of 155 subjects tested on resting at inattentive vs based on EEG single channel features;
FIG. 11 is the average classification accuracy for 155 subjects resting on inattention vs based on EEG symmetric dual channels;
fig. 12 is a graph of classification accuracy for attentional concentration vs. inattention, attentional concentration vs. rest, and attentional non-concentration vs. rest based on single channel and symmetric dual channels. Wherein (A) is six kinds of classifiers (Cascade Forest, random Forest, perceptron, K neighbor algorithms K Neighbors, support vector machine classifiers SVC and Decision Tree Decision Tree); (B) Based on Cascade Forest Cascade the classification accuracy of Forest;
fig. 13 is a schematic structural diagram of an electroencephalogram attention classification device provided by the present invention.
Detailed Description
To make the objects, technical solutions and advantages of the present application more clear, embodiments of the present application will be described in further detail below with reference to the accompanying drawings.
It should be understood that the embodiments described are only a few embodiments of the present application, and not all embodiments. All other embodiments obtained by a person of ordinary skill in the art based on the embodiments in the present application without any creative effort belong to the protection scope of the embodiments in the present application.
The terminology used in the embodiments of the present application is for the purpose of describing particular embodiments only and is not intended to be limiting of the embodiments of the present application. As used in the examples of this application and the appended claims, the singular forms "a", "an", and "the" are intended to include the plural forms as well, unless the context clearly indicates otherwise. It should also be understood that the term "and/or" as used herein refers to and encompasses any and all possible combinations of one or more of the associated listed items.
When the following description refers to the accompanying drawings, like numbers in different drawings represent the same or similar elements unless otherwise indicated. The embodiments described in the following exemplary embodiments do not represent all embodiments consistent with the present application. Rather, they are merely examples of apparatus and methods consistent with certain aspects of the application, as detailed in the claims that follow. In the description of the present application, it is to be understood that the terms "first," "second," "third," and the like are used solely for distinguishing between similar elements and not necessarily for describing a particular sequential or chronological order, nor is it to be construed as indicating or implying relative importance. The specific meaning of the above terms in the present application can be understood by those of ordinary skill in the art as appropriate.
Further, in the description of the present application, "a plurality" means two or more unless otherwise specified. "and/or" describes the association relationship of the associated object, indicating that there may be three relationships, for example, a and/or B, which may indicate: a exists alone, A and B exist simultaneously, and B exists alone. The character "/" generally indicates that the former and latter associated objects are in an "or" relationship.
To solve the problems in the background art, an embodiment of the present application provides an electroencephalogram attention classification method, as shown in fig. 2, the method includes the following steps:
s01: acquiring the electroencephalogram signals to be classified.
In one particular embodiment, the brain electrical signals acquired by the present invention are collected using a 32-channel ESI NeuroScan System (composites, neuroScan, inc., australia). The electrode locations were placed according to the 10-20 standard, as shown in FIG. 3. In which brain electrical signals are recorded in 30 channels, comprising 12 pairs of symmetric electrodes (Fp 1-Fp2, F7-F8, F3-F4, FT7-FT8, FC3-FC4, T7-T8, P7-P8, C3-C4, TP7-TP8, CP3-CP4, P3-P4, O1-O2) and 6 medial axis electrodes (Fz, FCz, cz, CPz, pz, oz). A1 and A2 are reference electrodes. With reference to the right mastoid, the ground electrode was placed on the subject's forehead. The electroencephalogram signal of the item is sampled at the frequency of 250 Hz. During data acquisition, the impedance of all electrodes was kept below 5k Ω.
S02: and preprocessing the electroencephalogram signals to obtain the electroencephalogram signals with artifacts removed and power frequency interference removed.
Specifically, the method comprises the following steps:
s021: and (3) performing artifact processing by using a filtering means to remove ocular artifacts, myoelectric artifacts and electrocardio artifacts.
The electroencephalogram signals are very weak, the amplitude is very small, the electroencephalogram signals are usually in a microvolt level, and the electroencephalogram signals are easily interfered by other signals irrelevant to the electroencephalogram activity, and the irrelevant signals are artifacts. Common artifacts mainly include ocular artifacts, myoelectrical artifacts and electrocardiographic artifacts. The original waveform is down-sampled, the original sampling frequency is 1000Hz, the down-sampling is carried out to 250Hz, the electroencephalogram signal is in the range of 1-50Hz, at the moment, the electro-oculogram signal and the electromyogram signal have obvious interference on the electroencephalogram, and the artifact processing is required to be carried out through a filtering means.
S022: and (4) removing power frequency interference by using notch filtering.
The power frequency interference is generally 50Hz, and when the impedance is higher due to grease, dirt, too thick horny layer and the like of the tested scalp, the power frequency interference is more easily introduced. The extremely high frequency is expressed as a whole in the time domain, so that the signal looks like a whole block, the details of the signal are submerged, and the notch filtering can be used for removing power frequency interference during data processing.
S03: and performing feature extraction on the preprocessed electroencephalogram signals to obtain feature vectors corresponding to the electroencephalogram signals, wherein the feature vectors comprise power spectral density features, differential entropy features and wavelet transformation features.
The method extracts the power spectral density characteristic (PSD), the differential entropy characteristic (DE) and the wavelet transformation characteristic of two symmetric channels of the electroencephalogram signal, and classifies based on the characteristic sets. The power spectrum is the power of the signal in the unit frequency band and represents the distribution condition of the electroencephalogram signal power on different frequency bands. The differential entropy is the generalization of shannon information entropy on continuous variables and is used for measuring the complexity of continuous random variables.
In a preferred embodiment, performing feature extraction comprises the sub-steps of:
s031: extracting the characteristic waveforms of 5 frequency bands of the electroencephalogram signals: delta (1-3 Hz), theta (4-7 Hz), alpha (8-13 Hz), beta (14-30) and gamma (30-50 Hz);
s032: carrying out time domain to frequency domain conversion on the characteristic waveforms of the 5 frequency bands through Fourier transform;
s033: and respectively extracting two frequency domain characteristics of power spectral density and differential entropy from the characteristic waveforms of the 5 frequency bands subjected to time-frequency domain conversion.
Power spectral density feature (PSD): this project calculates the time domain signature and the non-overlapping hanning window windowed for 1s by dividing the EEG signal into 1s sample slices, using short-time fourier transform, and then calculates the differential entropy signature by using the logarithm of the PSD over 5 bands, where the PSD calculation is based on the following formula:
Figure BDA0003852344830000061
wherein Rx (m) is an autocorrelation function of an infinite-length random sequence x (N) with a truncated length N changed into a finite-length sequence XN (N), and ejw is a negative exponential signal of a harmonic relation.
Differential entropy signature (DE): the project measures the complexity of continuous random variables by extracting the characteristic differential entropy of the popularization of the Shannon information entropy on the continuous variables. The project is based on the Gaussian feature of the brain electricity, and the DE feature of each frequency band is calculated by using the following formula:
DE=-∫ a b p(x)log(p(x))dx
wherein, p (x) represents the probability density function of continuous information, and [ a, b ] represents the interval of information value, and the differential entropy of a section of EEG signals with specific length and approximately complying with Gaussian distribution is [46,50].
S034: and extracting wavelet transform characteristics by adopting a time-frequency analysis method of wavelet transform.
Specifically, the problem that the overall transformation of Fourier transformation is not affected by time resolution and other defects is overcome by extracting wavelet transformation characteristics, and the signals are decomposed into two-dimensional time-frequency signals for time domain and image signal processing and data compression. The brain electricity calculation formula is as follows:
Figure BDA0003852344830000071
where ψ is a wavelet basis function, a is a scale factor, and τ is a translation factor.
The project uses 1s electroencephalogram characteristics as samples, and PSD characteristics, DE characteristics and wavelet characteristics of five frequency bands are calculated respectively. After calculating the electroencephalogram features of each frequency band, 15 feature values of 5 frequency bands are obtained by calculating the variance on each frequency band, namely 5 × 3=15,5 are five frequency bands, and 3 are three types of features.
S04: and inputting the feature vectors into a trained deep forest network of a cascade structure to obtain the attention classification corresponding to the electroencephalogram signals.
In a preferred embodiment, the following sub-steps are included:
s041: and extracting the original characteristic vector on the electroencephalogram data through a sliding window by using a variable sliding window according to a preset step length.
S042: and sending the original characteristic vectors into a first-stage cascade forest, giving a prediction result of each sample, and splicing all the prediction vectors to form the input of a next-stage cascade forest.
S043: and (4) solving the average value of the three-dimensional vectors output by all the forests in the last layer of cascade forests, and taking the maximum one-dimension as the final output.
And classifying the attention electroencephalogram data by adopting an improved deep forest algorithm. And preprocessing input features by using multi-granularity scanning, and inputting the obtained feature vectors into an improved deep forest for training, wherein an integrated pruning technology based on feature vectorization and quantum walking is used for improving a deep forest algorithm.
In the project, the deep forest adopts a cascade structure. Fig. 4 shows a structure diagram of a cascade forest, and it can be seen from the diagram that the cascade forest is actually a classifier based on an integrated structure, which is an integrated integration. The cascade forest generally consists of two different forests, the solid line part of the figure 4 shows a completely random forest, and the completely random forest randomly selects features from all feature spaces to split; the dotted line of fig. 4 shows a random forest, which is a random feature subspace with split nodes selected by the kini coefficients.
FIG. 5 shows a schematic diagram of a multi-granularity scanning process, using a variable sliding window, to extract an original feature vector on electroencephalogram data through the sliding window according to a preset step length. And sending the original characteristic vectors into a first-stage cascade forest, giving a prediction result of each sample, and splicing all the prediction vectors to form the input of a next-stage cascade forest.
In a preferred embodiment, the structure of the cascade forest is constructed by an integrated pruning technology based on feature vectorization and quantum walking.
S11: vectorizing features of a decision tree in the cascading forest, wherein the features of the decision tree include: number of nodes, depth of decision tree, and diversity contribution and margin score.
The margin score is an index for comprehensively considering the generalization performance and the classification performance of the model, and the calculation formula of the margin score is as follows:
Figure BDA0003852344830000081
Figure BDA0003852344830000082
where the formula assumes that the dataset D = { (xi, y) ii =1,2, ·, N }, and the set H has an M-based classifier H = { H, lj =1,2, ·, M }. The margin of each sample is then defined as eq. (1). Where v is the number of classifiers that correctly classify sample X, M is the total number of classifiers in ensemble H, and I (×) is an indicator function.
S12: and constructing the cascading forest into a weighted graph according to the characteristics of each decision tree in the cascading forest.
Specifically, each tree in the forest is taken as a node, the characteristics of the tree are taken as node characteristics, cosine similarity between the two trees is taken as the weight of an edge, and the connection between the nodes is described through a weight matrix, namely, the individual forest is abstracted into a weighted graph.
S13: according to a continuous time quantum walking algorithm on the graph, a Margin score and a decision tree with diversity contribution larger than a threshold value are selected.
S14: and (5) carrying out ascending order arrangement according to the quantum walking fraction, and taking the first 35% as a final model.
And (4) analyzing results:
the invention mainly researches attention detection based on EEG single channel and symmetric double channel brain features, including distinction of attention task, attention-deficit task and rest. PSD (phase-sensitive Detector) features, DE (DE) features and wavelet features of each channel of the EEG are mainly extracted, and based on the feature sets, an improved Cascade Forest Cascade Forest and Random Forest algorithm is used for classification.
Fig. 6 illustrates the six classifiers for the dichotomy of the attentive and inattentive tasks, based on the tested average accuracy of the individual single-channel features, it can be seen that, in each classifier used, the Cascade of Forest Cascade Forest, the Random Forest has higher classification performance than other classifiers.
Fig. 7 shows the mean accuracy of the six classifiers in the classification of attention-focused and unfocused, based on the tested average accuracy obtained for 8 pairs of left-right symmetric EEG channels, the classification accuracy of the Cascade Forest Cascade Forest and Random Forest is the highest. Comparing the results in the table A-1 and the table A-2, the accuracy based on double channels is improved compared with that of a single channel, and the classification precision of the tasks of concentrating attention and vs not concentrating attention is improved by combining the symmetrical double channels of the left brain and the right brain.
The results of the classification of attention concentration and rest states based on a single channel are shown in figure 8, the classification performance of Cascade Forest Cascade Forest and Random Forest is optimal.
The classification results of the attention focusing and rest states based on the bilaterally symmetric dual channels are shown in fig. 9, and the accuracy based on the dual channels is improved compared with that of a single channel.
In the classification of inattentive and resting states, the classification results based on single pass and symmetric double pass are shown in fig. 10 and 11, respectively. The Cascade Forest Cascade Forest and Random Forest both perform the best in classification based on single channel and double channel.
As shown in fig. 12 (a), in the dichotomy of the three states of attention-focused vs. inattention, attention-focused vs. rest, and attention-unfocused vs. rest, we found that the accuracy based on symmetric dual channels was higher than that of single channel.
The embodiment of the present application further provides an electroencephalogram attention classification device, as shown in fig. 13, the electroencephalogram attention classification device 400 includes:
an electroencephalogram signal acquisition module 401, configured to acquire an electroencephalogram signal to be classified;
the preprocessing module 402 is configured to preprocess the electroencephalogram signal to obtain an electroencephalogram signal with artifacts removed and power frequency interference removed;
a feature extraction module 403, configured to perform feature extraction on the preprocessed electroencephalogram signal to obtain a feature vector corresponding to the electroencephalogram signal, where the feature vector includes a power spectral density feature, a differential entropy feature, and a wavelet transform feature;
and the attention classification module 404 is configured to input the feature vector into a trained deep forest network of a cascade structure to obtain an attention classification corresponding to the electroencephalogram signal.
For the device embodiments, since they substantially correspond to the method embodiments, reference may be made to the partial description of the method embodiments for relevant points. The above-described embodiments of the apparatus are merely illustrative, wherein the units described as separate parts may or may not be physically separate, and the parts shown as units may or may not be physical units. It is clear to those skilled in the art that, for convenience and brevity of description, the specific working processes of the above-described systems, apparatuses and units may refer to the corresponding processes in the foregoing method embodiments, and are not described herein again.
An embodiment of the present application further provides an electronic device, including:
at least one memory and at least one processor;
the memory to store one or more programs;
when executed by the at least one processor, cause the at least one processor to implement the steps of a method of electroencephalogram attention classification as previously described.
For the apparatus embodiment, since it substantially corresponds to the method embodiment, reference may be made to the partial description of the method embodiment for relevant points. The above-described device embodiments are merely illustrative, wherein the components described as separate parts may or may not be physically separate, and the parts displayed as units may or may not be physical units, may be located in one place, or may be distributed on a plurality of network units. Some or all of the modules can be selected according to actual needs to achieve the purpose of the scheme of the disclosure. One of ordinary skill in the art can understand and implement without inventive effort.
Embodiments of the present application also provide a computer-readable storage medium,
the computer readable storage medium stores a computer program which, when executed by a processor, implements the steps of a method of electroencephalogram attention classification as previously described.
Computer-usable storage media include permanent and non-permanent, removable and non-removable media, and information storage may be implemented by any method or technology. The information may be computer readable instructions, data structures, modules of a program, or other data. Examples of the storage medium of the computer include, but are not limited to: phase change memory (PRAM), static Random Access Memory (SRAM), dynamic Random Access Memory (DRAM), other types of random access memory (rram), read only memory (ro M), electrically Erasable Programmable Read Only Memory (EEPROM), flash memory or other memory technologies, compact disc read only memory (CD-ROM), digital Versatile Discs (DVD) or other optical storage, magnetic cassettes, magnetic tape magnetic disk storage or other magnetic storage devices, or any other non-transmission medium, which may be used to store information that may be accessed by a computing device.
Compared with the traditional adaptive algorithm for selecting the resolution through traversal, the electroencephalogram attention classification method, the electroencephalogram attention classification device, the electronic equipment and the storage medium provided by the invention reduce the time complexity through a binary search mode, and do not influence the precision of a filtering result. Between 200 frames and 300 frames of the experimental data, the number of the common grid filtering points is less than 100, and the adaptive algorithm reaches more than 150, so that the stability of the adaptive grid filtering method is preliminarily proved. The variance of the adaptive filtering algorithm is obviously smaller than that of the common filtering algorithm, the performance is more stable, and the front-end registration is favorably carried out subsequently.
The above-mentioned embodiments only express several embodiments of the present invention, and the description thereof is specific and detailed, but not to be understood as limiting the scope of the invention. It should be noted that various changes and modifications can be made by those skilled in the art without departing from the spirit of the invention, and these changes and modifications are all within the scope of the invention.

Claims (10)

1. An electroencephalogram attention classification method is characterized by comprising the following steps:
acquiring electroencephalogram signals to be classified;
preprocessing the electroencephalogram signals to obtain electroencephalogram signals with artifacts removed and power frequency interference removed;
extracting the characteristics of the preprocessed electroencephalogram signals to obtain characteristic vectors corresponding to the electroencephalogram signals, wherein the characteristic vectors comprise power spectral density characteristics, differential entropy characteristics and wavelet transformation characteristics;
and inputting the feature vectors into a trained deep forest network of a cascade structure to obtain the attention classification corresponding to the electroencephalogram signals.
2. The electroencephalogram attention classification method according to claim 1, wherein the step of inputting the feature vectors into a trained deep forest network of a cascade structure to obtain the attention classification corresponding to the electroencephalogram signals comprises the following steps:
extracting an original characteristic vector on the electroencephalogram data through a sliding window by using a variable sliding window according to a preset step length;
sending the original characteristic vectors into a first-stage cascade forest, giving a prediction result of each sample, and splicing all the prediction vectors to form the input of a next-stage cascade forest;
and (4) solving the average value of the three-dimensional vectors output by all the forests in the last layer of cascade forests, and taking the maximum one-dimension as the final output.
3. The electroencephalogram attention classification method according to claim 2, characterized in that:
the structure of the cascade forest is constructed by an integrated pruning technology based on feature vectorization and quantum migration.
4. The method of claim 3, wherein an integrated pruning technique based on feature vectorization and quantum walking comprises:
vectorizing features of a decision tree in the cascading forest, wherein the features of the decision tree include: number of nodes, depth, and diversity contribution and margin score of the decision tree;
constructing the cascade forest into a weighted graph according to the characteristics of each decision tree in the cascade forest;
according to a continuous time quantum walking algorithm on the graph, a Margin score and a decision tree with diversity contribution larger than a threshold value are selected;
and (4) carrying out ascending order arrangement by using the fraction of quantum walking, and taking the first 35 percent as a final model.
5. The electroencephalogram attention classification method according to claim 1, wherein the feature extraction of the preprocessed electroencephalogram signal comprises:
extracting characteristic waveforms of 5 frequency bands of the electroencephalogram signals: delta (1-3 Hz), theta (4-7 Hz), alpha (8-13 Hz), beta (14-30) and gamma (30-50 Hz);
carrying out time domain to frequency domain conversion on the characteristic waveforms of the 5 frequency bands through Fourier transform;
respectively extracting two frequency domain characteristics of power spectral density and differential entropy from the characteristic waveforms of the 5 frequency bands subjected to the time-frequency domain conversion;
and extracting wavelet transformation characteristics by adopting a time-frequency analysis method of wavelet transformation.
6. The electroencephalogram attention classification method according to claim 1, wherein preprocessing the electroencephalogram signals comprises:
carrying out artifact processing by using a filtering means to remove ocular artifacts, myoelectric artifacts and electrocardio artifacts;
and (4) removing power frequency interference by using notch filtering.
7. The electroencephalogram attention classification method according to claim 6, wherein the step of obtaining electroencephalogram signals to be classified comprises the following steps:
acquiring an electroencephalogram signal of a subject by using a 32-channel ESINeuroScan system;
the electrode position is placed according to the standard of 10-20;
a ground electrode placed on the subject's forehead with the right mastoid as a reference;
sampling the EEG signal at a frequency of 250 Hz;
during data acquisition, the impedance of all electrodes was kept below 5k Ω.
8. An electroencephalogram attention classification device, comprising:
the electroencephalogram signal acquisition module is used for acquiring electroencephalogram signals to be classified;
the preprocessing module is used for preprocessing the electroencephalogram signals to obtain electroencephalogram signals with artifacts removed and power frequency interference removed;
the feature extraction module is used for performing feature extraction on the preprocessed electroencephalogram signals to obtain feature vectors corresponding to the electroencephalogram signals, and the feature vectors comprise power spectral density features, differential entropy features and wavelet transformation features;
and the attention classification module is used for inputting the feature vectors into a trained deep forest network of the cascade structure to obtain the attention classification corresponding to the electroencephalogram signals.
9. An electronic device, comprising:
at least one memory and at least one processor;
the memory for storing one or more programs;
the one or more programs, when executed by the at least one processor, cause the at least one processor to perform the steps of a method for brain electrical attention classification as claimed in any one of claims 1-7.
10. A computer-readable storage medium characterized by:
the computer readable storage medium stores a computer program which when executed by a processor implements the steps of a method of electroencephalographic attention classification as claimed in any one of claims 1 to 7.
CN202211136549.4A 2022-09-19 2022-09-19 Electroencephalogram attention classification method and device, electronic equipment and storage medium Pending CN115429273A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202211136549.4A CN115429273A (en) 2022-09-19 2022-09-19 Electroencephalogram attention classification method and device, electronic equipment and storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202211136549.4A CN115429273A (en) 2022-09-19 2022-09-19 Electroencephalogram attention classification method and device, electronic equipment and storage medium

Publications (1)

Publication Number Publication Date
CN115429273A true CN115429273A (en) 2022-12-06

Family

ID=84249822

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202211136549.4A Pending CN115429273A (en) 2022-09-19 2022-09-19 Electroencephalogram attention classification method and device, electronic equipment and storage medium

Country Status (1)

Country Link
CN (1) CN115429273A (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN116458882A (en) * 2023-02-09 2023-07-21 清华大学 Construction worker attention level calculating method and device

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN116458882A (en) * 2023-02-09 2023-07-21 清华大学 Construction worker attention level calculating method and device
CN116458882B (en) * 2023-02-09 2024-03-12 清华大学 Construction worker attention level calculating method and device

Similar Documents

Publication Publication Date Title
CN110840402B (en) Atrial fibrillation signal identification method and system based on machine learning
US8315970B2 (en) Method and rhythm extractor for detecting and isolating rhythmic signal features from an input signal using the wavelet packet transform
CN110811609B (en) Epileptic spike intelligent detection device based on self-adaptive template matching and machine learning algorithm fusion
CN112381008B (en) Electroencephalogram emotion recognition method based on parallel sequence channel mapping network
CN102835955A (en) Method of automatically removing ocular artifacts from electroencephalogram signal without setting threshold value
CN114533086A (en) Motor imagery electroencephalogram decoding method based on spatial domain characteristic time-frequency transformation
CN115429273A (en) Electroencephalogram attention classification method and device, electronic equipment and storage medium
CN114492501A (en) Electroencephalogram signal sample expansion method, medium and system based on improved SMOTE algorithm
CN110956192A (en) Method and device for classifying non-reconstruction compressed sensing physiological data
Agounad et al. Detection and removal of eog artifact from eeg signal using fuzzy logic and wavelet transform
Sadiq et al. Classification of cardiac arrhythmia using ID3 classifier based on wavelet transform
CN115659207A (en) Electroencephalogram emotion recognition method and system
Tallón-Ballesteros An effective deep neural network architecture for cross-subject epileptic seizure detection in EEG data
CN111671421B (en) Electroencephalogram-based children demand sensing method
Liu et al. Remove motion artifacts from scalp single channel EEG based on noise assisted least square multivariate empirical mode decomposition
Nawas et al. K-NN classification of brain dominance
Singh et al. Automated atrial fibrillation classification based on denoising stacked autoencoder and optimized deep network
Alpturk et al. Analysis of relation between motor activity and imaginary EEG records
Adlakha Single trial EEG classification
Shovkun et al. Optimization of the Deep Neural Networks for Seizure Detection
Reaj et al. Emotion recognition using EEG-based brain computer interface
Baydemir et al. classification mental workload levels from EEG signals with 1D convolutional neural network
CN111783857A (en) Motor imagery brain-computer interface based on nonlinear network information graph
Geerts Detection of interictal epileptiform discharge in EEG
Rahman et al. Seizure detection system: a comparative study on features and fusions

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination