CN112733727A - Electroencephalogram consciousness dynamic classification method based on linear analysis and feature decision fusion - Google Patents

Electroencephalogram consciousness dynamic classification method based on linear analysis and feature decision fusion Download PDF

Info

Publication number
CN112733727A
CN112733727A CN202110037508.9A CN202110037508A CN112733727A CN 112733727 A CN112733727 A CN 112733727A CN 202110037508 A CN202110037508 A CN 202110037508A CN 112733727 A CN112733727 A CN 112733727A
Authority
CN
China
Prior art keywords
qda
rda
decision
feature
matrix
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.)
Granted
Application number
CN202110037508.9A
Other languages
Chinese (zh)
Other versions
CN112733727B (en
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.)
Yanshan University
Original Assignee
Yanshan 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 Yanshan University filed Critical Yanshan University
Priority to CN202110037508.9A priority Critical patent/CN112733727B/en
Publication of CN112733727A publication Critical patent/CN112733727A/en
Application granted granted Critical
Publication of CN112733727B publication Critical patent/CN112733727B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F2218/00Aspects of pattern recognition specially adapted for signal processing
    • G06F2218/08Feature extraction
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F18/00Pattern recognition
    • G06F18/20Analysing
    • G06F18/25Fusion techniques
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06VIMAGE OR VIDEO RECOGNITION OR UNDERSTANDING
    • G06V40/00Recognition of biometric, human-related or animal-related patterns in image or video data
    • G06V40/10Human or animal bodies, e.g. vehicle occupants or pedestrians; Body parts, e.g. hands
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F2218/00Aspects of pattern recognition specially adapted for signal processing
    • G06F2218/12Classification; Matching
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06VIMAGE OR VIDEO RECOGNITION OR UNDERSTANDING
    • G06V40/00Recognition of biometric, human-related or animal-related patterns in image or video data
    • G06V40/10Human or animal bodies, e.g. vehicle occupants or pedestrians; Body parts, e.g. hands
    • G06V40/15Biometric patterns based on physiological signals, e.g. heartbeat, blood flow

Landscapes

  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • General Physics & Mathematics (AREA)
  • Computer Vision & Pattern Recognition (AREA)
  • Data Mining & Analysis (AREA)
  • Artificial Intelligence (AREA)
  • General Engineering & Computer Science (AREA)
  • Bioinformatics & Cheminformatics (AREA)
  • Evolutionary Computation (AREA)
  • Evolutionary Biology (AREA)
  • Bioinformatics & Computational Biology (AREA)
  • Life Sciences & Earth Sciences (AREA)
  • Signal Processing (AREA)
  • Human Computer Interaction (AREA)
  • Multimedia (AREA)
  • Measurement And Recording Of Electrical Phenomena And Electrical Characteristics Of The Living Body (AREA)

Abstract

The invention provides a linear analysis-based electroencephalogram consciousness dynamic classification method based on feature decision fusion, wherein an electroencephalogram signal data set X (X1, X2, … and Xn) is acquired through a brain wave induction helmet, and n is a positive integer; and classifying the signal data set X ═ X (X1, X2, …, Xn) by using a canonical discriminant analysis RDA and a quadratic discriminant analysis QDA to obtain a correlation coefficient matrix rhoRDAAnd ρQDAMeanwhile, a feature decision fusion comprising a feature extraction unit, a projection classification unit and a decision selection unit is constructed to carry out feature integration and decision selection on the decisions and coefficients of the RDA and the QDA, so that better classification accuracy is obtained. The invention integrates two algorithms by constructing feature decision fusion, thereby selecting the decision which is more likely to be accurate, and obtaining better classification accuracy rate on the classification of motor imagery data.

Description

基于线性分析的特征决策融合的脑电意识动态分类方法A dynamic classification method of EEG consciousness based on feature decision fusion based on linear analysis

技术领域technical field

本发明属于脑电动态分析领域,具体涉及一种基于线性分析的特征决策融合的脑电意识动态分类方法。The invention belongs to the field of EEG dynamic analysis, in particular to a dynamic classification method of EEG consciousness based on linear analysis and feature decision fusion.

背景技术Background technique

MI是一种EEG信号,反映人在运动想象时,大脑的特定功能区被激活,相应的脑电信号会产生稳定的规律性的特征变化,这是将运动想象EEG作为BCI系统输入信号的生理基础。为了从MI信号中解码受试者的意图,人们提出了各种方法来对MI信号进行识别并分类等,如线性判别分析(LDA)、高斯分类器(Gaussian classifier)、概率神经网络(probabilistic NN)。特别是基于LDA的方法,在对新样本进行分类时,将其投影到同样的直线上,再根据投影点的位置来确定新样本的类别。可以直接求得基于广义特征值问题的解析解,从而避免了在一般非线性算法中,构建中所常遇到的局部最小问题无需对模式的输出类别进行人为的编码,从而使LDA对不平衡模式类的处理表现出尤其明显的优势。与神经网络方法相比,LDA不需要调整参数,因而也不存在学习参数和优化权重以及神经元激活函数的选择等问题;对模式的归一化或随机化不敏感,而这在基于梯度下降的各种算法中则显得比较突出。LDA是一种经典的线性学习方法,在二分类问题上最早由Fisher在1936年提出,亦称Fisher线性判别。线性判别的思想非常朴素:给定训练样例集,设法将样例投影到一条直线上,使得同类样例的投影点尽可能接近,异样样例的投影点尽可能远离;在对新样本进行分类时,将其投影到同样的直线上,再根据投影点的位置来确定新样本的类别。QDA是LDA的变体,其中针对每类观察估计单个协方差矩阵。如果事先知道个别类别表现出不同的协方差,则QDA特别有用。QDA的缺点是它不能用作降维技术。由于QDA估计每个类的协方差矩阵,因此它具有比LDA更多的有效参数。RDA是LDA和QDA之间的折衷,由于RDA是一种正则化技术,因此更适用于存在许多潜在相关特征的情况。由于这些方法提供了不同的决策,融合多种方法整合不同决策是一种可行的方法,以提高整体分类准确率。MI is a kind of EEG signal, which reflects the activation of specific functional areas of the brain when a person is in motor imagery, and the corresponding EEG signal will produce stable and regular characteristic changes. Base. In order to decode the intention of the subject from the MI signal, various methods have been proposed to identify and classify the MI signal, such as linear discriminant analysis (LDA), Gaussian classifier, probabilistic neural network (probabilistic NN), etc. ). Especially in the method based on LDA, when classifying new samples, they are projected onto the same straight line, and then the class of the new samples is determined according to the location of the projected points. The analytical solution based on the generalized eigenvalue problem can be directly obtained, thereby avoiding the local minimum problem often encountered in the construction of general nonlinear algorithms. It is not necessary to artificially encode the output category of the pattern, so that the LDA pair is unbalanced. The handling of pattern classes presents a particularly clear advantage. Compared with neural network methods, LDA does not need to adjust parameters, so there are no problems such as learning parameters and optimization weights and selection of neuron activation functions; it is not sensitive to normalization or randomization of patterns, which is based on gradient descent. It is more prominent among the various algorithms. LDA is a classic linear learning method, which was first proposed by Fisher in 1936 on the binary classification problem, also known as Fisher's linear discrimination. The idea of linear discrimination is very simple: given a set of training samples, try to project the samples onto a straight line, so that the projection points of similar samples are as close as possible, and the projection points of different samples are as far away as possible; When classifying, project it onto the same line, and then determine the class of the new sample according to the position of the projected point. QDA is a variant of LDA in which a single covariance matrix is estimated for each class of observations. QDA is especially useful if it is known in advance that individual classes exhibit different covariances. The disadvantage of QDA is that it cannot be used as a dimensionality reduction technique. Since QDA estimates the covariance matrix for each class, it has more effective parameters than LDA. RDA is a compromise between LDA and QDA, and since RDA is a regularization technique, it is more applicable when there are many potentially relevant features. Since these methods provide different decisions, fusing multiple methods to integrate different decisions is a feasible approach to improve the overall classification accuracy.

发明内容SUMMARY OF THE INVENTION

本发明的目的在于提供一种基于线性分析的特征决策融合的脑电意识动态分类方法,通过整合与精度相近的两种算法在运动想象数据分类上,通过算法融合他们的决策,由此选择更准确的决策,从而达到提高脑电信号分类准确度。The purpose of the present invention is to provide a dynamic classification method of EEG consciousness based on feature decision fusion based on linear analysis, by integrating two algorithms with similar precision in the classification of motor imagery data, and fuse their decisions through the algorithm, thereby selecting a more accurate classification method. Accurate decision-making, so as to improve the classification accuracy of EEG signals.

