CN108108763B - EEG classification model generation method, device and electronic device - Google Patents
EEG classification model generation method, device and electronic device Download PDFInfo
- Publication number
- CN108108763B CN108108763B CN201711417656.3A CN201711417656A CN108108763B CN 108108763 B CN108108763 B CN 108108763B CN 201711417656 A CN201711417656 A CN 201711417656A CN 108108763 B CN108108763 B CN 108108763B
- Authority
- CN
- China
- Prior art keywords
- eeg
- objective function
- sample data
- subjects
- orthogonal transformation
- 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.)
- Active
Links
- 238000013145 classification model Methods 0.000 title claims abstract description 115
- 238000000034 method Methods 0.000 title claims abstract description 44
- 239000011159 matrix material Substances 0.000 claims abstract description 100
- 230000009466 transformation Effects 0.000 claims abstract description 94
- 230000006870 function Effects 0.000 claims description 104
- 238000004590 computer program Methods 0.000 claims description 22
- 238000007635 classification algorithm Methods 0.000 claims description 15
- 238000012423 maintenance Methods 0.000 abstract description 7
- 230000001131 transforming effect Effects 0.000 abstract description 2
- 230000008569 process Effects 0.000 description 16
- 238000012549 training Methods 0.000 description 10
- 230000003993 interaction Effects 0.000 description 6
- 238000005516 engineering process Methods 0.000 description 4
- 238000012545 processing Methods 0.000 description 4
- 238000004422 calculation algorithm Methods 0.000 description 3
- 230000008878 coupling Effects 0.000 description 3
- 238000010168 coupling process Methods 0.000 description 3
- 238000005859 coupling reaction Methods 0.000 description 3
- 238000010586 diagram Methods 0.000 description 3
- 238000004891 communication Methods 0.000 description 2
- 238000009795 derivation Methods 0.000 description 2
- 230000000694 effects Effects 0.000 description 2
- 238000005457 optimization Methods 0.000 description 2
- 210000004556 brain Anatomy 0.000 description 1
- 238000004364 calculation method Methods 0.000 description 1
- 210000003710 cerebral cortex Anatomy 0.000 description 1
- 230000003247 decreasing effect Effects 0.000 description 1
- 238000013461 design Methods 0.000 description 1
- 238000005315 distribution function Methods 0.000 description 1
- 238000011478 gradient descent method Methods 0.000 description 1
- 238000012986 modification Methods 0.000 description 1
- 230000004048 modification Effects 0.000 description 1
- 210000002569 neuron Anatomy 0.000 description 1
- 230000003287 optical effect Effects 0.000 description 1
- 238000011160 research Methods 0.000 description 1
- 210000004761 scalp Anatomy 0.000 description 1
- 230000008685 targeting Effects 0.000 description 1
Images
Classifications
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F18/00—Pattern recognition
- G06F18/20—Analysing
- G06F18/24—Classification techniques
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F18/00—Pattern recognition
- G06F18/20—Analysing
- G06F18/21—Design or setup of recognition systems or techniques; Extraction of features in feature space; Blind source separation
- G06F18/214—Generating training patterns; Bootstrap methods, e.g. bagging or boosting
Landscapes
- Engineering & Computer Science (AREA)
- Data Mining & Analysis (AREA)
- Theoretical Computer Science (AREA)
- Computer Vision & Pattern Recognition (AREA)
- Bioinformatics & Cheminformatics (AREA)
- Bioinformatics & Computational Biology (AREA)
- Artificial Intelligence (AREA)
- Evolutionary Biology (AREA)
- Evolutionary Computation (AREA)
- Physics & Mathematics (AREA)
- General Engineering & Computer Science (AREA)
- General Physics & Mathematics (AREA)
- Life Sciences & Earth Sciences (AREA)
- Other Investigation Or Analysis Of Materials By Electrical Means (AREA)
- Measurement And Recording Of Electrical Phenomena And Electrical Characteristics Of The Living Body (AREA)
Abstract
Description
技术领域technical field
本申请属于脑-机交互技术领域,尤其涉及一种脑电分类模型生成方法、脑电分类模型生成装置、电子设备及计算机可读存储介质。The present application belongs to the technical field of brain-computer interaction, and in particular, relates to a method for generating an EEG classification model, a device for generating an EEG classification model, an electronic device, and a computer-readable storage medium.
背景技术Background technique
脑电信号(Electroencephalogram,EEG)是脑神经细胞电生理活动在大脑皮层或头皮表面的总体反映。Electroencephalogram (EEG) is the overall reflection of the electrophysiological activity of brain nerve cells on the surface of the cerebral cortex or scalp.
目前,基于脑电信号的脑-机交互技术已成为业内研究的热点。脑-机交互技术的关键技术是如何快速有效地提取脑电信息和提高识别准确率。考虑到脑电信号具有高度的非平稳性和个体差异性,基于不同受试对象的脑电信息训练得到的脑电分类模型存在显著差异,因此,在现有的脑-机交互系统中,针对每一个受试对象分别训练独立的脑电分类模型(即每一个脑电分类模型适应于一受试对象),以期通过训练得到的脑电分类模型对相应受试对象的脑电信息进行分类处理,从而提高识别准确率。由于脑电分类模型仅可应用于一个受试对象,因此,现有的脑-机交互系统的泛化性能较差,且,随着受试对象数量的增多,脑-机交互系统所需要维护的脑电分类模型也越来越多,相应的,脑电分类模型的维护成本也随之增加。At present, brain-computer interaction technology based on EEG signals has become a research hotspot in the industry. The key technology of brain-computer interaction technology is how to extract EEG information quickly and effectively and improve the recognition accuracy. Considering the high degree of non-stationarity and individual differences of EEG signals, the EEG classification models trained based on the EEG information of different subjects have significant differences. Therefore, in the existing brain-computer interaction system, targeting at Each subject trains an independent EEG classification model (that is, each EEG classification model is adapted to a subject), in order to classify and process the EEG information of the corresponding subject through the trained EEG classification model. , so as to improve the recognition accuracy. Since the EEG classification model can only be applied to one subject, the generalization performance of the existing brain-computer interaction system is poor, and as the number of subjects increases, the brain-computer interaction system needs to maintain There are more and more EEG classification models, and correspondingly, the maintenance cost of EEG classification models also increases.
发明内容SUMMARY OF THE INVENTION
有鉴于此,本申请提供了一种脑电分类模型生成方法、脑电分类模型生成装置、电子设备及计算机可读存储介质,用以生成可应用于多个受试对象的脑电分类模型,节省脑电分类模型的维护成本。In view of this, the present application provides an EEG classification model generation method, an EEG classification model generation device, an electronic device and a computer-readable storage medium for generating an EEG classification model applicable to multiple subjects, Save maintenance cost of EEG classification model.
本申请实施例的第一方面提供了一种脑电分类模型生成方法,包括:A first aspect of the embodiments of the present application provides a method for generating an EEG classification model, including:
获取K个受试对象的样本数据,其中,所述样本数据包含:已分类的脑电信息以及相应脑电信息的分类结果,所述K大于或等于2;Obtaining sample data of K subjects, wherein the sample data includes: classified EEG information and classification results of the corresponding EEG information, and the K is greater than or equal to 2;
基于所述K个受试对象的样本数据和预设的第一目标函数,计算使所述第一目标函数取最小值的正交变换矩阵,其中,所述第一目标函数为与正交变换矩阵和K个受试对象的脑电信息相关的函数,所述正交变换矩阵用以将所述K个受试对象各自的脑电信息变换为所述K个受试对象之间的相关性信息;Based on the sample data of the K subjects and a preset first objective function, an orthogonal transformation matrix that makes the first objective function take a minimum value is calculated, wherein the first objective function is an orthogonal transformation with The matrix is a function related to the EEG information of the K subjects, and the orthogonal transformation matrix is used to transform the respective EEG information of the K subjects into the correlation between the K subjects information;
基于所述正交变换矩阵生成脑电分类模型,以便采用所述脑电分类模型对所述K个受试对象中的任一受试对象的脑电信息进行分类。An EEG classification model is generated based on the orthogonal transformation matrix, so as to classify the EEG information of any one of the K subjects by using the EEG classification model.
基于本申请第一方面,在第一种可能的实现方式中,所述第一目标函数为:Based on the first aspect of the present application, in a first possible implementation manner, the first objective function is:
所述第一目标函数中的Nk表示第k个受试对象的样本数据个数,Nl表示第l个受试对象的样本数据个数,P表示正交变换矩阵,PT为P的转置,表示xi,k的转置,xi,k表示第k个受试对象的第i个样本数据中的脑电信息,表示xj,l的转置,xj,l表示第l个受试对象的第j个样本数据中的脑电信息; In the first objective function, N k represents the number of sample data of the k-th subject, N l represents the number of sample data of the l-th subject, P represents an orthogonal transformation matrix, and P T is the Transpose, represents the transpose of x i, k , x i,k represents the EEG information in the i-th sample data of the k-th subject, represents the transpose of x j, l , x j,l represents the EEG information in the jth sample data of the lth subject;
所述基于所述K个受试对象的样本数据和预设的第一目标函数,计算使所述第一目标函数取最小值的正交变换矩阵为:Described based on the sample data of the K subjects and the preset first objective function, the orthogonal transformation matrix that calculates the minimum value of the first objective function is:
在满足PPT=I的条件下,基于所述K个受试对象的样本数据,计算使所述第一目标函数取最小值的P,其中,所述I为单位矩阵。Under the condition that PP T =I is satisfied, based on the sample data of the K subjects, calculate P that minimizes the first objective function, where I is an identity matrix.
基于本申请第一方面的第一种可能的实现方式,在第二种可能的实现方式中,所述基于所述正交变换矩阵生成脑电分类模型包括:Based on the first possible implementation manner of the first aspect of the present application, in a second possible implementation manner, the generating an EEG classification model based on the orthogonal transformation matrix includes:
根据计算得到的正交变换矩阵、所述第一目标函数和预设的第二目标函数,基于拉格朗日表达式确定所述第二目标函数中的第一权向量、第二权向量和偏置值;According to the obtained orthogonal transformation matrix, the first objective function and the preset second objective function, determine the first weight vector, the second weight vector and the second objective function based on the Lagrangian expression offset value;
基于所述正交变换矩阵以及确定出的所述第一权向量、所述第二权向量和所述偏置值生成脑电分类模型;generating an EEG classification model based on the orthogonal transformation matrix and the determined first weight vector, the second weight vector and the bias value;
其中,所述第二目标函数为:Wherein, the second objective function is:
且所述第二目标函数满足: And the second objective function satisfies:
ρi,k表示第k个受试对象的第i个样本数据的贡献程度,εi,k为xi,k的松弛变量,Ck和λ为大于0的值,yi,k表示第k个受试对象的第i个样本数据的分类结果,为Wk的转置,Wk表示与第k个受试对象相关的第一权向量,VT为V的转置,V表示第二权向量,bk表示与第k个受试对象相关的偏置值。ρ i,k represents the contribution of the i-th sample data of the k-th subject, ε i,k is the slack variable of x i,k , C k and λ are values greater than 0, y i,k represents the ith The classification result of the ith sample data of k subjects, is the transpose of W k , W k represents the first weight vector related to the k-th subject, V T is the transpose of V, V represents the second weight vector, and b k represents the k-th subject related to the subject offset value.
基于本申请第一方面的第二种可能的实现方式,在第三种可能的实现方式中,所述基于所述正交变换矩阵以及确定出的所述第一权向量、所述第二权向量和所述偏置值生成脑电分类模型为:Based on the second possible implementation manner of the first aspect of the present application, in a third possible implementation manner, the first weight vector and the second weight vector determined based on the orthogonal transformation matrix and the determined The vector and the bias value generate the EEG classification model as:
基于正交变换矩阵以及确定出的所述第一权向量、所述第二权向量和所述偏置值生成脑电分类模型的分类算法;A classification algorithm for generating an EEG classification model based on the orthogonal transformation matrix and the determined first weight vector, the second weight vector and the bias value;
所述分类算法为: The classification algorithm is:
其中,当k′=k时,Zi,k=Pxi,k,当k′≠k时,Zi,k=Qxi,k,且,且,αi,k'和bk满足等式[K+Z]·α=Y,在所述等式中, Among them, when k'=k, Z i,k =Px i,k , when k'≠k, Z i,k =Qx i,k , and, And, α i,k' and b k satisfy the equation [K+Z]·α=Y, in which,
本申请第二方面提供一种脑电分类模型生成装置,包括:A second aspect of the present application provides a device for generating an EEG classification model, including:
获取单元,用于获取K个受试对象的样本数据,其中,所述样本数据包含:已分类的脑电信息以及相应脑电信息的分类结果,所述K大于或等于2;an obtaining unit, configured to obtain sample data of K subjects, wherein the sample data includes: classified EEG information and a classification result of the corresponding EEG information, and the K is greater than or equal to 2;
计算单元,用于基于所述K个受试对象的样本数据和预设的第一目标函数,计算使所述第一目标函数取最小值的正交变换矩阵,其中,所述第一目标函数为与正交变换矩阵和K个受试对象的脑电信息相关的函数,所述正交变换矩阵用以将所述K个受试对象各自的脑电信息变换为所述K个受试对象之间的相关性信息;A computing unit for calculating an orthogonal transformation matrix that makes the first objective function take a minimum value based on the sample data of the K subjects and a preset first objective function, wherein the first objective function is a function related to an orthogonal transformation matrix and the EEG information of the K subjects, and the orthogonal transformation matrix is used to transform the respective EEG information of the K subjects into the K subjects Correlation information between;
生成单元,用于基于所述正交变换矩阵生成脑电分类模型,以便采用所述脑电分类模型对所述K个受试对象中的任一受试对象的脑电信息进行分类。A generating unit, configured to generate an EEG classification model based on the orthogonal transformation matrix, so as to classify the EEG information of any one of the K subjects by using the EEG classification model.
基于本申请第二方面,在第一种可能的实现方式中,所述第一目标函数为:Based on the second aspect of the present application, in a first possible implementation manner, the first objective function is:
所述第一目标函数中的Nk表示第k个受试对象的样本数据个数,Nl表示第l个受试对象的样本数据个数,P表示正交变换矩阵,PT为P的转置,表示xi,k的转置,xi,k表示第k个受试对象的第i个样本数据中的脑电信息,表示xj,l的转置,xj,l表示第l个受试对象的第j个样本数据中的脑电信息; In the first objective function, N k represents the number of sample data of the k-th subject, N l represents the number of sample data of the l-th subject, P represents an orthogonal transformation matrix, and P T is the Transpose, represents the transpose of x i, k , x i,k represents the EEG information in the i-th sample data of the k-th subject, represents the transpose of x j, l , x j,l represents the EEG information in the jth sample data of the lth subject;
所述计算单元具体用于:在满足PPT=I的条件下,基于所述K个受试对象的样本数据,计算使所述第一目标函数取最小值的P,其中,所述I为单位矩阵。The computing unit is specifically configured to: under the condition that PPT =I is satisfied, based on the sample data of the K subjects, calculate P that makes the first objective function take the minimum value, wherein the I is identity matrix.
基于本申请第二方面的第一种可能的实现方式,在第二种可能的实现方式中,所述生成单元包括:Based on the first possible implementation manner of the second aspect of the present application, in the second possible implementation manner, the generating unit includes:
确定单元,用于根据所述计算单元计算得到的正交变换矩阵、所述第一目标函数和预设的第二目标函数,基于拉格朗日表达式确定所述第二目标函数中的第一权向量、第二权向量和偏置值;The determining unit is used to determine the first objective function in the second objective function based on the Lagrangian expression according to the orthogonal transformation matrix, the first objective function and the preset second objective function calculated by the computing unit. a weight vector, a second weight vector and a bias value;
子生成单元,用于基于所述正交变换矩阵以及所述确定单元确定出的所述第一权向量、所述第二权向量和所述偏置值生成脑电分类模型;a sub-generating unit, configured to generate an EEG classification model based on the orthogonal transformation matrix and the first weight vector, the second weight vector and the bias value determined by the determining unit;
其中,所述第二目标函数为:Wherein, the second objective function is:
且所述第二目标函数满足: And the second objective function satisfies:
ρi,k表示第k个受试对象的第i个样本数据的贡献程度,εi,k为xi,k的松弛变量,Ck和λ为大于0的值,yi,k表示第k个受试对象的第i个样本数据的分类结果,为Wk的转置,Wk表示与第k个受试对象相关的第一权向量,VT为V的转置,V表示第二权向量,bk表示与第k个受试对象相关的偏置值。ρ i,k represents the contribution of the i-th sample data of the k-th subject, ε i,k is the slack variable of x i,k , C k and λ are values greater than 0, y i,k represents the ith The classification result of the ith sample data of k subjects, is the transpose of W k , W k represents the first weight vector related to the k-th subject, V T is the transpose of V, V represents the second weight vector, and b k represents the k-th subject related to the subject offset value.
基于本申请第二方面的第二种可能的实现方式,在第三种可能的实现方式中,所述子生成模型具体用于:Based on the second possible implementation manner of the second aspect of the present application, in the third possible implementation manner, the sub-generating model is specifically used for:
基于正交变换矩阵以及确定出的所述第一权向量、所述第二权向量和所述偏置值生成脑电分类模型的分类算法;A classification algorithm for generating an EEG classification model based on the orthogonal transformation matrix and the determined first weight vector, the second weight vector and the bias value;
所述分类算法为: The classification algorithm is:
其中,当k′=k时,Zi,k=Pxi,k,当k′≠k时,Zi,k=Qxi,k,且,且,αi,k'和bk满足等式[K+Z]·α=Y,在所述等式中, Among them, when k'=k, Z i,k =Px i,k , when k'≠k, Z i,k =Qx i,k , and, And, α i,k' and b k satisfy the equation [K+Z]·α=Y, in which,
本申请第三方面提供一种电子设备,包括存储器,处理器及存储在存储器上并可在处理器上运行的计算机程序,上述处理器执行上述计算机程序时实现上述第一方面或者上述第一方面的任一可能实现方式中提及的脑电分类模型生成方法。A third aspect of the present application provides an electronic device, including a memory, a processor, and a computer program stored in the memory and executable on the processor, where the processor implements the first aspect or the first aspect when the processor executes the computer program. The EEG classification model generation method mentioned in any possible implementation manner of .
本申请第四方面提供一种计算机可读存储介质,该计算机可读存储介质上存储有计算机程序,上述计算机程序被处理器执行时实现上述第一方面或者上述第一方面的任一可能实现方式中提及的脑电分类模型生成方法。A fourth aspect of the present application provides a computer-readable storage medium, where a computer program is stored on the computer-readable storage medium, and when the computer program is executed by a processor, the foregoing first aspect or any possible implementation manner of the foregoing first aspect is implemented The EEG classification model generation method mentioned in .
本申请第五方面提供了一种计算机程序产品,所述计算机程序产品包括计算机程序,所述计算机程序被一个或多个处理器执行时实现上述第一方面或者上述第一方面的任一可能实现方式中提及的脑电分类模型生成方法。A fifth aspect of the present application provides a computer program product, the computer program product includes a computer program, and the computer program implements the first aspect or any possible implementation of the first aspect when the computer program is executed by one or more processors The EEG classification model generation method mentioned in the method.
由上可见,本申请通过获取K个受试对象的样本数据,并基于K个受试对象的样本数据和第一目标函数计算正交变换矩阵,之后基于该正交变换矩阵生成脑电分类模型。由于正交变换矩阵可用以将K个受试对象各自的脑电信息变换为K个受试对象之间的相关性信息,因此,基于该正交变换矩阵生成的脑电分类模型可以适应K个受试对象之间脑电信息的差异性,从而使得生成的脑电分类模型可应用于K个受试对象,由于多个受试对象可以共用同一脑电分类模型,因此,相对于传统方案,本申请可以针对多个受试对象维护一个脑电分类模式,有效节省了脑电分类模型的维护成本。As can be seen from the above, the present application obtains the sample data of K subjects, and calculates an orthogonal transformation matrix based on the sample data of K subjects and the first objective function, and then generates an EEG classification model based on the orthogonal transformation matrix. . Since the orthogonal transformation matrix can be used to transform the respective EEG information of the K subjects into the correlation information between the K subjects, the EEG classification model generated based on the orthogonal transformation matrix can adapt to K The difference of EEG information between subjects makes the generated EEG classification model applicable to K subjects. Since multiple subjects can share the same EEG classification model, compared with the traditional scheme, The present application can maintain an EEG classification mode for multiple subjects, which effectively saves the maintenance cost of the EEG classification model.
附图说明Description of drawings
为了更清楚地说明本申请实施例中的技术方案,下面将对实施例或现有技术描述中所需要使用的附图作简单地介绍,显而易见地,下面描述中的附图仅仅是本申请的一些实施例,对于本领域普通技术人员来讲,在不付出创造性劳动性的前提下,还可以根据这些附图获得其他的附图。In order to illustrate the technical solutions in the embodiments of the present application more clearly, the following briefly introduces the accompanying drawings that need to be used in the description of the embodiments or the prior art. Obviously, the drawings in the following description are only for the present application. In some embodiments, for those of ordinary skill in the art, other drawings can also be obtained according to these drawings without any creative effort.
图1-a为本申请提供的脑电分类模型生成方法一个实施例流程示意图;1-a is a schematic flowchart of an embodiment of a method for generating an EEG classification model provided by the application;
图1-b为本申请提供的脑电分类模型的算法框架示意图;1-b is a schematic diagram of the algorithm framework of the EEG classification model provided by the application;
图2为本申请提供的脑电分类模型生成装置一个实施例结构示意图;2 is a schematic structural diagram of an embodiment of an EEG classification model generation device provided by the present application;
图3为本申请提供的电子设备一个实施例结构示意图。FIG. 3 is a schematic structural diagram of an embodiment of the electronic device provided by the present application.
具体实施方式Detailed ways
以下描述中,为了说明而不是为了限定,提出了诸如特定系统结构、技术之类的具体细节,以便透彻理解本申请实施例。然而,本领域的技术人员应当清楚,在没有这些具体细节的其它实施例中也可以实现本申请。在其它情况中,省略对众所周知的系统、装置、电路以及方法的详细说明,以免不必要的细节妨碍本申请的描述。In the following description, for the purpose of illustration rather than limitation, specific details such as a specific system structure and technology are set forth in order to provide a thorough understanding of the embodiments of the present application. However, it will be apparent to those skilled in the art that the present application may be practiced in other embodiments without these specific details. In other instances, detailed descriptions of well-known systems, devices, circuits, and methods are omitted so as not to obscure the description of the present application with unnecessary detail.
应理解,下述方法实施例中各步骤的序号的大小并不意味着执行顺序的先后,各过程的执行顺序应以其功能和内在逻辑确定,而不应对各实施例的实施过程构成任何限定。It should be understood that the size of the sequence numbers of the steps in the following method embodiments does not mean the sequence of execution, and the execution sequence of each process should be determined by its function and internal logic, and should not constitute any limitation to the implementation process of each embodiment. .
为了说明本申请所述的技术方案,下面通过具体实施例来进行说明。In order to illustrate the technical solutions described in the present application, the following specific embodiments are used for description.
实施例一Example 1
本申请实施例提供一种脑电分类模型生成方法,该脑电分类模型生成方法可应用于脑电分类模型生成装置中,该脑电分类模型生成装置可以为独立的设备,或者,脑电分类模型生成装置也可以集成在电子设备(例如智能手机、平板电脑、计算机以及可穿戴设备等)中。可选的,集成该脑电分类模型生成装置的设备或电子设备所搭载的操作系统可以为ios系统、android系统、windows系统或其它操作系统,此处不作限定。The embodiment of the present application provides a method for generating an EEG classification model. The method for generating an EEG classification model can be applied to a device for generating an EEG classification model. The device for generating an EEG classification model can be an independent device, or an EEG classification model. The model generation apparatus can also be integrated in electronic devices (such as smartphones, tablets, computers, and wearable devices, etc.). Optionally, the operating system carried by the device or electronic device that integrates the EEG classification model generating apparatus may be an ios system, an android system, a windows system or other operating systems, which is not limited here.
请参阅图1-a,本申请实施例中的脑电分类模型生成方法可包括:Referring to FIG. 1-a, the method for generating an EEG classification model in the embodiment of the present application may include:
步骤101、获取K个受试对象的样本数据;
本申请实施例中,受试对象的样本数据包含:该受试对象的已分类的脑电信息以及相应脑电信息的分类结果。在实际应用中,针对K个受试对象中的任一受试对象,可以由技术人员对受试对象的部分脑电信息人工进行分类,以获得相应脑电信息的分类结果,进而得到受试对象的样本数据,在基于样本数据完成脑电分类模型的生成(即训练)之后,后续即可利用生成的脑电分类模型对该受试对象的脑电信息进行自动分类。In the embodiment of the present application, the sample data of the subject includes: the classified EEG information of the subject and the classification result of the corresponding EEG information. In practical applications, for any subject among the K subjects, technicians can manually classify part of the subject's EEG information to obtain the classification result of the corresponding EEG information, and then obtain the subject's EEG information. For the sample data of the subject, after the generation (ie, training) of the EEG classification model is completed based on the sample data, the generated EEG classification model can be used to automatically classify the EEG information of the subject.
在本申请实施例中,脑电信息是指从脑电信号中提取出的特征信息,具体的,脑电信号的采集过程以及脑电信息的提取过程可以参照已有技术实现,此处不再赘述。In the embodiments of this application, EEG information refers to feature information extracted from EEG signals. Specifically, the process of collecting EEG signals and the process of extracting EEG information can be implemented with reference to the prior art, which is not repeated here. Repeat.
在本申请实施例中,上述K大于或等于2,也即,步骤101中获取的是多个受试对象的样本数据。In the embodiment of the present application, the above K is greater than or equal to 2, that is, the sample data of a plurality of subjects is acquired in
步骤102、基于上述K个受试对象的样本数据和预设的第一目标函数,计算使上述第一目标函数取最小值的正交变换矩阵;
本申请实施例中,可将每个受试对象视作多任务学习中的每个任务。结合隐含结构学习理论,假设存在一个共享隐空间,该共享隐空间所包含的信息为通过正交变换矩阵对多个受试对象的脑电信息进行变换后得到的多个受试对象之间的相关性信息。通过利用最大联合概率分布准则,发掘多个任务映射到共享隐空间中的相关性信息,并利用该相关性信息帮助提升各个任务的学习效果,以此实现多任务学习。In this embodiment of the present application, each subject can be regarded as each task in multi-task learning. Combined with the theory of latent structure learning, it is assumed that there is a shared latent space, and the information contained in the shared latent space is obtained by transforming the EEG information of multiple subjects through an orthogonal transformation matrix. relevance information. By using the maximum joint probability distribution criterion, the correlation information of multiple tasks mapped to the shared latent space is explored, and the correlation information is used to help improve the learning effect of each task, so as to realize multi-task learning.
在步骤102中,正交变换矩阵用以将K个受试对象各自的脑电信息变换为上述K个受试对象之间的相关性信息。第一目标函数为与正交变换矩阵和K个受试对象的脑电信息相关的函数。具体的,第一目标函数可以通过如下方式推导得到:In
根据高斯分布函数对于隐含空间中任意第k个任务和第l个任务,其Parzen窗密度估计可以分别表示为:According to the Gaussian distribution function For any k-th task and l-th task in the latent space, the Parzen window density estimation can be expressed as:
经过推导,最小化第k个任务和第l个任务的分布差异∫k,l(Pk(X)-Pl(X))2dX,应使得最小,也即,最小化如下式 经过一系列数学推导,可得到如下求解正交变换矩阵P的第一目标函数:After derivation, minimizing the distribution difference between the k-th task and the l-th task ∫ k,l (P k (X)-P l (X)) 2 dX should be such that Minimum, that is, minimize the following formula After a series of mathematical derivations, the first objective function for solving the orthogonal transformation matrix P can be obtained as follows:
在上述第一目标函数中,Nk表示第k个受试对象的样本数据个数,Nl表示第l个受试对象的样本数据个数,P表示正交变换矩阵,PT为P的转置,表示xi,k的转置,xi,k表示第k个受试对象的第i个样本数据中的脑电信息,表示xj,l的转置,xj,l表示第l个受试对象的第j个样本数据中的脑电信息。 In the above first objective function, N k represents the number of sample data of the k-th subject, N l represents the number of sample data of the l-th subject, P represents the orthogonal transformation matrix, and P T is the Transpose, represents the transpose of x i, k , x i,k represents the EEG information in the i-th sample data of the k-th subject, represents the transpose of x j, l , and x j,l represents the EEG information in the jth sample data of the lth subject.
基于上述第一目标函数,步骤102具体可以表现为:在满足PPT=I的条件下,基于上述K个受试对象的样本数据,计算使上述第一目标函数取最小值的P(也即正交变换矩阵),其中,上述E为单位矩阵。具体的,在满足PPT=I的条件下,基于上述K个受试对象的样本数据,可以采用梯度下降法计算计算使上述第一目标函数取最小值的P。Based on the above-mentioned first objective function, step 102 can specifically be expressed as: under the condition that PPT = 1 is satisfied, based on the sample data of the above-mentioned K subjects, calculate P (that is, the minimum value of the above-mentioned first objective function) Orthogonal transformation matrix), wherein, the above-mentioned E is the identity matrix. Specifically, under the condition that PPT =I is satisfied, based on the sample data of the K subjects, the gradient descent method can be used to calculate and calculate P that makes the first objective function take the minimum value.
可选的,在计算上述正交变换矩阵的过程中,除了利用已分类的脑电信息之外,还可以利用已采集但未分类的脑电信息。则步骤101获取的样本数据还可以包括:已采集但未分类的脑电信息。Optionally, in the process of calculating the above-mentioned orthogonal transformation matrix, in addition to the classified EEG information, the collected but unclassified EEG information may also be used. The sample data obtained in
步骤103、基于上述正交变换矩阵生成脑电分类模型;
在步骤103中,基于步骤102计算得到的正交变换矩阵生成脑电分类模型,以便采用该脑电分类模型对上述K个受试对象中的任一受试对象的脑电信息进行分类。In
设本申请实施例中的脑电分类模型的算法框架如图1-b所示,该脑电分类模型包括两个学习部分,即基于原始数据空间的学习和基于共享隐空间的学习。其中,原始数据空间中的数据为多个受试对象各自的脑电信息,而共享隐空间中的数据为不同受试对象之间的相关性信息(相关性信息为由脑电信息通过正交变换矩阵变换得到)。最后将基于原始数据空间的学习结果和基于共享隐空间的学习结果进行结合。记原始数据空间的维数为d,共享隐空间的维数为r,则上述两个部分的学习过程可用如下最优化问题进行描述:Assume that the algorithm framework of the EEG classification model in the embodiment of the present application is shown in Fig. 1-b. The EEG classification model includes two learning parts, namely learning based on the original data space and learning based on the shared latent space. Among them, the data in the original data space is the respective EEG information of multiple subjects, and the data in the shared latent space is the correlation information between different subjects (the correlation information is the transformation matrix transformation). Finally, the learning results based on the original data space and the learning results based on the shared latent space are combined. Denote the dimension of the original data space as d and the dimension of the shared latent space as r, then the learning process of the above two parts can be described by the following optimization problem:
s.t.PPT=Id×d stPP T =I d×d
其中,Wk表示与第k个受试对象相关的第一权向量,V表示第二权向量,且和P为将各受试对象的脑电信息从原始数据空间投影到共享隐空间的正交变换矩阵共享隐空间的维度记为r。φ(·)则表示共享隐空间中各受试对象之间的相关性信息,可表示为:where W k represents the first weight vector associated with the k-th subject, V represents the second weight vector, and and P is the orthogonal transformation matrix that projects the EEG information of each subject from the original data space to the shared latent space The dimension of the shared latent space is denoted as r. φ( ) represents the correlation information between subjects in the shared latent space, which can be expressed as:
对K个任务(如前述,每个受试对象视为一任务),gk(·)是对第k个任务的独立性信息最优化,可表示为:For K tasks (as mentioned above, each subject is regarded as a task), g k ( ) is the k-th task The independence information optimization of , can be expressed as:
其中,bk是与第k个受试对象相关的偏置值,Ck和λ为大于0的值。where b k is the bias value associated with the k-th subject, and C k and λ are values greater than 0.
在此基础上,步骤103可以包括:On this basis,
根据计算得到的正交变换矩阵、所述第一目标函数和预设的第二目标函数,基于拉格朗日表达式确定所述第二目标函数中的第一权向量、第二权向量和偏置值;According to the obtained orthogonal transformation matrix, the first objective function and the preset second objective function, determine the first weight vector, the second weight vector and the second objective function based on the Lagrangian expression offset value;
基于所述正交变换矩阵以及确定出的所述第一权向量、所述第二权向量和所述偏置值生成脑电分类模型;generating an EEG classification model based on the orthogonal transformation matrix and the determined first weight vector, the second weight vector and the bias value;
其中,所述第二目标函数为:Wherein, the second objective function is:
且所述第二目标函数满足: And the second objective function satisfies:
ρi,k表示第k个受试对象的第i个样本数据的贡献程度,εi,k为xi,k的松弛变量,yi,k表示第k个受试对象的第i个样本数据的分类结果,为Wk的转置,Wk表示与第k个受试对象相关的第一权向量,VT为V的转置,V表示第二权向量。ρ i,k represents the contribution of the i-th sample data of the k-th subject, ε i,k is the slack variable of x i,k , y i,k represents the i-th sample of the k-th subject The classification result of the data, is the transpose of W k , W k represents the first weight vector related to the k-th subject, V T is the transpose of V, and V represents the second weight vector.
进一步,上述基于上述正交变换矩阵以及确定出的上述第一权向量、上述第二权向量和上述偏置值生成脑电分类模型为:Further, the above-mentioned generation of the EEG classification model based on the above-mentioned orthogonal transformation matrix and the determined above-mentioned first weight vector, above-mentioned second weight vector and above-mentioned bias value is:
基于正交变换矩阵以及确定出的所述第一权向量、所述第二权向量和所述偏置值生成脑电分类模型的分类算法;A classification algorithm for generating an EEG classification model based on the orthogonal transformation matrix and the determined first weight vector, the second weight vector and the bias value;
所述分类算法为: The classification algorithm is:
其中,当k′=k时,Zi,k=Pxi,k,当k′≠k时,Zi,k=Qxi,k,且,Among them, when k'=k, Z i,k =Px i,k , when k'≠k, Z i,k =Qx i,k , and,
且,αi,k'和bk满足等式[K+Z]·α=Y,在上述等式中, And, α i,k' and b k satisfy the equation [K+Z]·α=Y, in the above equation,
本申请实施例后,通过上述分类算法即可对受试对象的脑电信息进行分类。After the embodiment of the present application, the EEG information of the subject can be classified by the above classification algorithm.
由上可见,本申请实施例通过获取K个受试对象的样本数据,并基于K个受试对象的样本数据和第一目标函数计算正交变换矩阵,之后基于该正交变换矩阵生成脑电分类模型。由于正交变换矩阵可用以将K个受试对象各自的脑电信息变换为K个受试对象之间的相关性信息,因此,基于该正交变换矩阵生成的脑电分类模型可以适应K个受试对象之间脑电信息的差异性,从而使得生成的脑电分类模型可应用于K个受试对象,由于多个受试对象可以共用同一脑电分类模型,因此,相对于传统方案,本申请可以针对多个受试对象维护一个脑电分类模式,有效节省了脑电分类模型的维护成本。进一步,由于在生成脑电分类模型的过程中是基于多个受试对象的样本数据进行训练,且利用多个受试对象之间的相关性信息对训练过程进行修正,因此,相对于传统的基于单一受试对象的样本数据进行训练而得到的脑电分类模型,本申请实施例中生成的脑电分类模型可在一定程度上提高各受试对象的脑电分类精度。As can be seen from the above, the embodiment of the present application obtains the sample data of the K subjects, and calculates an orthogonal transformation matrix based on the sample data of the K subjects and the first objective function, and then generates an EEG based on the orthogonal transformation matrix. classification model. Since the orthogonal transformation matrix can be used to transform the respective EEG information of the K subjects into the correlation information between the K subjects, the EEG classification model generated based on the orthogonal transformation matrix can adapt to K The difference of EEG information between subjects makes the generated EEG classification model applicable to K subjects. Since multiple subjects can share the same EEG classification model, compared with the traditional scheme, The present application can maintain an EEG classification mode for multiple subjects, which effectively saves the maintenance cost of the EEG classification model. Further, since the process of generating the EEG classification model is based on the sample data of multiple subjects for training, and the correlation information between multiple subjects is used to revise the training process, therefore, compared with the traditional Based on the EEG classification model obtained by training the sample data of a single subject, the EEG classification model generated in the embodiment of the present application can improve the EEG classification accuracy of each subject to a certain extent.
实施例二Embodiment 2
本申请实施例提供一种脑电分类模型生成装置,如图2所示,本申请实施例中的脑电分类模型生成装置200包括:An embodiment of the present application provides an apparatus for generating an EEG classification model. As shown in FIG. 2 , the apparatus for generating an
获取单元201,用于获取K个受试对象的样本数据,其中,所述样本数据包含:已分类的脑电信息以及相应脑电信息的分类结果,所述K大于或等于2;The obtaining
计算单元202,用于基于所述K个受试对象的样本数据和预设的第一目标函数,计算使所述第一目标函数取最小值的正交变换矩阵,其中,所述第一目标函数为与正交变换矩阵和K个受试对象的脑电信息相关的函数,所述正交变换矩阵用以将所述K个受试对象各自的脑电信息变换为所述K个受试对象之间的相关性信息;A
生成单元203,用于基于所述正交变换矩阵生成脑电分类模型,以便采用所述脑电分类模型对所述K个受试对象中的任一受试对象的脑电信息进行分类。The generating
可选的,所述第一目标函数为:Optionally, the first objective function is:
所述第一目标函数中的Nk表示第k个受试对象的样本数据个数,Nl表示第l个受试对象的样本数据个数,P表示正交变换矩阵,PT为P的转置,表示xi,k的转置,xi,k表示第k个受试对象的第i个样本数据中的脑电信息,表示xj,l的转置,xj,l表示第l个受试对象的第j个样本数据中的脑电信息; In the first objective function, N k represents the number of sample data of the k-th subject, N l represents the number of sample data of the l-th subject, P represents an orthogonal transformation matrix, and P T is the Transpose, represents the transpose of x i, k , x i,k represents the EEG information in the i-th sample data of the k-th subject, represents the transpose of x j, l , x j,l represents the EEG information in the jth sample data of the lth subject;
计算单元202具体用于:在满足PPT=I的条件下,基于所述K个受试对象的样本数据,计算使所述第一目标函数取最小值的P,其中,所述I为单位矩阵。The
可选的,生成单元203包括:Optionally, the generating
确定单元,用于根据计算单元202计算得到的正交变换矩阵、所述第一目标函数和预设的第二目标函数,基于拉格朗日表达式确定所述第二目标函数中的第一权向量、第二权向量和偏置值;The determining unit is used to determine the first objective function in the second objective function based on the Lagrangian expression according to the orthogonal transformation matrix, the first objective function and the preset second objective function calculated by the
子生成单元,用于基于所述正交变换矩阵以及所述确定单元确定出的所述第一权向量、所述第二权向量和所述偏置值生成脑电分类模型;a sub-generating unit, configured to generate an EEG classification model based on the orthogonal transformation matrix and the first weight vector, the second weight vector and the bias value determined by the determining unit;
其中,所述第二目标函数为:Wherein, the second objective function is:
且所述第二目标函数满足: And the second objective function satisfies:
ρi,k表示第k个受试对象的第i个样本数据的贡献程度,εi,k为xi,k的松弛变量,Ck和λ为大于0的值,yi,表示第k个受试对象的第i个样本数据的分类结果,为Wk的转置,Wk表示与第k个受试对象相关的第一权向量,VT为V的转置,V表示第二权向量,bk表示与第k个受试对象相关的偏置值。ρ i,k represents the contribution of the i-th sample data of the k-th subject, ε i,k is the slack variable of x i,k , C k and λ are values greater than 0, y i, represents the k-th The classification result of the i-th sample data of the subjects, is the transpose of W k , W k represents the first weight vector related to the k-th subject, V T is the transpose of V, V represents the second weight vector, and b k represents the k-th subject related to the subject offset value.
可选的,所述子生成模型具体用于:Optionally, the sub-generating model is specifically used for:
基于正交变换矩阵以及确定出的所述第一权向量、所述第二权向量和所述偏置值生成脑电分类模型的分类算法;A classification algorithm for generating an EEG classification model based on the orthogonal transformation matrix and the determined first weight vector, the second weight vector and the bias value;
所述分类算法为: The classification algorithm is:
其中,当k′=k时,Zi,k=Pxi,k,当k′≠k时,Zi,k=Qxi,k,且,且,αi,k'和bk满足等式[K+Z]·α=Y,在所述等式中, Among them, when k'=k, Z i,k =Px i,k , when k'≠k, Z i,k =Qx i,k , and, And, α i,k' and b k satisfy the equation [K+Z]·α=Y, in which,
需要说明的是,本申请实施例中的脑电分类模型生成装置可以为独立的设备,或者,脑电分类模型生成装置也可以集成在电子设备(例如智能手机、平板电脑、计算机以及可穿戴设备等)中。可选的,集成该脑电分类模型生成装置的设备或电子设备所搭载的操作系统可以为ios系统、android系统、windows系统或其它操作系统,此处不作限定。It should be noted that the apparatus for generating an EEG classification model in this embodiment of the present application may be an independent device, or the apparatus for generating an EEG classification model may also be integrated into electronic devices (such as smartphones, tablet computers, computers, and wearable devices). etc.) in. Optionally, the operating system carried by the device or electronic device that integrates the EEG classification model generating apparatus may be an ios system, an android system, a windows system or other operating systems, which is not limited here.
由上可见,本申请实施例通过获取K个受试对象的样本数据,并基于K个受试对象的样本数据和第一目标函数计算正交变换矩阵,之后基于该正交变换矩阵生成脑电分类模型。由于正交变换矩阵可用以将K个受试对象各自的脑电信息变换为K个受试对象之间的相关性信息,因此,基于该正交变换矩阵生成的脑电分类模型可以适应K个受试对象之间脑电信息的差异性,从而使得生成的脑电分类模型可应用于K个受试对象,由于多个受试对象可以共用同一脑电分类模型,因此,相对于传统方案,本申请可以针对多个受试对象维护一个脑电分类模式,有效节省了脑电分类模型的维护成本。进一步,由于在生成脑电分类模型的过程中是基于多个受试对象的样本数据进行训练,且利用多个受试对象之间的相关性信息对训练过程进行修正,因此,相对于传统的基于单一受试对象的样本数据进行训练而得到的脑电分类模型,本申请实施例中生成的脑电分类模型可在一定程度上提高各受试对象的脑电分类精度。As can be seen from the above, the embodiment of the present application obtains the sample data of the K subjects, and calculates an orthogonal transformation matrix based on the sample data of the K subjects and the first objective function, and then generates an EEG based on the orthogonal transformation matrix. classification model. Since the orthogonal transformation matrix can be used to transform the respective EEG information of the K subjects into the correlation information between the K subjects, the EEG classification model generated based on the orthogonal transformation matrix can adapt to K The difference of EEG information between subjects makes the generated EEG classification model applicable to K subjects. Since multiple subjects can share the same EEG classification model, compared with the traditional scheme, The present application can maintain an EEG classification mode for multiple subjects, which effectively saves the maintenance cost of the EEG classification model. Further, since the process of generating the EEG classification model is based on the sample data of multiple subjects for training, and the correlation information between multiple subjects is used to revise the training process, therefore, compared with the traditional Based on the EEG classification model obtained by training the sample data of a single subject, the EEG classification model generated in the embodiment of the present application can improve the EEG classification accuracy of each subject to a certain extent.
实施例三Embodiment 3
本申请实施例提供一种电子设备,请参阅图3,本申请实施例中的电子设备包括:存储器301,一个或多个处理器302(图3中仅示出一个)及存储在存储器301上并可在处理器上运行的计算机程序。其中:存储器301用于存储软件程序以及模块,处理器302通过运行存储在存储器301的软件程序以及单元,从而执行各种功能应用以及数据处理。具体地,处理器302通过运行存储在存储器301的上述计算机程序时实现以下步骤:An embodiment of the present application provides an electronic device, please refer to FIG. 3 , the electronic device in the embodiment of the present application includes: a
获取K个受试对象的样本数据,其中,所述样本数据包含:已分类的脑电信息以及相应脑电信息的分类结果,所述K大于或等于2;Obtaining sample data of K subjects, wherein the sample data includes: classified EEG information and classification results of the corresponding EEG information, and the K is greater than or equal to 2;
基于所述K个受试对象的样本数据和预设的第一目标函数,计算使所述第一目标函数取最小值的正交变换矩阵,其中,所述第一目标函数为与正交变换矩阵和K个受试对象的脑电信息相关的函数,所述正交变换矩阵用以将所述K个受试对象各自的脑电信息变换为所述K个受试对象之间的相关性信息;Based on the sample data of the K subjects and a preset first objective function, an orthogonal transformation matrix that makes the first objective function take a minimum value is calculated, wherein the first objective function is an orthogonal transformation with The matrix is a function related to the EEG information of the K subjects, and the orthogonal transformation matrix is used to transform the respective EEG information of the K subjects into the correlation between the K subjects information;
基于所述正交变换矩阵生成脑电分类模型,以便采用所述脑电分类模型对所述K个受试对象中的任一受试对象的脑电信息进行分类。An EEG classification model is generated based on the orthogonal transformation matrix, so as to classify the EEG information of any one of the K subjects by using the EEG classification model.
假设上述为第一种可能的实施方式,则在第一种可能的实施方式作为基础而提供的第二种可能的实施方式中,所述第一目标函数为:Assuming that the above is the first possible implementation manner, in the second possible implementation manner provided on the basis of the first possible implementation manner, the first objective function is:
所述第一目标函数中的Nk表示第k个受试对象的样本数据个数,Nl表示第l个受试对象的样本数据个数,P表示正交变换矩阵,PT为P的转置,表示xi,k的转置,xi,k表示第k个受试对象的第i个样本数据中的脑电信息,表示xj,l的转置,xj,l表示第l个受试对象的第j个样本数据中的脑电信息; In the first objective function, N k represents the number of sample data of the k-th subject, N l represents the number of sample data of the l-th subject, P represents an orthogonal transformation matrix, and P T is the Transpose, represents the transpose of x i, k , x i,k represents the EEG information in the i-th sample data of the k-th subject, represents the transpose of x j, l , x j,l represents the EEG information in the jth sample data of the lth subject;
所述基于所述K个受试对象的样本数据和预设的第一目标函数,计算使所述第一目标函数取最小值的正交变换矩阵为:Described based on the sample data of the K subjects and the preset first objective function, the orthogonal transformation matrix that calculates the minimum value of the first objective function is:
在满足PPT=I的条件下,基于所述K个受试对象的样本数据,计算使所述第一目标函数取最小值的P,其中,所述I为单位矩阵。Under the condition that PP T =I is satisfied, based on the sample data of the K subjects, calculate P that minimizes the first objective function, where I is an identity matrix.
在上述第二种可能的实现方式作为基础而提供的第三种可能的实施方式中,所述基于所述正交变换矩阵生成脑电分类模型包括:In a third possible implementation manner provided on the basis of the above-mentioned second possible implementation manner, the generating an EEG classification model based on the orthogonal transformation matrix includes:
根据计算得到的正交变换矩阵、所述第一目标函数和预设的第二目标函数,基于拉格朗日表达式确定所述第二目标函数中的第一权向量、第二权向量和偏置值;According to the obtained orthogonal transformation matrix, the first objective function and the preset second objective function, determine the first weight vector, the second weight vector and the second objective function based on the Lagrangian expression offset value;
基于所述正交变换矩阵以及确定出的所述第一权向量、所述第二权向量和所述偏置值生成脑电分类模型;generating an EEG classification model based on the orthogonal transformation matrix and the determined first weight vector, the second weight vector and the bias value;
其中,所述第二目标函数为:Wherein, the second objective function is:
且所述第二目标函数满足: And the second objective function satisfies:
ρi,k表示第k个受试对象的第i个样本数据的贡献程度,εi,k为xi,k的松弛变量,Ck和λ为大于0的值,yi,k表示第k个受试对象的第i个样本数据的分类结果,为Wk的转置,Wk表示与第k个受试对象相关的第一权向量,VT为V的转置,V表示第二权向量,bk表示与第k个受试对象相关的偏置值。ρ i,k represents the contribution of the i-th sample data of the k-th subject, ε i,k is the slack variable of x i,k , C k and λ are values greater than 0, y i,k represents the ith The classification result of the ith sample data of k subjects, is the transpose of W k , W k represents the first weight vector related to the k-th subject, V T is the transpose of V, V represents the second weight vector, and b k represents the k-th subject related to the subject offset value.
在上述第三种可能的实现方式作为基础而提供的第四种可能的实施方式中,所述基于所述正交变换矩阵以及确定出的所述第一权向量、所述第二权向量和所述偏置值生成脑电分类模型为:In the fourth possible implementation manner provided on the basis of the above-mentioned third possible implementation manner, the first weight vector, the second weight vector and the determined based on the orthogonal transformation matrix and the The bias value generates an EEG classification model as follows:
基于正交变换矩阵以及确定出的所述第一权向量、所述第二权向量和所述偏置值生成脑电分类模型的分类算法;A classification algorithm for generating an EEG classification model based on the orthogonal transformation matrix and the determined first weight vector, the second weight vector and the bias value;
所述分类算法为: The classification algorithm is:
其中,当k′=k时,Zi,k=Pxi,k,当k′≠k时,Zi,k=Qxi,k,且,Among them, when k'=k, Z i,k =Px i,k , when k'≠k, Z i,k =Qx i,k , and,
且,αi,k'和bk满足等式[K+Z]·α=Y,在所述等式中, And, α i,k' and b k satisfy the equation [K+Z]·α=Y, in which,
可选的,如图3所示,上述电子设备还可包括:一个或多个输入设备303(图3中仅示出一个)和一个或多个输出设备304(图3中仅示出一个)。存储器301、处理器302、输入设备303和输出设备304通过总线305连接。Optionally, as shown in FIG. 3 , the above electronic device may further include: one or more input devices 303 (only one is shown in FIG. 3 ) and one or more output devices 304 (only one is shown in FIG. 3 ) . The
应当理解,在本申请实施例中,所称处理器302可以是中央处理单元(CentralProcessing Unit,CPU),该处理器还可以是其他通用处理器、数字信号处理器(DigitalSignal Processor,DSP)、专用集成电路(Application Specific Integrated Circuit,ASIC)、现成可编程门阵列(Field-Programmable Gate Array,FPGA)或者其他可编程逻辑器件、分立门或者晶体管逻辑器件、分立硬件组件等。通用处理器可以是微处理器或者该处理器也可以是任何常规的处理器等。It should be understood that, in this embodiment of the present application, the
输入设备303可以包括键盘、触控板、指纹采传感器(用于采集用户的指纹信息和指纹的方向信息)、麦克风等,输出设备304可以包括显示器、扬声器等。The
存储器304可以包括只读存储器和随机存取存储器,并向处理器301提供指令和数据。存储器304的一部分或全部还可以包括非易失性随机存取存储器。例如,存储器304还可以存储设备类型的信息。
由上可见,本申请通过获取K个受试对象的样本数据,并基于K个受试对象的样本数据和第一目标函数计算正交变换矩阵,之后基于该正交变换矩阵生成脑电分类模型。由于正交变换矩阵可用以将K个受试对象各自的脑电信息变换为K个受试对象之间的相关性信息,因此,基于该正交变换矩阵生成的脑电分类模型可以适应K个受试对象之间脑电信息的差异性,从而使得生成的脑电分类模型可应用于K个受试对象,由于多个受试对象可以共用同一脑电分类模型,因此,相对于传统方案,本申请可以针对多个受试对象维护一个脑电分类模式,有效节省了脑电分类模型的维护成本。进一步,由于在生成脑电分类模型的过程中是基于多个受试对象的样本数据进行训练,且利用多个受试对象之间的相关性信息对训练过程进行修正,因此,相对于传统的基于单一受试对象的样本数据进行训练而得到的脑电分类模型,本申请实施例中生成的脑电分类模型可在一定程度上提高各受试对象的脑电分类精度。As can be seen from the above, the present application obtains the sample data of K subjects, and calculates an orthogonal transformation matrix based on the sample data of K subjects and the first objective function, and then generates an EEG classification model based on the orthogonal transformation matrix. . Since the orthogonal transformation matrix can be used to transform the respective EEG information of the K subjects into the correlation information between the K subjects, the EEG classification model generated based on the orthogonal transformation matrix can adapt to K The difference of EEG information between subjects makes the generated EEG classification model applicable to K subjects. Since multiple subjects can share the same EEG classification model, compared with the traditional scheme, The present application can maintain an EEG classification mode for multiple subjects, which effectively saves the maintenance cost of the EEG classification model. Further, since the process of generating the EEG classification model is based on the sample data of multiple subjects for training, and the correlation information between multiple subjects is used to revise the training process, therefore, compared with the traditional Based on the EEG classification model obtained by training the sample data of a single subject, the EEG classification model generated in the embodiment of the present application can improve the EEG classification accuracy of each subject to a certain extent.
所属领域的技术人员可以清楚地了解到,为了描述的方便和简洁,仅以上述各功能单元、模块的划分进行举例说明,实际应用中,可以根据需要而将上述功能分配由不同的功能单元、模块完成,即将上述装置的内部结构划分成不同的功能单元或模块,以完成以上描述的全部或者部分功能。实施例中的各功能单元、模块可以集成在一个处理单元中,也可以是各个单元单独物理存在,也可以两个或两个以上单元集成在一个单元中,上述集成的单元既可以采用硬件的形式实现,也可以采用软件功能单元的形式实现。另外,各功能单元、模块的具体名称也只是为了便于相互区分,并不用于限制本申请的保护范围。上述系统中单元、模块的具体工作过程,可以参考前述方法实施例中的对应过程,在此不再赘述。Those skilled in the art can clearly understand that, for the convenience and simplicity of description, only the division of the above-mentioned functional units and modules is used as an example. Module completion, that is, dividing the internal structure of the above device into different functional units or modules to complete all or part of the functions described above. Each functional unit and module in the embodiment may be integrated in one processing unit, or each unit may exist physically alone, or two or more units may be integrated in one unit, and the above-mentioned integrated units may adopt hardware. It can also be realized in the form of software functional units. In addition, the specific names of the functional units and modules are only for the convenience of distinguishing from each other, and are not used to limit the protection scope of the present application. For the specific working processes of the units and modules in the above-mentioned system, reference may be made to the corresponding processes in the foregoing method embodiments, which will not be repeated here.
在上述实施例中,对各个实施例的描述都各有侧重,某个实施例中没有详述或记载的部分,可以参见其它实施例的相关描述。In the foregoing embodiments, the description of each embodiment has its own emphasis. For parts that are not described or described in detail in a certain embodiment, reference may be made to the relevant descriptions of other embodiments.
本领域普通技术人员可以意识到,结合本文中所公开的实施例描述的各示例的单元及算法步骤,能够以电子硬件、或者计算机软件和电子硬件的结合来实现。这些功能究竟以硬件还是软件方式来执行,取决于技术方案的特定应用和设计约束条件。专业技术人员可以对每个特定的应用来使用不同方法来实现所描述的功能,但是这种实现不应认为超出本申请的范围。Those of ordinary skill in the art can realize that the units and algorithm steps of each example described in conjunction with the embodiments disclosed herein can be implemented in electronic hardware, or a combination of computer software and electronic hardware. Whether these functions are performed in hardware or software depends on the specific application and design constraints of the technical solution. Skilled artisans may implement the described functionality using different methods for each particular application, but such implementations should not be considered beyond the scope of this application.
在本申请所提供的实施例中,应该理解到,所揭露的装置和方法,可以通过其它的方式实现。例如,以上所描述的系统实施例仅仅是示意性的,例如,上述模块或单元的划分,仅仅为一种逻辑功能划分,实际实现时可以有另外的划分方式,例如多个单元或组件可以结合或者可以集成到另一个系统,或一些特征可以忽略,或不执行。另一点,所显示或讨论的相互之间的耦合或直接耦合或通讯连接可以是通过一些接口,装置或单元的间接耦合或通讯连接,可以是电性,机械或其它的形式。In the embodiments provided in this application, it should be understood that the disclosed apparatus and method may be implemented in other manners. For example, the system embodiments described above are only illustrative. For example, the division of the above-mentioned modules or units is only a logical function division. In actual implementation, there may be other division methods. For example, multiple units or components may be combined. Either it can be integrated into another system, or some features can be omitted, or not implemented. On the other hand, the shown or discussed mutual coupling or direct coupling or communication connection may be through some interfaces, indirect coupling or communication connection of devices or units, and may be in electrical, mechanical or other forms.
上述作为分离部件说明的单元可以是或者也可以不是物理上分开的,作为单元显示的部件可以是或者也可以不是物理单元,即可以位于一个地方,或者也可以分布到多个网络单元上。可以根据实际的需要选择其中的部分或者全部单元来实现本实施例方案的目的。The units described above as separate components may or may not be physically separated, and components shown as units may or may not be physical units, that is, may be located in one place, or may be distributed to multiple network units. Some or all of the units may be selected according to actual needs to achieve the purpose of the solution in this embodiment.
上述集成的单元如果以软件功能单元的形式实现并作为独立的产品销售或使用时,可以存储在一个计算机可读取存储介质中。基于这样的理解,本申请实现上述实施例方法中的全部或部分流程,也可以通过计算机程序来指令相关的硬件来完成,上述的计算机程序可存储于一计算机可读存储介质中,该计算机程序在被处理器执行时,可实现上述各个方法实施例的步骤。其中,上述计算机程序包括计算机程序代码,上述计算机程序代码可以为源代码形式、对象代码形式、可执行文件或某些中间形式等。上述计算机可读介质可以包括:能够携带上述计算机程序代码的任何实体或装置、记录介质、U盘、移动硬盘、磁碟、光盘、计算机存储器、只读存储器(ROM,Read-Only Memory)、随机存取存储器(RAM,RandomAccess Memory)、电载波信号、电信信号以及软件分发介质等。需要说明的是,上述计算机可读介质包含的内容可以根据司法管辖区内立法和专利实践的要求进行适当的增减,例如在某些司法管辖区,根据立法和专利实践,计算机可读介质不包括是电载波信号和电信信号。If the above-mentioned integrated units are implemented in the form of software functional units and sold or used as independent products, they may be stored in a computer-readable storage medium. Based on this understanding, the present application realizes all or part of the processes in the methods of the above-mentioned embodiments, and can also be completed by instructing the relevant hardware through a computer program. The above-mentioned computer program can be stored in a computer-readable storage medium. The computer program When executed by a processor, the steps of each of the above method embodiments can be implemented. Wherein, the above-mentioned computer program includes computer program code, and the above-mentioned computer program code may be in the form of source code, object code form, executable file or some intermediate form. The above-mentioned computer-readable medium may include: any entity or device capable of carrying the above-mentioned computer program code, recording medium, U disk, mobile hard disk, magnetic disk, optical disk, computer memory, read-only memory (ROM, Read-Only Memory), random Access memory (RAM, RandomAccess Memory), electric carrier signal, telecommunication signal and software distribution medium, etc. It should be noted that the content contained in the above-mentioned computer-readable media may be appropriately increased or decreased according to the requirements of legislation and patent practice in the jurisdiction, for example, in some jurisdictions, according to legislation and patent practice, the computer-readable media does not Included are electrical carrier signals and telecommunication signals.
以上上述实施例仅用以说明本申请的技术方案,而非对其限制;尽管参照前述实施例对本申请进行了详细的说明,本领域的普通技术人员应当理解:其依然可以对前述各实施例所记载的技术方案进行修改,或者对其中部分技术特征进行等同替换;而这些修改或者替换,并不使相应技术方案的本质脱离本申请各实施例技术方案的精神和范围,均应包含在本申请的保护范围之内。The above-mentioned embodiments are only used to illustrate the technical solutions of the present application, but not to limit them; although the present application has been described in detail with reference to the above-mentioned embodiments, those of ordinary skill in the art should understand that the above-mentioned embodiments can still be used for The recorded technical solutions are modified, or some technical features thereof are equivalently replaced; and these modifications or replacements do not make the essence of the corresponding technical solutions deviate from the spirit and scope of the technical solutions of the embodiments of the application, and should be included in the present application. within the scope of protection of the application.
Claims (8)
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201711417656.3A CN108108763B (en) | 2017-12-25 | 2017-12-25 | EEG classification model generation method, device and electronic device |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201711417656.3A CN108108763B (en) | 2017-12-25 | 2017-12-25 | EEG classification model generation method, device and electronic device |
Publications (2)
Publication Number | Publication Date |
---|---|
CN108108763A CN108108763A (en) | 2018-06-01 |
CN108108763B true CN108108763B (en) | 2021-07-23 |
Family
ID=62212781
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN201711417656.3A Active CN108108763B (en) | 2017-12-25 | 2017-12-25 | EEG classification model generation method, device and electronic device |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN108108763B (en) |
Citations (11)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN102573619A (en) * | 2008-12-19 | 2012-07-11 | 新加坡科技研究局 | Device and method for generating a representation of a subject's attention level |
CN103092971A (en) * | 2013-01-24 | 2013-05-08 | 电子科技大学 | Classification method used in brain-computer interfaces |
CN103116279A (en) * | 2013-01-16 | 2013-05-22 | 大连理工大学 | Fuzzy discrete event shared control method for brain-controlled robot system |
CN103425249A (en) * | 2013-09-06 | 2013-12-04 | 西安电子科技大学 | Electroencephalogram signal classifying and recognizing method based on regularized CSP and regularized SRC and electroencephalogram signal remote control system |
CN104536572A (en) * | 2014-12-30 | 2015-04-22 | 天津大学 | Cross-individual universal type brain-computer interface method based on event related potential |
CN104771163A (en) * | 2015-01-30 | 2015-07-15 | 杭州电子科技大学 | Electroencephalogram feature extraction method based on CSP and R-CSP algorithms |
CN106709469A (en) * | 2017-01-03 | 2017-05-24 | 中国科学院苏州生物医学工程技术研究所 | Automatic sleep staging method based on multiple electroencephalogram and electromyography characteristics |
CN106803081A (en) * | 2017-01-25 | 2017-06-06 | 东南大学 | A kind of brain electricity sorting technique based on Multi-classifers integrated |
CN107169434A (en) * | 2017-05-10 | 2017-09-15 | 广东工业大学 | One kind possesses the electric personal identification method of exclusive brain |
CN107292329A (en) * | 2017-04-19 | 2017-10-24 | 西北工业大学 | Event imagination sorting technique based on CI CSP algorithms |
CN107479685A (en) * | 2016-06-07 | 2017-12-15 | 林闯 | Brain electric control method and brain controller for electric consumption |
Family Cites Families (5)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
WO2014018661A1 (en) * | 2012-07-24 | 2014-01-30 | Cerephex Corporation | Method and apparatus for diagnosing and assessing central pain |
EP3441896B1 (en) * | 2012-09-14 | 2021-04-21 | InteraXon Inc. | Systems and methods for collecting, analyzing, and sharing bio-signal and non-bio-signal data |
US20140371544A1 (en) * | 2013-06-14 | 2014-12-18 | Medtronic, Inc. | Motion-based behavior identification for controlling therapy |
AT515038B1 (en) * | 2013-10-21 | 2015-12-15 | Guger Christoph Dipl Ing Dr Techn | Method for quantifying the perceptibility of a person |
WO2016077530A1 (en) * | 2014-11-12 | 2016-05-19 | The University Of Memphis | Fully reconfigurable modular body-worn sensors |
-
2017
- 2017-12-25 CN CN201711417656.3A patent/CN108108763B/en active Active
Patent Citations (11)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN102573619A (en) * | 2008-12-19 | 2012-07-11 | 新加坡科技研究局 | Device and method for generating a representation of a subject's attention level |
CN103116279A (en) * | 2013-01-16 | 2013-05-22 | 大连理工大学 | Fuzzy discrete event shared control method for brain-controlled robot system |
CN103092971A (en) * | 2013-01-24 | 2013-05-08 | 电子科技大学 | Classification method used in brain-computer interfaces |
CN103425249A (en) * | 2013-09-06 | 2013-12-04 | 西安电子科技大学 | Electroencephalogram signal classifying and recognizing method based on regularized CSP and regularized SRC and electroencephalogram signal remote control system |
CN104536572A (en) * | 2014-12-30 | 2015-04-22 | 天津大学 | Cross-individual universal type brain-computer interface method based on event related potential |
CN104771163A (en) * | 2015-01-30 | 2015-07-15 | 杭州电子科技大学 | Electroencephalogram feature extraction method based on CSP and R-CSP algorithms |
CN107479685A (en) * | 2016-06-07 | 2017-12-15 | 林闯 | Brain electric control method and brain controller for electric consumption |
CN106709469A (en) * | 2017-01-03 | 2017-05-24 | 中国科学院苏州生物医学工程技术研究所 | Automatic sleep staging method based on multiple electroencephalogram and electromyography characteristics |
CN106803081A (en) * | 2017-01-25 | 2017-06-06 | 东南大学 | A kind of brain electricity sorting technique based on Multi-classifers integrated |
CN107292329A (en) * | 2017-04-19 | 2017-10-24 | 西北工业大学 | Event imagination sorting technique based on CI CSP algorithms |
CN107169434A (en) * | 2017-05-10 | 2017-09-15 | 广东工业大学 | One kind possesses the electric personal identification method of exclusive brain |
Non-Patent Citations (2)
Title |
---|
Classification of Motor Imagery Tasks Using Phase Synchronization Analysis of EEG Based on Multivariate Empirical Mode Decomposition;Shuang Liang,etc.;《Proceedings of 2014 4th IEEE International Conference on Information Science and Technology》;20140426;第675-678页 * |
基于人工神经网络的脑电信号模式分类;佚名;《https://wenku.baidu.com/view/ec0dddefe009581b6bd9eb55.html》;20120320;第1-3页 * |
Also Published As
Publication number | Publication date |
---|---|
CN108108763A (en) | 2018-06-01 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
WO2021218060A1 (en) | Face recognition method and device based on deep learning | |
EP4181020A1 (en) | Model training method and apparatus | |
KR102619981B1 (en) | Gesture classification apparatus and method using electromyogram signals | |
WO2022105118A1 (en) | Image-based health status identification method and apparatus, device and storage medium | |
AU2018310377A1 (en) | Method and apparatus for encrypting data, method and apparatus for training machine learning model, and electronic device | |
CN107169454A (en) | A kind of facial image age estimation method, device and its terminal device | |
CN112418059B (en) | Emotion recognition method and device, computer equipment and storage medium | |
WO2022188793A1 (en) | Electrophysiological signal classification processing method and apparatus, computer device and storage medium | |
WO2023174036A1 (en) | Federated learning model training method, electronic device and storage medium | |
CN115169384A (en) | Electroencephalogram classification model training method, intention identification method, equipment and medium | |
KR20240140057A (en) | Facial recognition method and device | |
Almadan et al. | Benchmarking neural network compression techniques for ocular-based user authentication on smartphones | |
CN112036316A (en) | Finger vein identification method and device, electronic equipment and readable storage medium | |
CN108108763B (en) | EEG classification model generation method, device and electronic device | |
CN112329633B (en) | Emotion identification method, device, medium and electronic equipment based on tensor decomposition | |
CN115251953B (en) | Motor imagery electroencephalogram signal identification method, device, terminal equipment and storage medium | |
CN104463190B (en) | Age estimation method and equipment | |
CN111081372A (en) | Disease diagnosis method, device, terminal device and computer-readable storage medium | |
CN110728189A (en) | Lp/q-mixed norm-based spatial filtering method and device | |
US20230045753A1 (en) | Spectral clustering of high-dimensional data | |
Baali et al. | Inequality indexes as sparsity measures applied to ventricular ectopic beats detection and its efficient hardware implementation | |
Tan et al. | Group sparse structural smoothing recovery: model, statistical properties and algorithm | |
CN114372889A (en) | Underwriting monitoring method, device, computer equipment and storage medium | |
CN113554119A (en) | Neural network-based product tendency identification method and related device | |
CN109978009A (en) | Behavior classification method, device and storage medium based on wearable intelligent equipment |
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 |