# Simultaneously Spatiospectral Pattern Learning and Contaminated Trial Pruning for Electroencephalography-Based Brain Computer Interface

^{1}

^{2}

^{3}

^{4}

^{5}

^{*}

## Abstract

**:**

## 1. Introduction

- A particle-based approximation technique was developed to iteratively construct a filter band and detect potential contamination trials. The spectral and spatial features were learnt as the contaminated trials were eliminated during classifier training that led to improved MI classification accuracy;
- The discriminative power of a feature and the contamination level of a trial were simultaneously estimated by the difference of the class conditional probability density function (pdf) instead of using mutual information. The class conditional pdf was estimated by the Parzen window density estimator;
- The importance weight (particle weight) of each feature was estimated by analysis of variance (ANOVA) F-tests with the use of the class conditional pdf that can be simply implemented.

## 2. Parzen Windows-Based Spatiospectral Patterns with Trial Pruning

#### 2.1. Spatiospectral Filter Optimization

**x**are usually extracted by the following three steps:

- (1)
- spectral filtering: $z=h\otimes x$;
- (2)
- spatial filtering: $y={W}^{T}z$;
- (3)
- feature extraction: $f=\mathrm{log}\left(\mathrm{var}\left(y\right)\right)$;

**,**and the feature $f$ were computed deterministically, $p\left(\mathit{b}|\mathit{X},\Omega \right)$ could be directly obtained by a posterior pdf $p\left(\mathit{f}|\mathit{X},\Omega \right)$.

#### 2.2. Importance Weight Update Rule for Particles

#### 2.3. Trial Pruning Process

#### 2.4. Mixture of Expert Classifiers

#### 2.5. Performance Evaluation

## 3. Experimental Results and Analysis

#### 3.1. Dataset

#### 3.2. Setting of PWSPTP

#### 3.3. Effects of Numbers of Particles

#### 3.4. Effects of Pruning Percentages

#### 3.5. Visualization of Spatial Patterns and Distribution of Discriminative Frequency Band

#### 3.6. Classification Performance

## 4. Discussion

#### 4.1. Effect of Number of Particles on the Classification Accuracy

#### 4.2. Effect of Pruning Percentages on the Training Phase

#### 4.3. Asymmetrical Spatial Patterns on Left- versus Right-Hand MI Classification

#### 4.4. Effect of Trial Pruning on Paired Binary MI Classification Performance

## 5. Conclusions and Future Work

## Author Contributions

## Funding

## Conflicts of Interest

## References