本发明的一种基于线性分析的特征决策融合的脑电意识动态分类方法,其包括以下步骤:A kind of EEG dynamic classification method based on linear analysis feature decision fusion of the present invention, it comprises the following steps:

S1、通过脑波感应头盔采集脑电信号数据集X=(X1,X2,…,Xn);S1. Collect the EEG signal data set X=(X1, X2,..., Xn) through the brain wave sensing helmet;

S2、使用正则判别分析RDA对信号数据集X=(X1,X2,…,Xn)进行分类,得到相关系数矩阵ρn,定义为ρRDAS2, use regular discriminant analysis RDA to classify the signal data set X=(X1, X2, . . . , Xn) to obtain a correlation coefficient matrix ρ n , which is defined as ρ RDA ;

Figure BDA0002894852130000021
Figure BDA0002894852130000021

其中,

Figure BDA0002894852130000022
是权重的矩阵转置,X是数据值,
Figure BDA0002894852130000023
是数据值平均数;in,
Figure BDA0002894852130000022
is the matrix transpose of the weights, X is the data value,
Figure BDA0002894852130000023
is the mean of the data values;

S3、使用二次判别分析QDA对信号数据集X=(X1,X2,…,Xn)进行分类,得到相关系数矩阵ρn,定义为ρQDAS3, use quadratic discriminant analysis QDA to classify signal data set X=(X1, X2,..., Xn), obtain correlation coefficient matrix ρ n , be defined as ρ QDA ;

Figure BDA0002894852130000024
Figure BDA0002894852130000024

其中,

Figure BDA0002894852130000025
是权重的矩阵转置,X是数据值,
Figure BDA0002894852130000026
是数据值平均数;in,
Figure BDA0002894852130000025
is the matrix transpose of the weights, X is the data value,
Figure BDA0002894852130000026
is the mean of the data values;

S4、构建特征决策融合器对RDA和QDA的决策和系数进行特征整合和决策选择,获得脑电意识动态分类,具体步骤如下;S4. Build a feature decision fusion device to perform feature integration and decision selection on the decisions and coefficients of RDA and QDA, and obtain dynamic classification of EEG consciousness. The specific steps are as follows;

S41、构建特征决策融合器,特征决策融合器包括特征提取单元、投影分类单元和决策选择单元:S41. Construct a feature decision fuser. The feature decision fuser includes a feature extraction unit, a projection classification unit and a decision selection unit:

S42、通过特征提取单元对RDA和QDA的相关系数进行特征提取,生成一个特征向量F;S42, feature extraction is performed on the correlation coefficient of RDA and QDA by the feature extraction unit, and a feature vector F is generated;

根据

Figure BDA0002894852130000031
的比值判断,值越大说明ρ就越大,根据表达式:according to
Figure BDA0002894852130000031
The ratio judgment of , the larger the value, the larger the ρ, according to the expression:

Figure BDA0002894852130000032
Figure BDA0002894852130000032

其中,wX为x方向的投影,wX T为转置的投影,wY为y方向的投影,wY T为转置的投影,X矩阵作为横坐标,XT为转置矩阵,Y矩阵作为横坐标,YT为转置矩阵,E[wX TXYTwY]代表wX TXYTwY的期望,E[wX TXXTwX]代表wX TXXTwX的期望,E[wY TXYTwY]代表wY TXYTwY的期望;Among them, w X is the projection in the x direction, w X T is the transposed projection, w Y is the projection in the y direction, w Y T is the transposed projection, the X matrix is the abscissa, X T is the transposed matrix, Y Matrix as abscissa, Y T is the transposed matrix, E[w X T XY T w Y ] represents the expectation of w X T XY T w Y , E[w X T XX T w X ] represents w X T XX T w The expectation of X , E[w Y T XY T w Y ] represents the expectation of w Y T XY T w Y ;

分别得到RDA和QDA的最大相关系数和第二大相关系数;Obtain the largest correlation coefficient and the second largest correlation coefficient of RDA and QDA, respectively;

根据得到的RDA和QDA算法的最大相关系数和第二大相关系数,生成特征向量F:According to the obtained maximum correlation coefficient and the second largest correlation coefficient of the RDA and QDA algorithms, the feature vector F is generated:

Figure BDA0002894852130000033
Figure BDA0002894852130000033

其中,

Figure BDA0002894852130000041
是QDA的最大相关系数,
Figure BDA0002894852130000042
是QDA的第二大相关系数,
Figure BDA0002894852130000043
是RDA的最大相关系数,
Figure BDA0002894852130000044
是RDA的第二大相关系数;in,
Figure BDA0002894852130000041
is the maximum correlation coefficient of QDA,
Figure BDA0002894852130000042
is the second largest correlation coefficient of QDA,
Figure BDA0002894852130000043
is the maximum correlation coefficient of RDA,
Figure BDA0002894852130000044
is the second largest correlation coefficient of RDA;

S43、通过投影分类单元将特征向量F分为RDA-false和QDA-false两类;S43. Divide the feature vector F into two categories: RDA-false and QDA-false through the projection classification unit;

投影分类单元使用线性SVM分类器在软边界目标函数的范围内进行投影,将特征向量F投影为标量值,投影到平面后,形成一个个的点,表示为:The projection classification unit uses the linear SVM classifier to project within the range of the soft boundary objective function, and projects the feature vector F into a scalar value.

Figure BDA0002894852130000045
Figure BDA0002894852130000045

其中,vj,j=1,2,…,N是支持向量,用来确定分类器的最大边缘平面,aj>,是可以改变并调节的参数,yj指第j个支持向量的类别,F是特征向量,b是偏差,

Figure BDA0002894852130000046
是线性核函数;Among them, v j , j=1,2,...,N is the support vector, used to determine the maximum edge plane of the classifier, a j >, is a parameter that can be changed and adjusted, y j refers to the category of the j-th support vector , F is the feature vector, b is the bias,
Figure BDA0002894852130000046
is a linear kernel function;

软边界目标函数为:The soft boundary objective function is:

Figure BDA0002894852130000047
Figure BDA0002894852130000047

其中,δj是松弛变量,表示样本vj是否在边缘内,需要调节程度,C是控制宽度和误分类权衡的调节系数,松弛变量用来确定点是否在范围内。Among them, δj is the slack variable, indicating whether the sample vj is within the edge, the degree of adjustment required, C is the adjustment coefficient that controls the trade-off between width and misclassification, and the slack variable is used to determine whether the point is within the range.

通过求解软边界目标函数,得到最大化值2/||W||,其作为边界线,根据标量值投影点的位置,将特征向量F中的特征分为RDA-false和QDA-false两类;By solving the soft boundary objective function, the maximum value 2/||W|| is obtained, which is used as the boundary line. According to the position of the scalar value projection point, the features in the feature vector F are divided into RDA-false and QDA-false. kind;

S44、通过决策选择单元根据分类结果选择RDA或QDA算法的决策输出;S44, select the decision output of the RDA or QDA algorithm according to the classification result by the decision selection unit;

决策选择单元为:The decision selection unit is:

Figure BDA0002894852130000051
Figure BDA0002894852130000051

如果得到一个RDA-false结果,则模块输出QDA决策;否则,模块输出RDA决策,获得了准确率较好的脑电意识动态分类。If an RDA-false result is obtained, the module outputs the QDA decision; otherwise, the module outputs the RDA decision to obtain a dynamic classification of EEG consciousness with better accuracy.

优选地,步骤S1中采用脑波感应头盔为Emotiv采集脑电信号;Preferably, in step S1, a brain wave sensing helmet is used to collect EEG signals for Emotiv;

优选地,步骤S2中ρRDA的求解步骤具体如下;Preferably, the solving step of ρ RDA in step S2 is as follows;

将数据集X=(X1,X2,…,Xn)分配给K组类中的一组,在训练数据中,数据的类别是已知的,因此类别k的先验概率和平均值分别为:Assign the dataset X=(X1,X2,...,Xn) to one of the K groups of classes. In the training data, the class of the data is known, so the prior probability and mean of class k are:

Figure BDA0002894852130000052
Figure BDA0002894852130000052

Figure BDA0002894852130000053
Figure BDA0002894852130000053

其中,ω是样本总数,ωk是类别k的样本数,Xn是样本点,

Figure BDA0002894852130000055
是类别k的数值的平均数;where ω is the total number of samples, ω k is the number of samples in category k, X n is the sample point,
Figure BDA0002894852130000055
is the mean of the values of category k;

正则判别分析RDA通过修改奇异协方差值来改善多重共线性的影响;每个类别的样本协方差估计如下:Regular discriminant analysis RDA improves the effects of multicollinearity by modifying singular covariance values; the sample covariance for each class is estimated as follows:

Figure BDA0002894852130000054
Figure BDA0002894852130000054

其中,ω是样本总数,Xn是样本点,

