{'fraction_non_alphanumeric': 0.021612635078969242, 'fraction_numerical': 0.006650041562759767, 'mean_word_length': 5.438502673796791, 'pattern_counts': {'":': 0, '<': 0, '<?xml version=': 0, '>': 0, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
Robust Common Spatial Patterns for EEG signal preprocessing

The Common Spatial Patterns (CSP) algorithm finds spatial filters that are useful in discriminating different classes of electroencephalogram (EEG) signals such as those corresponding to different types of motor activities. This algorithm is however, sensitive to outliers because it involves the estimation of covariance matrices. Classical sample covariance estimates are easily affected even if a single outlier exists. To improve the CSP algorithm's robustness against outliers, this paper first investigates how multivariate outliers affect the performance of the CSP algorithm. We then propose a modified version of the algorithm whereby the classical covariance estimates are replaced by the robust covariance estimates obtained using Minimum Covariance Determinant (MCD) estimator. Median Absolute Deviation (MAD) is also used to robustly estimate the variance of the projected EEG signals. The results show that the proposed algorithm is able to reduce the influence of the outliers. When an average of 2.5% outliers is introduced, the average drop in the accuracy is 9.21% for the CSP algorithm and 0.72% for the proposed algorithm.