- Pfurtscheller, G.; Neuper, C. Motor imagery and direct brain-computer communication. Proc. IEEE
**2001**, 89, 1123–1134. [Google Scholar] [CrossRef] - Palaniappan, R.; Mandic, D.P. Biometrics from brain electrical activity: A machine learning approach. IEEE Trans. Pattern Anal. Mach. Intell.
**2007**, 29, 738–742. [Google Scholar] [CrossRef] [PubMed] - Cecotti, H. A self-paced and calibration-less SSVEP-based brain–computer interface speller. IEEE Trans. Neural Syst. Rehabil. Eng.
**2010**, 18, 127–133. [Google Scholar] [CrossRef] [PubMed] - Cecotti, H.; Graser, A. Convolutional neural networks for P300 detection with application to brain-computer interfaces. IEEE Trans. Pattern Anal. Mach. Intell.
**2011**, 33, 433–445. [Google Scholar] [CrossRef] - Pfurtscheller, G.; da Silva, F.L. Event-related EEG/MEG synchronization and desynchronization: Basic principles. Clin. Neurophysiol.
**1999**, 10, 1842–1857. [Google Scholar] [CrossRef] - Ramoser, H.; Muller-Gerking, J.; Pfurtscheller, G. Optimal spatial filtering of single trial EEG during imagined hand movement. IEEE Trans. Rehabil. Eng.
**2000**, 8, 441–446. [Google Scholar] [CrossRef] [Green Version] - Lotte, F.; Congedo, M.; Lécuyer, A.; Lamarche, F.; Arnaldi, B. A review of classification algorithms for EEG-based brain–computer interfaces. J. Neural Eng.
**2007**, 4, R1. [Google Scholar] [CrossRef] - Blankertz, B.; Tomioka, R.; Lemm, S.; Kawanabe, M.; Muller, K.-R. Optimizing spatial filters for robust EEG single-trial analysis. IEEE Signal Process. Mag.
**2008**, 25, 41–56. [Google Scholar] [CrossRef] - Wang, H.; Zheng, W. Local temporal common spatial patterns for robust single-trial EEG classification. IEEE Trans. Neural Syst. Rehabil. Eng.
**2008**, 16, 131–139. [Google Scholar] [CrossRef] [PubMed] - Bashashati, A.; Fatourechi, M.; Ward, R.K.; Birch, G.E. A survey of signal processing algorithms in brain–computer interfaces based on electrical brain signals. J. Neural Eng.
**2007**, 4, R32. [Google Scholar] [CrossRef] [PubMed] [Green Version] - Blankertz, B.; Kawanabe, M.; Tomioka, R.; Hohlefeld, F.; Müller, K.-R.; Nikulin, V.V. Invariant common spatial patterns: Alleviating nonstationarities in brain-computer interfacing. In Advances in Neural Information Processing Systems; Massachusetts Institute of Technology Press: Cambridge, MA, USA, 2007; pp. 113–120. [Google Scholar]
- Wang, B.; Wong, C.M.; Wan, F.; Mak, P.U.; Mak, P.-I.; Vai, M.I. Trial pruning based on genetic Algorithm for Single-Trial EEG Classification. Comput. Electr. Eng.
**2012**, 38, 35–44. [Google Scholar] [CrossRef] - Lemm, S.; Blankertz, B.; Curio, G.; Muller, K.-R. Spatio-spectral filters for improving the classification of single trial EEG. IEEE Trans. Biomed. Eng.
**2005**, 52, 1541–1548. [Google Scholar] [CrossRef] [PubMed] - Dornhege, G.; Blankertz, B.; Krauledat, M.; Losch, F.; Curio, G.; Muller, K.-R. Combined optimization of spatial and temporal filters for improving brain-computer interfacing. IEEE Trans. Biomed. Eng.
**2006**, 53, 2274–2281. [Google Scholar] [CrossRef] [PubMed] - Tomioka, R.; Müller, K.-R. A regularized discriminative framework for EEG analysis with application to brain–computer interface. Neuroimage
**2010**, 49, 415–432. [Google Scholar] [CrossRef] - Wu, W.; Gao, X.; Hong, B.; Gao, S. Classifying single-trial EEG during motor imagery by iterative spatio-spectral patterns learning (ISSPL). IEEE Trans. Biomed. Eng.
**2008**, 55, 1733–1743. [Google Scholar] [CrossRef] - Ang, K.K.; Chin, Z.Y.; Zhang, H.; Guan, C. Filter bank common spatial pattern (FBCSP) in brain-computer interface. In Proceedings of the 2008 IEEE International Joint Conference on Neural Networks (IEEE World Congress on Computational Intelligence), Hong Kong, China, 1–8 June 2008; pp. 2390–2397. [Google Scholar]
- Thomas, K.P.; Guan, C.; Lau, C.T.; Vinod, A.P.; Ang, K.K. A new discriminative common spatial pattern method for motor imagery brain–computer interfaces. IEEE Trans. Biomed. Eng.
**2009**, 56, 2730–2733. [Google Scholar] [CrossRef] - Zhang, H.; Chin, Z.Y.; Ang, K.K.; Guan, C.; Wang, C. Optimum spatio-spectral filtering network for brain–computer interface. IEEE Trans. Neural Netw.
**2010**, 22, 52–63. [Google Scholar] [CrossRef] - Pfurtscheller, G. Graphical display and statistical evaluation of event-related desynchronization (ERD). Electroencephalogr. Clin. Neurophysiol.
**1977**, 43, 757–760. [Google Scholar] [CrossRef] - Suk, H.I.; Lee, S.W. A novel Bayesian framework for discriminative feature extraction in Brain-Computer Interfaces. IEEE Trans. Pattern Anal. Mach. Intell.
**2013**, 35, 286–299. [Google Scholar] [CrossRef] [Green Version] - Kachenoura, A.; Albera, L.; Senhadji, L.; Comon, P. ICA: A potential tool for BCI systems. IEEE Signal Process. Mag.
**2007**, 25, 57–68. [Google Scholar] [CrossRef] - Sannelli, C.; Braun, M.; Müller, K.-R. Improving BCI performance by task-related trial pruning. Neural Netw.
**2009**, 22, 1295–1304. [Google Scholar] [CrossRef] [PubMed] - Zames, G.; Ajlouni, N.M.; Ajlouni, N.M.; Ajlouni, N.M.; Holland, J.H.; Hills, W.D.; Goldberg, D.E. Genetic algorithms in search, optimization and machine learning. Inf. Technol. J.
**1981**, 3, 301–302. [Google Scholar] - Sarkar, P. Sequential Monte Carlo methods in practice. Technometrics
**2003**, 45, 106. [Google Scholar] [CrossRef] - Chen, Y.-W.; Lin, C.-J. Combining SVMs with various feature selection strategies. In Feature Extraction; Springer: Berlin, Germany, 2006; pp. 315–324. [Google Scholar]
- St, L.; Wold, S. Analysis of variance (ANOVA). Chemom. Intell. Lab. Syst.
**1989**, 6, 259–272. [Google Scholar] - Parzen, E. On estimation of a probability density function and mode. Ann. Math. Stat.
**1962**, 33, 1065–1076. [Google Scholar] [CrossRef] - Kwak, N.; Choi, C.-H. Input feature selection by mutual information based on Parzen window. IEEE Trans. Pattern Anal. Mach. Intell.
**2002**, 24, 1667–1671. [Google Scholar] [CrossRef] [Green Version] - Jacobs, R.A.; Jordan, M.I.; Nowlan, S.J.; Hinton, G.E. Adaptive mixtures of local experts. Neural Comput.
**1991**, 3, 79–87. [Google Scholar] [CrossRef] - Burges, C.J. A tutorial on support vector machines for pattern recognition. Data Min. Knowl. Discov.
**1998**, 2, 121–167. [Google Scholar] [CrossRef] - Brunner, C.; Leeb, R.; Müller-Putz, G.; Schlögl, A.; Pfurtscheller, G. BCI Competition 2008—Graz Data Set A; Institute for Knowledge Discovery (Laboratory of Brain-Computer Interfaces), Graz University of Technology: Graz, Austria, 2008; pp. 136–142. [Google Scholar]
- Hjorth, B. An on-line transformation of EEG scalp potentials into orthogonal source derivations. Electroencephalogr. Clin. Neurophysiol.
**1975**, 39, 526–530. [Google Scholar] [CrossRef] - Ang, K.K.; Chin, Z.Y.; Wang, C.; Guan, C.; Zhang, H. Filter bank common spatial pattern algorithm on BCI competition IV datasets 2a and 2b. Front. Neurosci.
**2012**, 6, 39. [Google Scholar] [CrossRef] [Green Version] - Garcia, G.; Ebrahimi, T.; Vesin, J. Support Vector EEG Classification in the Fourier and Time-Frequency Correlation. In Proceedings of the IEEE-EMBS First International Conference on Neural Engineering 2003, Capri Island, Italy, 20–22 March 2003; pp. 591–594. [Google Scholar]
- Lee, K.Y.; Kim, S. Designing discriminative spatial filter vectors in motor imagery brain–computer interface. Int. J. Imaging Syst. Technol.
**2013**, 23, 147–151. [Google Scholar] [CrossRef]