Figure BDA0002894852130000061
是类别k的平均值;where ω is the total number of samples, X n is the sample point,
Figure BDA0002894852130000061
is the mean of category k;

通过引入收缩参数γ进一步调整协方差矩阵:The covariance matrix is further adjusted by introducing a shrinkage parameter γ:

Figure BDA0002894852130000062
Figure BDA0002894852130000062

其中,λ是正则化参数,0≤λ≤1,p是自变量的维数,I是单位矩阵,γ是收缩参数。where λ is the regularization parameter, 0≤λ≤1, p is the dimension of the independent variable, I is the identity matrix, and γ is the shrinkage parameter.

优化目标为J(W):The optimization objective is J(W):

Figure BDA0002894852130000063
Figure BDA0002894852130000063

上式为Sk和S的广义瑞利商,其中,Sk=ωkk,

Figure BDA0002894852130000064
这就是QDA欲最大化的目标,J的最大值为矩阵
Figure BDA0002894852130000065
的最大特征值,而对应的为
Figure BDA0002894852130000066
的最大特征值对应的特征向量。求解得到
Figure BDA0002894852130000067
即为确定的最佳投影方向,WT是转置的投影,将训练集中的样本向w方向投影得到:The above formula is the generalized Rayleigh quotient of Sk and S, where Sk = ω kk ,
Figure BDA0002894852130000064
This is the goal that QDA wants to maximize, and the maximum value of J is the matrix
Figure BDA0002894852130000065
The largest eigenvalue of , and the corresponding
Figure BDA0002894852130000066
The eigenvector corresponding to the largest eigenvalue of . Solve to get
Figure BDA0002894852130000067
That is, the determined optimal projection direction, W T is the transposed projection, and the samples in the training set are projected to the w direction to obtain:

y=wTX (6)y=w T X (6)

Figure BDA0002894852130000068
Figure BDA0002894852130000068

其中,

Figure BDA0002894852130000069
是权重的矩阵转置,X是数据值,
Figure BDA00028948521300000610
是数据值平均数;in,
Figure BDA0002894852130000069
is the matrix transpose of the weights, X is the data value,
Figure BDA00028948521300000610
is the mean of the data values;

优选地,步骤S3中ρQDA的求解步骤具体如下;Preferably, the solving step of ρ QDA in step S3 is as follows;

假设样本数据集X=(X1,X2,…,Xn)服从多元高斯分布,μi是均值向量,表示为:Assuming that the sample data set X = (X1, X2,..., Xn) obeys the multivariate Gaussian distribution, μ i is the mean vector, expressed as:

Figure BDA00028948521300000611
Figure BDA00028948521300000611

计算样本的协方差矩阵∑j:Compute the sample covariance matrix ∑j:

Figure BDA0002894852130000071
Figure BDA0002894852130000071

其中,j=1,2;Among them, j=1,2;

可得到类内散度矩阵Sw为:The intra-class divergence matrix S w can be obtained as:

Figure BDA0002894852130000072
Figure BDA0002894852130000072

同时定义类间散度矩阵Sb为:At the same time, the inter-class divergence matrix S b is defined as:

Sb=(μ12)(μ12)T (12)S b =(μ 12 )(μ 12 ) T (12)

优化目标为J(W):The optimization objective is J(W):

Figure BDA0002894852130000073
Figure BDA0002894852130000073

上式为Sw和Sb的广义瑞利商,这就是QDA欲最大化的目标,J的最大值为矩阵Sw -1Sb的最大特征值,而对应的为Sw -1Sb的最大特征值对应的特征向量。求解得到w=Sw -112),即为确定的最佳投影方向,将训练集中的样本向w方向投影得到:The above formula is the generalized Rayleigh quotient of S w and S b , which is the goal of QDA to maximize. The maximum value of J is the largest eigenvalue of the matrix S w -1 S b , and the corresponding is S w -1 S b The eigenvector corresponding to the largest eigenvalue of . Solve to get w=S w -112 ), which is the determined optimal projection direction, and project the samples in the training set to the w direction to get:

y=wTX (14)y=w T X (14)

Figure BDA0002894852130000074
Figure BDA0002894852130000074

本发明的效果如下:The effect of the present invention is as follows:

1.整合了两种不同方法的决策协议,减少了单一决策的准确率较低、自适应性差等问题;1. The decision-making protocol of two different methods is integrated, which reduces the problems of low accuracy and poor adaptability of a single decision;

2.融合它们的决策是提高整体性能的有效方法,基于这一思想,整合两种基于LDA的算法,从而达到提高脑电信号分类准确度。2. Integrating their decisions is an effective way to improve the overall performance. Based on this idea, two LDA-based algorithms are integrated to improve the classification accuracy of EEG signals.

附图说明Description of drawings

图1是本发明基于线性分析的特征决策融合的脑电意识动态分类方法示意图;Fig. 1 is the schematic diagram of the dynamic classification method of EEG consciousness based on the feature decision fusion of linear analysis of the present invention;

图2是本发明决策融合的测试与训练示意图;Fig. 2 is the test and training schematic diagram of decision fusion of the present invention;

图3是本发明总体技术路线图。FIG. 3 is an overall technical roadmap of the present invention.

具体实施方式Detailed ways

以下,参照附图1-3对本发明的实施方式进行说明。Hereinafter, embodiments of the present invention will be described with reference to FIGS. 1 to 3 .

本发明的一种基于线性分析的特征决策融合的脑电意识动态分类方法,总体的流程图如图3所示,其步骤如下:A kind of EEG dynamic classification method based on linear analysis and feature decision fusion of the present invention, the overall flow chart is shown in Figure 3, and its steps are as follows:

S1、通过脑波感应头盔采集脑电信号数据集X=(X1,X2,…,Xn),n为正整数;S1. Collect the EEG signal data set X=(X1, X2, . . . , Xn) through the brain wave sensing helmet, and n is a positive integer;

在虚拟环境中实施动态任务模型,受试者通过向碗施加力来间接控制球,并且球可以逃脱。试验在隔音效果良好的房间内进行,实验设备采用Emotiv头盔采集受试者14导(AF3,F7,F3,FC5,T7,P7,O1,O2,P8,T8,FC6,F4,F8,AF4)的脑电信号,其电极分布采用10-20国际标准导联定位,采样频率为128Hz。试验数据通过USB接口传送到计算机。本试验共10名(6男,4女)健康参与者参与试验,排除标准是视觉、神经或精神疾病或任何现有药物的任何历史,所有受试者均阅读并签署了知情同意书。A dynamic task model was implemented in a virtual environment where subjects indirectly controlled the ball by applying force to the bowl, and the ball could escape. The test was carried out in a room with good sound insulation, and the experimental equipment used an Emotiv helmet to collect 14 subjects (AF3, F7, F3, FC5, T7, P7, O1, O2, P8, T8, FC6, F4, F8, AF4) The electroencephalogram signal, the electrode distribution adopts 10-20 international standard lead positioning, and the sampling frequency is 128Hz. The test data is transmitted to the computer through the USB interface. A total of 10 (6 male, 4 female) healthy participants participated in the trial, exclusion criteria were any history of visual, neurological or psychiatric disorders or any existing medication, and all subjects read and signed informed consent.

在试验过程中,受试者需要完成边界回避任务,这是一种高难度的感觉运动任务,受试者需在规定的范围内操纵虚拟的呈有小球的碗,若碗从右侧超出边框范围,并且整个过程球未溢出碗则任务成功;若碗从左侧超出边框范围,或者在这个过程中球从碗中溢出,则任务失败。碗-球的初始位置在左侧。针对本试验的特点,截取下述两组数据进行分析处理。假设在一段时间内对碗施加一个方向向左的力,在受到这个力之前碗是向右移动的,而球相对于碗会向左;由于惯性的作用,一段时间之后碗才会向左移动,分别截取这一段时间内的前1s和后1s的数据,反之亦然。整个试验包括120个测试值trial,左手和右手各为60,每个受试者分别获得观察的1组测量值X=(X1,X2,…,Xn),其中,n=120。During the experiment, the subjects were required to complete the boundary avoidance task, which is a highly difficult sensorimotor task. The subjects were required to manipulate a virtual bowl with a small ball within a prescribed range. The task is successful if the bounding box is within the bounds and the ball does not overflow the bowl during the whole process; if the bowl exceeds the bounding bounds from the left side, or the ball overflows from the bowl during this process, the task fails. Bowl - The initial position of the ball is on the left. According to the characteristics of this experiment, the following two groups of data were intercepted for analysis and processing. Suppose a leftward force is applied to the bowl for a period of time. Before the force is applied, the bowl moves to the right, and the ball moves to the left relative to the bowl; due to inertia, the bowl will move to the left after a period of time. , respectively intercept the data of the first 1s and the last 1s in this period of time, and vice versa. The whole experiment includes 120 test value trials, each of which is 60 for the left and right hands, and each subject obtains a set of observed measurement values X=(X1, X2, . . . , Xn), where n=120.

