Patent ID: 11937934
Assignee: YANSHAN UNIVERSITY
Field: Medical technology (Instruments)
Classification: CPC A  G | IPC A  G

Claim 0:
1. An electroencephalogram (EEG) decoding method based on a non-negative CANDECOMP/PARAFAC (CP) decomposition model, wherein the method comprises the following steps of
step 1, acquiring frequency components of EEG data, constructing four-order tensor data including channel, frequency, time and test modes, dividing the four-order tensor data into a training set χtrain and a testing set χtest, calculating an average value χ of the training set χtrain, and decomposing χ to obtain three component matrixes χ=I×1A×2B×3C+E, wherein A∈c×m represents a channel component matrix, B∈f×m represents a frequency component matrix, C∈t×m represents a time component matrix, I∈m×m×m represents a unit cubic tensor, E∈m×m×m represents an error tensor, c represents a channel, f represents a frequency, t represents a time, and m represents a dimension of the unit cubic tensor;
step 2, based on interaction of modes of the tensor, extracting characteristics of the time components from χtrain and χtest by using a component matrix A and a component matrix B, which are expressed as:, C
    train
   
   =
   
    
     
      
       (
       
        X
        train
       
       )
      
      
       (
       3
       )
      
     
     [
     
      
       (
       
        B
        ⊙
        A
       
       )
      
      T
     
     ]
    
    †
   
  
  ,
  
   
    C
    test
   
   =
   
    
     
      
       (
       
        X
        test
       
       )
      
      
       (
       3
       )
      
     
     [
     
      
       (
       
        B
        ⊙
        A
       
       )
      
      T
     
     ]
    
    †
   
  
 

in a formula, ⊙ represents a Khatri-Rao multiple of a matrix, a superscript † represents pseudo inverse of the matrix, a subscript 3 represents a third mode of the tensor, Ctrain∈t×m×sr, Ctest∈t×m×se, sr represent the number of training tests, and se represents the number of testing tests;
step 3, optimizing a characteristic dimension of the time component by adopting a two-dimensional principal component analysis (2-DPCA) algorithm; and comprising the following steps of
step 31: calculating a covariance matrix in Ctrain:, G
    t
   
   =
   
    
     1
     sr
    
    ⁢
    
     
      ∑
      
       j
       =
       1
      
      sr
     
     
      {
      
       
        
         [
         
          
           C
           
            train
            ,
            j
           
           
            t
            ×
            m
           
          
          -
          
           E
           ⁡
           (
           
            C
            
             train
             ,
             j
            
            
             t
             ×
             m
            
           
           )
          
         
         ]
        
        T
       
       [
       
        
         C
         
          train
          ,
          j
         
         
          t
          ×
          m
         
        
        -
        
         E
         ⁡
         (
         
          C
          
           train
           ,
           j
          
          
           t
           ×
           m
          
         
         )
        
       
       ]
      
      }
     
    
   
  
  ,
 

calculating a characteristic value and a characteristic vector, and taking l characteristic vectors having a cumulative contribution rate of 0.97 of the characteristic value in the characteristic vector to form a column direction projection space P∈m×l, l<m, a column direction projection result is Ftrain,j=Ctrain,jP, Ftest,j=Ctest,jP;
in the formula, Gt is a mean value of a sample covarianc matrix in Ctrain,, E
   ⁡
   (
   
    C
    train
   
   )
  
  =
  
   
    1
    sr
   
   ⁢
   
    
     ∑
     
      j
      =
      1
     
     sr
    
    
     C
     
      train
      ,
      j
     
     
      t
      ×
      m, is a mean value of a sample in Ctrain, sr represents the number of the training tests, t represents time, and m represents a dimension of a unit cubic tensor I;

step 32, calculating a covariance matrix in Ftrain:, G
    t
    *
   
   =
   
    
     1
     sr
    
    ⁢
    
     
      ∑
      
       j
       =
       1
      
      sr
     
     
      {
      
       
        
         [
         
          
           F
           
            train
            ,
            j
           
           
            t
            ×
            l
           
          
          -
          
           E
           ⁡
           (
           
            F
            
             train
             ,
             j
            
            
             t
             ×
             l
            
           
           )
          
         
         ]
        
        [
        
         
          F
          
           train
           ,
           j
          
          
           t
           ×
           l
          
         
         -
         
          E
          ⁡
          (
          
           F
           
            train
            ,
            j
           
           
            t
            ×
            l
           
          
          )
         
        
        ]
       
       T
      
      }
     
    
   
  
  ;
 

in the formula, Gt* is a mean value of a sample covariance matrix in Ftrain,, E
   ⁡
   (
   
    F
    train
   
   )
  
  =
  
   
    1
    sr
   
   ⁢
   
    
     ∑
     
      j
      =
      1
     
     sr
    
    
     F
     
      train
      ,
      j
     
     
      t
      ×
      l, is a mean value of the sample in Ftrain, sr represents the number of the training tests, t represents time, and m represents a dimension of the unit cubic tensor I;

step 33, evaluating the characteristic value and the characteristic vector of Gt*, and taking d characteristic vectors having a cumulative contribution rate of 0.97 of the characteristic value in the characteristic vector to form a row direction projection space V∈t×d, d<t;
step 34, the obtained projection result is expressed as:

Qtrain,j=VTCtrain,jP, Qtest,j=VTCtest,jP; 

in the formula, V is a projection space in a row direction, P is a projection space in a column direction, Ctrain,j is a single time component characteristic, Qtrain,j and Qtest,j are the characteristics of the optimized training data and testing data, respectively, and a superscript T represents a transposition of the matrix;

step 4, training a support vector machine with the training data to get a classification model, and then verifying classification performance of the model with the testing data to get the classification accuracy;
controlling movement of an external device according to the classification model's decoding result of EEG data of left and right hand movements.