**Figure 1.**Schematic of Parzen Windows-based spatiospectral patterns with trial pruning (PWSPTP). (

**a**) Training phase. The spectral and spatial filters and the classifier were trained after the elimination of contaminated trials. The MI class label was adopted to optimize the spatial filters and classifier. (

**b**) Testing phase. The learnt classifier made an MI prediction based on a single-trial EEG.

**Figure 3.**Effects of the number of particles on left- and right-hand MI classification accuracy for subject 2. Any data not included between the whiskers are plotted as an outlier with red plus sign.

**Figure 4.**(

**a**) Effects of pruning percentage of type-1 noisy trial on the left- and right-hand MI classification accuracies for subject 2. (

**b**) Effects of pruning percentage of type-2 noisy trial on left- and right-hand MI classification accuracy for subject 2. Any data not included between the whiskers are plotted as an outlier with red plus sign.

**Figure 5.**Most significant spatial patterns corresponding to the frequency band (particle) with maximum importance weight value for subject 1 where L, R, F, and G denote left hand, right hand, foot, and tongue, respectively. Red color and blue color represent the highest and lowest values of the spatial patterns, respectively.

**Figure 6.**Visualization of the distribution of the discriminative frequency band wherein the optimized particles were marked as black circles.

**Table 1.**Classification performance of the PWSPTP for six paired binary MI classifications among nine subjects. In this case, L, R, F, and G denote left hand, right hand, foot, and tongue respectively, and μ and σ denote mean and standard deviation, respectively. Bold values indicate the highest classification accuracy among the six paired binary MI classifications.