S2、使用正则判别分析RDA对信号数据集X=(X1,X2,…,Xn)进行分类,得到相关系数矩阵ρn,定义为ρRDAS2, use regular discriminant analysis RDA to classify the signal data set X=(X1, X2, . . . , Xn) to obtain a correlation coefficient matrix ρ n , which is defined as ρ RDA ;

LDA和QDA都是边界判别方法,旨在找到将样本组或类别分开的边界。边界将空间划分为区域,每个区域根据不同的组或者类别划分,并且它还取决于分类器的类型:即LDA获得线性边界,其中直线或超平面将可变空间划分为区域;QDA获得二次边界,其中二次曲面将可变空间划分为区域。LDA假定所有的类别都有单一协方差矩阵,QDA假定每个类别的协方差矩阵不同。QDA允许区分具有显著不同的类特定协方差矩阵的类,并为每个类形成单独的方差模型,而类群表示具有相同均值的多元正态分布。RDA是LDA和QDA之间的折衷,由于RDA是一种正则化技术,因此更适用于存在许多潜在相关特征的情况。将数据集X=(X1,X2,…,Xn)分配给K组类中的一组。在训练数据中,数据的类别是已知的,因此类别k的先验概率和平均值分别为:Both LDA and QDA are boundary discriminative methods that aim to find boundaries that separate sample groups or categories. The boundary divides the space into regions, each region is divided according to different groups or classes, and it also depends on the type of classifier: i.e. LDA obtains a linear boundary, where lines or hyperplanes divide the variable space into regions; QDA obtains two Secondary boundaries, where quadric surfaces divide variable space into regions. LDA assumes that all classes have a single covariance matrix, and QDA assumes that each class has a different covariance matrix. QDA allows to distinguish classes with significantly different class-specific covariance matrices and form a separate variance model for each class, while clusters represent multivariate normal distributions with the same mean. RDA is a compromise between LDA and QDA, and since RDA is a regularization technique, it is more applicable when there are many potentially relevant features. Assign the dataset X=(X1,X2,...,Xn) to one of the K groups of classes. In the training data, the class of the data is known, so the prior probability and mean of class k are:

Figure BDA0002894852130000091
Figure BDA0002894852130000091

Figure BDA0002894852130000092
Figure BDA0002894852130000092

其中,ω是样本总数,ωk是类别k的样本数,Xn是样本点,

Figure BDA0002894852130000093
是类别k的数值的平均数。where ω is the total number of samples, ω k is the number of samples in category k, X n is the sample point,
Figure BDA0002894852130000093
is the mean of the values of category k.

正则判别分析RDA通过修改奇异协方差值来改善多重共线性的影响。每个类别的样本协方差估计如下:Regular discriminant analysis RDA improves the effects of multicollinearity by modifying singular covariance values. The sample covariance for each class is estimated as follows:

Figure BDA0002894852130000101
Figure BDA0002894852130000101

其中,ω是样本总数,Xn是样本点,

Figure BDA0002894852130000102
是类别k的平均值。where ω is the total number of samples, X n is the sample point,
Figure BDA0002894852130000102
is the mean of class k.

通过引入收缩参数γ进一步调整协方差矩阵:The covariance matrix is further adjusted by introducing a shrinkage parameter γ:

Figure BDA0002894852130000103
Figure BDA0002894852130000103

其中,λ是正则化参数,0≤λ≤1,p是自变量的维数,I是单位矩阵,γ是收缩参数。where λ is the regularization parameter, 0≤λ≤1, p is the dimension of the independent variable, I is the identity matrix, and γ is the shrinkage parameter.

优化目标为J(w)The optimization objective is J(w)

Figure BDA0002894852130000104
Figure BDA0002894852130000104

上式为Sk和S的广义瑞利商,其中,Sk=ωkk,

Figure BDA0002894852130000105
这就是QDA欲最大化的目标,J的最大值为矩阵Sk -1S的最大特征值,而对应的为Sk -1S的最大特征值对应的特征向量。求解得到w=Sk -11,-μ2),即为确定的最佳投影方向,WT是转置的投影,将训练集中的样本向w方向投影得到:The above formula is the generalized Rayleigh quotient of Sk and S, where Sk = ω kk ,
Figure BDA0002894852130000105
This is the goal that QDA wants to maximize. The maximum value of J is the maximum eigenvalue of the matrix S k -1 S, and the corresponding eigenvector is the maximum eigenvalue of the S k -1 S. Solve to get w=S k -11 , -μ 2 ), which is the determined optimal projection direction, W T is the transposed projection, and the samples in the training set are projected to the w direction to obtain:

y=wTX (6)y=w T X (6)

Figure BDA0002894852130000106
Figure BDA0002894852130000106

其中,

Figure BDA0002894852130000107
是权重的矩阵转置,X是数据值,
Figure BDA0002894852130000108
是数据值平均数;in,
Figure BDA0002894852130000107
is the matrix transpose of the weights, X is the data value,
Figure BDA0002894852130000108
is the mean of the data values;

S3、使用二次判别分析QDA对信号数据集X=(X1,X2,…,Xn)进行分类,得到相关系数矩阵ρn,定义为ρRDAS3, use quadratic discriminant analysis QDA to classify signal data set X=(X1, X2,..., Xn), obtain correlation coefficient matrix ρ n , be defined as ρ RDA ;

二次判别分析QDA旨在找到输入特征的变换,它能够最好的区分数据集中的类。使用二次判别分析QDA对信号数据集X=(X1,X2,…,Xn)进行分类,得到相关系数矩阵ρn,定义为ρQDAQuadratic Discriminant Analysis (QDA) aims to find the transformation of the input features that best distinguishes the classes in the dataset. Use quadratic discriminant analysis QDA to classify the signal data set X=(X1, X2, . . . , Xn) to obtain a correlation coefficient matrix ρ n , which is defined as ρ QDA ;

假设样本数据集X=(X1,X2,…,Xn)服从多元高斯分布,μi是均值向量,如下:Assuming that the sample data set X = (X1, X2,..., Xn) obeys the multivariate Gaussian distribution, μ i is the mean vector, as follows:

Figure BDA0002894852130000111
Figure BDA0002894852130000111

计算样本的协方差矩阵∑j为:Calculate the covariance matrix ∑j of the sample as:

Figure BDA0002894852130000112
Figure BDA0002894852130000112

其中,j=1,2;Among them, j=1,2;

可得到类内散度矩阵Sw为:The intra-class divergence matrix S w can be obtained as:

Figure BDA0002894852130000113
Figure BDA0002894852130000113

同时定义类间散度矩阵Sb为:At the same time, the inter-class divergence matrix S b is defined as:

Sb=(μ12)(μ12)T (12)S b =(μ 12 )(μ 12 ) T (12)

优化目标为J(w)The optimization objective is J(w)

Figure BDA0002894852130000114
Figure BDA0002894852130000114

上式为Sw和Sb的广义瑞利商,这就是QDA欲最大化的目标,J的最大值为矩阵Sw -1Sb的最大特征值,而对应的为Sw -1Sb的最大特征值对应的特征向量。求解得到w=Sw -112),即为确定的最佳投影方向,将训练集中的样本向w方向投影得到The above formula is the generalized Rayleigh quotient of S w and S b , which is the goal of QDA to maximize. The maximum value of J is the largest eigenvalue of the matrix S w -1 S b , and the corresponding is S w -1 S b The eigenvector corresponding to the largest eigenvalue of . Solve to get w=S w -112 ), which is the determined optimal projection direction, and project the samples in the training set to the w direction to get

y=wTX (14)y=w T X (14)

Figure BDA0002894852130000121
Figure BDA0002894852130000121

其中,

Figure BDA0002894852130000122
是权重的矩阵转置,X是数据值,
Figure BDA0002894852130000123
是数据值平均数;in,
Figure BDA0002894852130000122
is the matrix transpose of the weights, X is the data value,
Figure BDA0002894852130000123
is the mean of the data values;

S4、构建特征决策融合器对RDA和QDA的决策和系数进行特征整合和决策选择,获得脑电意识动态分类,具体步骤如下;S4. Build a feature decision fusion device to perform feature integration and decision selection on the decisions and coefficients of RDA and QDA, and obtain dynamic classification of EEG consciousness. The specific steps are as follows;

S41、构建特征决策融合器,特征决策融合器包括特征提取单元、投影分类单元和决策选择单元:S41. Construct a feature decision fuser. The feature decision fuser includes a feature extraction unit, a projection classification unit and a decision selection unit:

S42、通过特征提取单元对RDA和QDA的相关系数进行特征提取,生成一个特征向量F;S42, feature extraction is performed on the correlation coefficient of RDA and QDA by the feature extraction unit, and a feature vector F is generated;

根据

Figure BDA0002894852130000124
的比值判断,值越大说明ρ就越大,根据如下表达式分别得到RDA和QDA的最大相关系数和第二大相关系数;according to
Figure BDA0002894852130000124
The larger the value, the larger the ρ, and the maximum correlation coefficient and the second largest correlation coefficient of RDA and QDA are obtained according to the following expressions;

Figure BDA0002894852130000125
Figure BDA0002894852130000125

其中,wX为x方向的投影,wX T为转置的投影,wY为y方向的投影,wY T为转置的投影,X矩阵作为横坐标,XT为转置矩阵,Y矩阵作为横坐标,YT为转置矩阵,E[wY TXYTwY]代表wX TXYTwY的期望,E[wX TXXTwX]代表wX TXXTwX的期望,E[wY TXYTwY]代表wY TXYTwY的期望;Among them, w X is the projection in the x direction, w X T is the transposed projection, w Y is the projection in the y direction, w Y T is the transposed projection, the X matrix is the abscissa, X T is the transposed matrix, Y Matrix as abscissa, Y T is the transposed matrix, E[w Y T XY T w Y ] represents the expectation of w X T XY T w Y , E[w X T XX T w X ] represents w X T XX T w The expectation of X , E[w Y T XY T w Y ] represents the expectation of w Y T XY T w Y ;

根据得到的RDA和QDA算法的最大相关系数和第二大相关系数,生成特征向量F:According to the obtained maximum correlation coefficient and the second largest correlation coefficient of the RDA and QDA algorithms, the feature vector F is generated:

在这里只需要把两种方法的的相关系数提取出来后,按照下方的形式求出一个矩阵:Here, it is only necessary to extract the correlation coefficients of the two methods, and then obtain a matrix in the following form:

Figure BDA0002894852130000131
Figure BDA0002894852130000131

其中,

Figure BDA0002894852130000132
是QDA的最大相关系数,
Figure BDA0002894852130000133
是QDA的第二大相关系数,
Figure BDA0002894852130000134
是RDA的最大相关系数,
Figure BDA0002894852130000135
是RDA的第二大相关系数;in,
Figure BDA0002894852130000132
is the maximum correlation coefficient of QDA,
Figure BDA0002894852130000133
is the second largest correlation coefficient of QDA,
Figure BDA0002894852130000134
is the maximum correlation coefficient of RDA,
Figure BDA0002894852130000135
is the second largest correlation coefficient of RDA;

S43、通过投影分类单元将特征向量F分为RDA-false和QDA-false两类S43. Divide the feature vector F into two categories: RDA-false and QDA-false through the projection classification unit

根据RDA和QDA两个算法的分类结果,将所有训练数据的试验分为both-true、both-false、RDA-false和QDA-false四类。在一次双正确试验中,这两种算法做出了相同且正确的决定。在双假试验中,两种方法的决定都与被试的意图不一致。所提出的从两个错误决策中选择一个的决策融合方法也会给出一个错误的结果。所以选择用RDA-false和QDA-false试验(其中RDA和QDA中只有一个决策是正确的)来训练决策融合方法。软边界目标函数中δ是松弛变量,表示样本vj是否在边缘内,需要调节程度,C是控制宽度和误分类权衡的调节系数,松弛变量用来确定点是否在范围内,即只选择RDA-false和QDA-false两类。According to the classification results of the two algorithms, RDA and QDA, all training data trials are divided into four categories: both-true, both-false, RDA-false and QDA-false. In a double-correct trial, the two algorithms made the same and correct decision. In the double-sham test, the decisions of both methods were inconsistent with the participants' intentions. The proposed decision fusion method of choosing one of the two wrong decisions also gives a wrong result. So choose to train the decision fusion method with RDA-false and QDA-false trials (where only one decision in RDA and QDA is correct). In the soft boundary objective function, δ is a slack variable, which indicates whether the sample v j is within the edge and needs to be adjusted. C is an adjustment coefficient that controls the trade-off between width and misclassification. The slack variable is used to determine whether the point is within the range, that is, only RDA is selected. -false and QDA-false categories.

投影分类单元使用线性SVM分类器在软边界目标函数的范围内进行投影,将特征向量F投影为标量值,投影到平面后,形成一个个的点,表示为:The projection classification unit uses the linear SVM classifier to project within the range of the soft boundary objective function, and projects the feature vector F into a scalar value.

Figure BDA0002894852130000141
Figure BDA0002894852130000141

其中,vj,(j=1,2,…,N)是支持向量,用来确定分类器的最大边缘平面,aj>0,是可以改变并调节的参数,yj指第j个支持向量的类别,F是特征向量,b是偏差,

Figure BDA0002894852130000142
是线性核函数;Among them, v j , (j=1,2,...,N) is the support vector, used to determine the maximum edge plane of the classifier, a j > 0, is a parameter that can be changed and adjusted, y j refers to the jth support the category of the vector, F is the feature vector, b is the bias,
Figure BDA0002894852130000142
is a linear kernel function;

软边界目标函数为:The soft boundary objective function is:

Figure BDA0002894852130000143
Figure BDA0002894852130000143

其中,δ是松弛变量,表示样本vj是否在边缘内,需要调节程度,C是控制宽度和误分类权衡的调节系数,松弛变量用来确定点是否在范围内。Among them, δ is the slack variable, indicating whether the sample v j is within the edge, the degree of adjustment is required, C is the adjustment coefficient that controls the trade-off between width and misclassification, and the slack variable is used to determine whether the point is within the range.

通过求解软边界目标函数,得到最大化值2/||w||,其作为边界线,根据标量值投影点的位置,将特征向量F中的特征分为RDA-false和QDA-false两类,边界线一边为RDA-false类,另一边为QDA-false类;By solving the soft boundary objective function, the maximum value 2/||w|| is obtained, which is used as the boundary line. According to the position of the scalar value projection point, the features in the feature vector F are divided into RDA-false and QDA-false. class, one side of the boundary line is RDA-false class, and the other side is QDA-false class;

S44、通过决策选择单元根据分类结果选择RDA或QDA算法的决策输出;S44, select the decision output of the RDA or QDA algorithm according to the classification result by the decision selection unit;

如式(20)所示,选择用RDA-false和QDA-false(其中RDA和QDA中只有一个决策是正确的)来训练决策融合方法,如果得到一个RDA-false结果,则模块输出QDA决策。否则,模块输出RDA决策。As shown in Equation (20), RDA-false and QDA-false (where only one decision in RDA and QDA is correct) is chosen to train the decision fusion method, and if an RDA-false result is obtained, the module outputs a QDA decision. Otherwise, the module outputs the RDA decision.

Figure BDA0002894852130000151
Figure BDA0002894852130000151

特征决策融合器主要是由特征提取单元、投影分类单元和决策选择单元组成。特征决策融合器输入RDA和QDA算法的决策和相关系数,选择并输出更正确的决策。Feature decision fusion unit is mainly composed of feature extraction unit, projection classification unit and decision selection unit. The feature decision fuser inputs the decisions and correlation coefficients of the RDA and QDA algorithms, selects and outputs more correct decisions.

下面对本发明方法的效果进行比较验证:The effect of the inventive method is compared and verified below:

在决策融合的测试与训练阶段,性能估计是使用一个交叉验证,其中5块数据集被选择训练决策融合和1块被选择测试。在训练阶段,我们使用了另一个交叉验证来提取RDA-false和QDA-false特征。具体来说,RDA和QDA算法使用训练数据集中的4个块进行训练,并在每一轮中对剩余的块进行分类。根据分类结果,在每个训练周期的5轮中提取并记录RDA-false和QDA-false试验的决策融合特征F,即总共测试200次试验。利用记录的RDA-false和QDA-false特征训练决策融合方法。在本方法中,我们使用所提出的决策融合对LDA、QDA、RDA、最近均值、加权最近均值5种基于LDA的分类算法进行了综合。估计了所有组合的分类准确率,估计了所有组合的分类准确率和信息传递率(ITR),以此来评判整合后的性能。During the testing and training phases of decision fusion, performance is estimated using a cross-validation where 5 datasets are selected for training decision fusion and 1 is selected for testing. During the training phase, we used another cross-validation to extract RDA-false and QDA-false features. Specifically, the RDA and QDA algorithms are trained using 4 blocks in the training dataset, and the remaining blocks are classified in each round. According to the classification results, the decision fusion feature F of RDA-false and QDA-false trials is extracted and recorded in 5 epochs of each training cycle, i.e. a total of 200 trials are tested. The decision fusion method is trained using recorded RDA-false and QDA-false features. In this method, we use the proposed decision fusion to synthesize five LDA-based classification algorithms: LDA, QDA, RDA, nearest mean, and weighted nearest mean. The classification accuracy of all combinations is estimated, and the classification accuracy and information transfer rate (ITR) of all combinations are estimated to judge the integrated performance.

