# Analyzing Brain Waves of Table Tennis Players with Machine Learning for Stress Classification
## 1 Introduction
Machine learning is one of the core areas of artificial intelligence, which is the study of how to create algorithms that are capable of learning from experiences and improving their own ability, dissimilar to the algorithms that simply operate by given specific rules [23]. Machine learning is based on the study of statistical probabilities and computer science; employs algorithms such as logistic regression, SVM, decision tree, multilayer perceptron (MLP), and K-Nearest Neighbor (KNN); and has been applied in various fields, including physiological signals, medicine, industry, agriculture, and mail management [24; 25]. Deep learning is a subfield of machine learning that uses deep neural networks as an architecture. CNN are currently the most widely used models in deep learning. In 1998, [PERSON] [26] laid the basic framework for CNN, which consists of convolutional layers, pooling layers, and fully connected layers. AlexNet [27] won the classification task in the 2012 ImageNet Large Scale Visual Recognition Competition (ILSVRC). Since then, deep learning has developed rapidly, including VGG [28], GoogLeNet [29], ResNet [30], InceptionResNetV2 [31], etc. In 2018, BERT (Bidirectional Encoder Representations from Transformers) achieved good results in NLP (Natural Language Processing) tasks [32]. The Transformer network structure is based on the attention mechanism. At present, the network structures mainly include MLP (multilayer perceptron), CNN, RNN (recurrent neural network), and Attention, which can be combined. Deep learning has been applied to the EEG for the mental workload, emotion recognition, motor imagery, event-related potential detection, etc. [33; 34; 35]. Taiwan's table tennis is famous worldwide, and it is also one of the critical projects in developing sports in Taiwan. Studying table tennis players' psychological stress can help manage stress and improve the sport performance. Compared with other sports, table tennis is a fast, precise, and open sport. Since the original signals of brain waves have many noises and errors tend to arise during the process of signal extraction, how to extract and analyze EEG signals is an important issue for increasing the accuracy in stress assessment [14]. Therefore, this study uses different extraction methods and analysis methods to improve the accuracy of stress assessment. This study aims to collect EEG data of competition table tennis players by SCWT and MA and analyze brain waves by using machine learning and build models for stress classification, in which the stress classifying models include generalizing and personalizing ones to distinguish high, medium, and low stresses. In this study, the EEG of table tennis players was collected by using SCWT and MA and analyzed by algorithms of machine learning; our experiment revealed XGBoost as the optimal model. The research findings indicated that, in three-level stress classification, XGBoost had an 86.49% accuracy in the case of the generalized model. This study outperformed other studies by up to 11.27% in three-level classification. This study comprises four sections, including the introduction provided above. Section 2 presents the materials and methods used herein. Section 3 presents the results of the stress classification and discussion. Section 4 presents the last conclusions.