Class | A1 | A2 | A3 | A4 | A5 | A6 | A7 | A8 | A9 | μ ± σ |
---|---|---|---|---|---|---|---|---|---|---|

LvsR | 83.33 | 56.25 | 93.06 | 65.97 | 61.81 | 69.44 | 65.28 | 87.50 | 83.33 | 74.00 ± 12.96 |

LvsF | 95.14 | 85.42 | 97.92 | 73.61 | 65.50 | 64.58 | 93.06 | 82.64 | 88.19 | 82.90 ± 12.44 |

LvsG | 94.44 | 62.50 | 95.14 | 86.11 | 74.31 | 64.58 | 81.94 | 91.67 | 90.28 | 82.33 ± 12.49 |

RvsF | 97.22 | 91.67 | 84.03 | 77.78 | 52.78 | 63.89 | 98.61 | 50.56 | 69.44 | 76.22 ± 18.20 |

RvsG | 98.61 | 65.97 | 95.14 | 80.56 | 68.75 | 58.33 | 94.44 | 73.61 | 82.64 | 79.78 ± 14.25 |

FvsG | 79.17 | 91.67 | 81.94 | 66.67 | 53.47 | 69.44 | 68.06 | 76.39 | 75.69 | 73.61 ± 10.84 |

μ ± σ | 91.32 ± 8.05 | 75.58 ± 15.82 | 91.21 ± 6.59 | 75.12 ± 7.94 | 62.77 ± 8.53 | 65.04 ± 4.13 | 83.57 ± 14.23 | 77.06 ± 14.62 | 81.60 ± 7.82 |

**Table 2.**Performance comparison with CSP where L, R, F, and G denote left hand, right hand, foot, and tongue respectively, and μ and σ denote the mean and standard deviation, respectively. Bold values indicate the highest classification accuracy among the CSP and PWSPTP.

L vs. R | L vs. F | L vs. G | R vs. F | R vs. G | F vs. G | |
---|---|---|---|---|---|---|

CSP | 73.46 ± 16.93 | 72.76 ± 17.93 | 74.07 ± 16.57 | 73.07 ± 15.82 | 72.38 ± 17.83 | 67.28 ± 11.40 |

PWSPTP | 74.00 ± 12.96 | 82.90 ± 12.44 | 82.33 ± 12.49 | 76.22 ± 18.20 | 79.78 ± 14.25 | 73.61 ± 10.84 |

© 2020 by the authors. Licensee MDPI, Basel, Switzerland. This article is an open access article distributed under the terms and conditions of the Creative Commons Attribution (CC BY) license (http://creativecommons.org/licenses/by/4.0/).

## Share and Cite

**MDPI and ACS Style**

Shieh, C.-P.; Yang, S.-H.; Liu, Y.-S.; Kuo, Y.-T.; Lo, Y.-C.; Kuo, C.-H.; Chen, Y.-Y.
Simultaneously Spatiospectral Pattern Learning and Contaminated Trial Pruning for Electroencephalography-Based Brain Computer Interface. *Symmetry* **2020**, *12*, 1387.
https://doi.org/10.3390/sym12091387

**AMA Style**

Shieh C-P, Yang S-H, Liu Y-S, Kuo Y-T, Lo Y-C, Kuo C-H, Chen Y-Y.
Simultaneously Spatiospectral Pattern Learning and Contaminated Trial Pruning for Electroencephalography-Based Brain Computer Interface. *Symmetry*. 2020; 12(9):1387.
https://doi.org/10.3390/sym12091387

**Chicago/Turabian Style**

Shieh, Chun-Ping, Shih-Hung Yang, Yu-Shun Liu, Yun-Ting Kuo, Yu-Chun Lo, Chao-Hung Kuo, and You-Yin Chen.
2020. "Simultaneously Spatiospectral Pattern Learning and Contaminated Trial Pruning for Electroencephalography-Based Brain Computer Interface" *Symmetry* 12, no. 9: 1387.
https://doi.org/10.3390/sym12091387