图2说明了所提决策融合方法的训练和测试的过程。性能的估计是使用一个一留一出的交叉验证,其中5块数据集被选择训练决策融合和1块被选择测试。在训练阶段,我们使用了另一个交叉验证来提取RDA-false和QDA-false特征。具体来说,RDA和QDA算法使用训练数据集中的4个块进行训练,并在每一轮中对剩余的块进行分类。根据分类结果,在每个训练周期的5轮中提取并记录RDA-false和QDA-false试验的决策融合特征F,即总共测试200次试验。利用记录的RDAfalse和QDA-false特征训练决策融合方法。Figure 2 illustrates the training and testing process of the proposed decision fusion method. Performance was estimated using a leave-one-out cross-validation, where 5 blocks of the dataset were chosen to train the decision fusion and 1 block was chosen to test. During the training phase, we used another cross-validation to extract RDA-false and QDA-false features. Specifically, the RDA and QDA algorithms are trained using 4 blocks in the training dataset, and the remaining blocks are classified in each round. According to the classification results, the decision fusion feature F of RDA-false and QDA-false trials is extracted and recorded in 5 epochs of each training cycle, i.e. a total of 200 trials are tested. The decision fusion method is trained using the recorded RDAfalse and QDA-false features.

在测试阶段,我们使用所提出的决策融合方法对LDA、QDA、RDA、最近均值、加权最近均值5种基于LDA的分类算法进行了综合。估计了所有组合的分类准确率。估计了所有组合的分类准确率和信息传递率(ITR)。以比特/分钟为单位的ITR定义如下:In the testing phase, we synthesized 5 LDA-based classification algorithms using the proposed decision fusion method: LDA, QDA, RDA, nearest mean, and weighted nearest mean. The classification accuracy was estimated for all combinations. Classification accuracy and information transfer rate (ITR) were estimated for all combinations. The ITR in bits per minute is defined as follows:

Figure BDA0002894852130000161
Figure BDA0002894852130000161

其中,P为准确率,N为类数(即本研究中N=120),T为一次选择所需的时间。Among them, P is the accuracy rate, N is the number of classes (that is, N=120 in this study), and T is the time required for one selection.

在集成结果方面,其性能是以1秒的数据长度来进行评估。结果数据由5行5列组成,每一行对应一个基于LDA的算法。主对角线单元表示各算法的平均精度,其他单元表示将两种相应算法集成在一起的决策融合方法的平均精度。例如,数据长度为1s的决策融合-QDA&LDA方法的准确率为90.56%,高于LDA方法的86.36%,但低于QDA方法的93.70%。然而,QDA和LDA方法的准确率有7.34%的差异。测试结果也表明,将QDA或RDA算法与低精度算法相结合的决策融合方法性能下降。本研究计算了两种算法在各决策融合组合前后的分类精度。这些结果表明,决策融合法融合两种算法精度相差很大时候不提高整体分类准确率。而结合两种性能比较接近的算法的决策融合-QDA&RDA方法,在数据长度为1s时,准确率最高为94.21%。In terms of ensemble results, its performance is evaluated with a data length of 1 second. The resulting data consists of 5 rows and 5 columns, each row corresponding to an LDA-based algorithm. The main diagonal cells represent the average precision of each algorithm, and the other cells represent the average precision of the decision fusion method that integrates the two corresponding algorithms. For example, the accuracy of Decision Fusion-QDA&LDA method with data length of 1s is 90.56%, which is higher than 86.36% of LDA method, but lower than 93.70% of QDA method. However, there is a 7.34% difference in accuracy between QDA and LDA methods. Test results also show that the performance of decision fusion methods that combine QDA or RDA algorithms with low-precision algorithms degrades. In this study, the classification accuracy of the two algorithms before and after each decision fusion combination was calculated. These results show that the decision fusion method does not improve the overall classification accuracy when the accuracy of the two algorithms is very different. The decision fusion-QDA&RDA method, which combines two algorithms with similar performance, has the highest accuracy rate of 94.21% when the data length is 1s.

综合LDA、QDA、RDA、最近均值、加权最近均值5种基于LDA的分类算法,所提决策融合方法的分类准确率如下表所示:Comprehensive LDA, QDA, RDA, recent mean, weighted recent mean of five LDA-based classification algorithms, the classification accuracy of the proposed decision fusion method is shown in the following table:

Figure BDA0002894852130000162
Figure BDA0002894852130000162

性能以1秒的数据长度进行评估。结果数据由5行5列组成,每一行对应一个基于LDA的算法。主对角线单元表示各算法的平均精度,其他单元表示将两种相应算法集成在一起的决策融合方法的平均精度。Performance is evaluated with a data length of 1 second. The resulting data consists of 5 rows and 5 columns, each row corresponding to an LDA-based algorithm. The main diagonal cells represent the average precision of each algorithm, and the other cells represent the average precision of the decision fusion method that integrates the two corresponding algorithms.

在表的结果中,数据长度为1s的决策融合-QDA&LDA方法的准确率为90.56%,高于LDA方法的86.36%,但低于QDA方法的93.70%。然而,QDA和LDA方法的准确率有7.34%的差异。图3中的测试结果也表明,将QDA或RDA算法与低精度算法相结合的决策融合方法性能下降。本研究计算了两种算法在各决策融合组合前后的分类精度。这些结果表明,融合两种算法精度相差很大时候不提高整体分类准确率。而结合两种性能比较接近的算法的决策融合-QDA&RDA方法,在数据长度为1s时,准确率最高为94.21%。In the results of the table, the accuracy of the decision fusion-QDA&LDA method with a data length of 1s is 90.56%, which is higher than the 86.36% of the LDA method, but lower than the 93.70% of the QDA method. However, there is a 7.34% difference in accuracy between QDA and LDA methods. The test results in Figure 3 also show that the decision fusion methods that combine QDA or RDA algorithms with low-precision algorithms degrade in performance. In this study, the classification accuracy of the two algorithms before and after each decision fusion combination was calculated. These results show that the fusion of the two algorithms does not improve the overall classification accuracy when the accuracy of the two algorithms is very different. The decision fusion-QDA&RDA method, which combines two algorithms with similar performance, has the highest accuracy rate of 94.21% when the data length is 1s.

以上所述的实施案例仅是对本发明的优选实施方式进行描述,并非对本发明的范围进行限定,在不脱离本发明设计精神的前提下,本领域普通技术人员对本发明的技术方案做出的各种变形和改进,均应落入本发明权利要求书确定的保护范围内。The above-mentioned implementation cases are only to describe the preferred embodiments of the present invention, and do not limit the scope of the present invention. On the premise of not departing from the design spirit of the present invention, those of ordinary skill in the art can make various technical solutions of the present invention. Such deformations and improvements shall fall within the protection scope determined by the claims of the present invention.

Claims (4)

1.一种基于线性分析的特征决策融合的脑电意识动态分类方法,其特征在于,其包括以下步骤:1. a kind of electroencephalogram consciousness dynamic classification method based on the feature decision fusion of linear analysis, is characterized in that, it comprises the following steps: S1、通过脑波感应头盔采集脑电信号数据集X=(X1,X2,…,Xn);S1. Collect the EEG signal data set X=(X1, X2, . . . , Xn) through the brain wave sensing helmet; S2、使用正则判别分析RDA对信号数据集X=(X1,X2,…,Xn)进行分类,得到相关系数矩阵ρn,定义为ρRDAS2, use regular discriminant analysis RDA to classify the signal data set X=(X1, X2, . . . , Xn) to obtain a correlation coefficient matrix ρ n , which is defined as ρ RDA ;
Figure FDA0002894852120000011
Figure FDA0002894852120000011
其中,
Figure FDA0002894852120000012
是权重的矩阵转置,X是数据值,
Figure FDA0002894852120000013
是数据值平均数;
in,
Figure FDA0002894852120000012
is the matrix transpose of the weights, X is the data value,
Figure FDA0002894852120000013
is the mean of the data values;
S3、使用二次判别分析QDA对信号数据集X=(X1,X2,…,Xn)进行分类,得到相关系数矩阵ρn,定义为ρQDAS3, use quadratic discriminant analysis QDA to classify the signal data set X=( X1 , X2, .
Figure FDA0002894852120000014
Figure FDA0002894852120000014
其中,
Figure FDA0002894852120000015
是权重的矩阵转置,X是数据值,
Figure FDA0002894852120000016
是数据值平均数;
in,
Figure FDA0002894852120000015
is the matrix transpose of the weights, X is the data value,
Figure FDA0002894852120000016
is the mean of the data values;
S4、构建特征决策融合器对RDA和QDA的决策和系数进行特征整合和决策选择,获得脑电意识动态分类,具体步骤如下;S4. Build a feature decision fusion device to perform feature integration and decision selection on the decisions and coefficients of RDA and QDA, and obtain dynamic classification of EEG consciousness. The specific steps are as follows; S41、构建特征决策融合器,特征决策融合器包括特征提取单元、投影分类单元和决策选择单元;S41, constructing a feature decision fuser, and the feature decision fuser includes a feature extraction unit, a projection classification unit and a decision selection unit; S42、通过特征提取单元对RDA和QDA的相关系数进行特征提取,生成一个特征向量F;S42, feature extraction is performed on the correlation coefficient of RDA and QDA by the feature extraction unit, and a feature vector F is generated; 根据
Figure FDA0002894852120000017
的比值判断,值越大说明ρ就越大,根据表达式:
according to
Figure FDA0002894852120000017
The ratio judgment of , the larger the value, the larger the ρ, according to the expression:
Figure FDA0002894852120000018
Figure FDA0002894852120000018
其中,wX为x方向的投影,wX T为转置的投影,wY为y方向的投影,wY T为转置的投影,X矩阵作为横坐标,XT为转置矩阵,Y矩阵作为横坐标,YT为转置矩阵,E[wX TXYTwY]代表wX TXYTwY的期望,E[wX TXXTwX]代表wX TXXTwX的期望,E[wY TXYTwY]代表wY TXYTwY的期望;Among them, w X is the projection in the x direction, w X T is the transposed projection, w Y is the projection in the y direction, w Y T is the transposed projection, the X matrix is the abscissa, X T is the transposed matrix, Y Matrix as abscissa, Y T is the transposed matrix, E[w X T XY T w Y ] represents the expectation of w X T XY T w Y , E[w X T XX T w X ] represents w X T XX T w The expectation of X , E[w Y T XY T w Y ] represents the expectation of w Y T XY T w Y ; 分别得到RDA和QDA的最大相关系数和第二大相关系数;Obtain the largest correlation coefficient and the second largest correlation coefficient of RDA and QDA, respectively; 根据得到的RDA和QDA算法的最大相关系数和第二大相关系数,生成特征向量F:According to the obtained maximum correlation coefficient and the second largest correlation coefficient of the RDA and QDA algorithms, the feature vector F is generated:
Figure FDA0002894852120000021
Figure FDA0002894852120000021
其中,
Figure FDA0002894852120000022
是QDA的最大相关系数,
Figure FDA0002894852120000023
是QDA的第二大相关系数,
Figure FDA0002894852120000024
是RDA的最大相关系数,
Figure FDA0002894852120000025
是RDA的第二大相关系数;
in,
Figure FDA0002894852120000022
is the maximum correlation coefficient of QDA,
Figure FDA0002894852120000023
is the second largest correlation coefficient of QDA,
Figure FDA0002894852120000024
is the maximum correlation coefficient of RDA,
Figure FDA0002894852120000025
is the second largest correlation coefficient of RDA;
S43、通过投影分类单元将特征向量F分为RDA-false和QDA-false两类;S43. Divide the feature vector F into two categories: RDA-false and QDA-false through the projection classification unit; 投影分类单元使用线性SVM分类器在软边界目标函数的范围内进行投影,将特征向量F投影为标量值,投影到平面后,形成一个个的点,表示为:The projection classification unit uses the linear SVM classifier to project within the range of the soft boundary objective function, and projects the feature vector F into a scalar value.
Figure FDA0002894852120000026
Figure FDA0002894852120000026
其中,vj,j=1,2,…,N是支持向量,用来确定分类器的最大边缘平面,aj>0,是可以改变并调节的参数,yj指第j个支持向量的类别,F是特征向量,b是偏差,
Figure FDA0002894852120000031
是线性核函数;
Among them, v j , j=1, 2, ..., N is the support vector, used to determine the maximum edge plane of the classifier, a j > 0, is a parameter that can be changed and adjusted, y j refers to the jth support vector category, F is the feature vector, b is the bias,
Figure FDA0002894852120000031
is a linear kernel function;
软边界目标函数为:The soft boundary objective function is:
Figure FDA0002894852120000032
Figure FDA0002894852120000032
其中,δj是松弛变量,表示样本vj是否在边缘内,需要调节程度,C是控制宽度和误分类权衡的调节系数,松弛变量用来确定点是否在范围内,W是样本总数;Among them, δ j is the slack variable, indicating whether the sample v j is within the edge, the degree of adjustment is required, C is the adjustment coefficient that controls the trade-off between width and misclassification, the slack variable is used to determine whether the point is within the range, and W is the total number of samples; 通过求解软边界目标函数,得到最大化值2/||W||,其作为边界线,根据标量值投影点的位置,将特征向量F中的特征分为RDA-false和QDA-false两类;By solving the soft boundary objective function, the maximum value 2/||W|| is obtained, which is used as the boundary line. According to the position of the scalar value projection point, the features in the feature vector F are divided into RDA-false and QDA-false. kind; S44、通过决策选择单元根据分类结果选择RDA或QDA算法的决策输出;S44, select the decision output of the RDA or QDA algorithm according to the classification result by the decision selection unit; 决策选择单元为:The decision selection unit is:
Figure FDA0002894852120000033
Figure FDA0002894852120000033
如果得到一个RDA-false结果,则模块输出QDA决策;否则,模块输出RDA决策,获得了准确率较好的脑电意识动态分类。If an RDA-false result is obtained, the module outputs the QDA decision; otherwise, the module outputs the RDA decision to obtain a dynamic classification of EEG consciousness with better accuracy.
2.根据权利要求1所述的基于线性分析的特征决策融合的脑电意识动态分类方法,其特征在于,步骤S1中采用脑波感应头盔为Emotiv采集脑电信号。2 . The dynamic classification method for EEG consciousness based on feature decision fusion based on linear analysis according to claim 1 , wherein in step S1 , an EEG sensor helmet is used to collect EEG signals for Emotiv. 3 . 3.根据权利要求1所述的基于线性分析的特征决策融合的脑电意识动态分类方法,其特征在于,步骤S2中ρRDA的求解步骤具体如下:3. the electroencephalographic consciousness dynamic classification method of the feature decision fusion based on linear analysis according to claim 1, is characterized in that, the solving step of ρ RDA in step S2 is specifically as follows: 将数据集X=(X1,X2,…,Xn)分配给K组类中的一组,在训练数据中,数据的类别是已知的,因此类别k的先验概率和平均值分别为:The dataset X = (X1, X2, ..., Xn) is assigned to one of the K groups of classes. In the training data, the class of the data is known, so the prior probability and mean of class k are:
Figure FDA0002894852120000041
Figure FDA0002894852120000041
Figure FDA0002894852120000042
Figure FDA0002894852120000042
其中,
Figure FDA0002894852120000043
是类别k的先验概率,
Figure FDA0002894852120000044
是类别k的平均值,ω是样本总数,ωk是类别k的样本数,Xn是样本点,
Figure FDA0002894852120000045
是类别k的数值的平均数;
in,
Figure FDA0002894852120000043
is the prior probability of class k,
Figure FDA0002894852120000044
is the mean of class k, ω is the total number of samples, ω k is the number of samples of class k, X n is the sample point,
Figure FDA0002894852120000045
is the mean of the values of category k;
正则判别分析RDA通过修改奇异协方差值来改善多重共线性的影响;每个类别的样本协方差估计如下:Regular discriminant analysis RDA improves the effects of multicollinearity by modifying singular covariance values; the sample covariance for each class is estimated as follows:
Figure FDA0002894852120000046
Figure FDA0002894852120000046
其中,ω是样本总数,Xn是样本点,
Figure FDA0002894852120000047
是类别k的平均值;
where ω is the total number of samples, X n is the sample points,
Figure FDA0002894852120000047
is the mean of category k;
通过引入收缩参数γ进一步调整协方差矩阵:The covariance matrix is further adjusted by introducing a shrinkage parameter γ:
Figure FDA0002894852120000048
Figure FDA0002894852120000048
其中,λ是正则化参数,0≤λ≤1,p是自变量的维数,I是单位矩阵,γ是收缩参数;where λ is the regularization parameter, 0≤λ≤1, p is the dimension of the independent variable, I is the identity matrix, and γ is the shrinkage parameter; 优化目标为J(w):The optimization objective is J(w):
Figure FDA0002894852120000051
Figure FDA0002894852120000051
上式为Sk和S的广义瑞利商,其中,Sk=ωkk
Figure FDA0002894852120000052
这就是QDA欲最大化的目标,J的最大值为矩阵Sk -1S的最大特征值,而对应的为Sk -1S的最大特征值对应的特征向量;求解得到w=Sk -112),即为确定的最佳投影方向,wT是转置的投影,将训练集中的样本向w方向投影得到:
The above formula is the generalized Rayleigh quotient of Sk and S, where Sk = ω kk ,
Figure FDA0002894852120000052
This is the goal that QDA wants to maximize. The maximum value of J is the maximum eigenvalue of the matrix S k -1 S, and the corresponding eigenvector is the eigenvector corresponding to the maximum eigenvalue of S k -1 S; solve w=S k - 112 ) is the determined optimal projection direction, w T is the transposed projection, and the samples in the training set are projected to the w direction to obtain:
y=wTX (6)y=w T X (6)
Figure FDA0002894852120000053
Figure FDA0002894852120000053
其中,
Figure FDA0002894852120000054
是权重的矩阵转置,X是数据值,
Figure FDA0002894852120000055
是数据值平均数。
in,
Figure FDA0002894852120000054
is the matrix transpose of the weights, X is the data value,
Figure FDA0002894852120000055
is the mean of the data values.
4.根据权利要求1所述的基于线性分析的特征决策融合的脑电意识动态分类方法,其特征在于,步骤S3中ρQDA的求解步骤具体如下:4. the electroencephalogram consciousness dynamic classification method of the feature decision fusion based on linear analysis according to claim 1, is characterized in that, the solving step of ρ QDA in step S3 is specifically as follows: 假设样本数据集X=(X1,X2,…,Xn)服从多元高斯分布,μi是均值向量,表示为:Assuming that the sample data set X = (X1, X2, ..., Xn) obeys the multivariate Gaussian distribution, μ i is the mean vector, expressed as:
Figure FDA0002894852120000056
Figure FDA0002894852120000056
计算样本的协方差矩阵∑j:Compute the sample covariance matrix ∑j:
Figure FDA0002894852120000057
Figure FDA0002894852120000057
其中,j=1,2;Among them, j=1, 2; 可得到类内散度矩阵Sw为:The intra-class divergence matrix S w can be obtained as:
Figure FDA0002894852120000061
Figure FDA0002894852120000061
同时定义类间散度矩阵Sb为:At the same time, the inter-class divergence matrix S b is defined as: Sb=(μ12)(μ12)T (12)S b =(μ 12 )(μ 12 ) T (12) 优化目标为J(w):The optimization objective is J(w):
Figure FDA0002894852120000062
Figure FDA0002894852120000062
上式为Sw和Sb的广义瑞利商,这就是QDA欲最大化的目标,J的最大值为矩阵Sw -1Sb的最大特征值,而对应的为Sw -1Sb的最大特征值对应的特征向量;求解得到w=Sw -112),即为确定的最佳投影方向,将训练集中的样本向w方向投影得到:The above formula is the generalized Rayleigh quotient of S w and S b , which is the goal of QDA to maximize. The maximum value of J is the largest eigenvalue of the matrix S w -1 S b , and the corresponding is S w -1 S b The eigenvector corresponding to the largest eigenvalue of ; obtain w=S w -112 ), which is the determined optimal projection direction, and project the samples in the training set to the w direction to obtain: y=wTX (14)y=w T X (14)
Figure FDA0002894852120000063
Figure FDA0002894852120000063
CN202110037508.9A 2021-01-12 2021-01-12 A dynamic classification method of EEG consciousness based on feature decision fusion based on linear analysis Active CN112733727B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202110037508.9A CN112733727B (en) 2021-01-12 2021-01-12 A dynamic classification method of EEG consciousness based on feature decision fusion based on linear analysis

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202110037508.9A CN112733727B (en) 2021-01-12 2021-01-12 A dynamic classification method of EEG consciousness based on feature decision fusion based on linear analysis

Publications (2)

Publication Number Publication Date
CN112733727A true CN112733727A (en) 2021-04-30
CN112733727B CN112733727B (en) 2022-04-19

Family

ID=75590657

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202110037508.9A Active CN112733727B (en) 2021-01-12 2021-01-12 A dynamic classification method of EEG consciousness based on feature decision fusion based on linear analysis

Country Status (1)

Country Link
CN (1) CN112733727B (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN115018046A (en) * 2022-05-17 2022-09-06 海南政法职业学院 Deep learning method for detecting malicious traffic of mobile APP

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102521505A (en) * 2011-12-08 2012-06-27 杭州电子科技大学 Brain electric and eye electric signal decision fusion method for identifying control intention
CN102629156A (en) * 2012-03-06 2012-08-08 上海大学 Method for achieving motor imagery brain computer interface based on Matlab and digital signal processor (DSP)
CN108231067A (en) * 2018-01-13 2018-06-29 福州大学 Sound scenery recognition methods based on convolutional neural networks and random forest classification
CN111259741A (en) * 2020-01-09 2020-06-09 燕山大学 Electroencephalogram signal classification method and system
CN111523601A (en) * 2020-04-26 2020-08-11 道和安邦(天津)安防科技有限公司 Latent emotion recognition method based on knowledge guidance and generation counterstudy

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102521505A (en) * 2011-12-08 2012-06-27 杭州电子科技大学 Brain electric and eye electric signal decision fusion method for identifying control intention
CN102629156A (en) * 2012-03-06 2012-08-08 上海大学 Method for achieving motor imagery brain computer interface based on Matlab and digital signal processor (DSP)
CN108231067A (en) * 2018-01-13 2018-06-29 福州大学 Sound scenery recognition methods based on convolutional neural networks and random forest classification
CN111259741A (en) * 2020-01-09 2020-06-09 燕山大学 Electroencephalogram signal classification method and system
CN111523601A (en) * 2020-04-26 2020-08-11 道和安邦(天津)安防科技有限公司 Latent emotion recognition method based on knowledge guidance and generation counterstudy

Non-Patent Citations (2)

* Cited by examiner, † Cited by third party
Title
VIKTOR ROZGIC等: "Robust EEG emotion classification using segment level decision fusion", 《2013 IEEE INTERNATIONAL CONFERENCE ON ACOUSTICS,SPEECH AND SIGNAL PROCESSING》 *
付荣荣等: "基于稀疏共空间模式和Fisher判别的单次运动想象脑电信号识别方法", 《生物医学工程学杂志》 *

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN115018046A (en) * 2022-05-17 2022-09-06 海南政法职业学院 Deep learning method for detecting malicious traffic of mobile APP
CN115018046B (en) * 2022-05-17 2023-09-15 海南政法职业学院 Deep learning method for detecting malicious flow of mobile APP

Also Published As

Publication number Publication date
CN112733727B (en) 2022-04-19

Similar Documents

Publication Publication Date Title
Rios-Urrego et al. Analysis and evaluation of handwriting in patients with Parkinson’s disease using kinematic, geometrical, and non-linear features
Paul et al. Face recognition using principal component analysis method
Faruqe et al. Face recognition using PCA and SVM
Li et al. Overview of principal component analysis algorithm
CN101329724B (en) An optimized face recognition method and device
CN113011239B (en) Motor imagery classification method based on optimal narrow-band feature fusion
CN100426314C (en) Feature classification based multiple classifiers combined people face recognition method
Chen et al. Facial recognition with PCA and machine learning methods
Zhang et al. Hierarchical feature fusion framework for frequency recognition in SSVEP-based BCIs
CN101872424A (en) Facial expression recognition method based on Gabor transform optimal channel fuzzy fusion
Pandey et al. Image processing using principle component analysis
KR101676101B1 (en) A Hybrid Method based on Dynamic Compensatory Fuzzy Neural Network Algorithm for Face Recognition
Zuobin et al. Feature regrouping for cca-based feature fusion and extraction through normalized cut
Sartipi et al. Diagnosis of schizophrenia from R-fMRI data using Ripplet transform and OLPP
KR20020057522A (en) Face-image recognition method of similarity measure using correlation
Ramakrishnan et al. Epileptic eeg signal classification using multi-class convolutional neural network
CN112733727B (en) A dynamic classification method of EEG consciousness based on feature decision fusion based on linear analysis
Kagawade et al. Savitzky–Golay filter energy features-based approach to face recognition using symbolic modeling
CN107368849B (en) Common spatial mode spatial domain feature extraction method based on cross-correlation entropy
CN106709442B (en) Face recognition method
CN105005783A (en) Method of extracting classification information from high dimensional asymmetric data
CN111275100B (en) An Image Feature Identification Method Based on Low Rank Screening of Training Set Samples
Balachander et al. An empirical comparison of dimensionality reduction techniques for pattern classification
You et al. Bayes optimal kernel discriminant analysis
Fu et al. An evidence accumulation based block diagonal cluster model for intent recognition from EEG

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
GR01 Patent grant
GR01 Patent grant