## 2 Materials and Methods
### Assessing Motion Accuracy of Baduanjin
#### 2.4.1 Classifiers  
1. \(k\)-NN  
In \(k\)-NN, the \(k\)-Nearest Neighbors of the vector x in the training set are considered [22]. From \(k\) (preset) samples with the smallest distance, the category with the largest number of the same label was selected, and the test vector was classified into this category. In \(k\)-NN, the distance is generally applied Euclidean distance, and \(k\) is the preset value. However, there is no rule for the preset \(k\) value. In studies, the preset \(k\) value is that an appropriate value is related to the actual study situation [30]. Function fitcknn (Statistics and Machine Learning Toolbox) for \(k\)-NN was used in the MATLAB environment in this study [31]. 2. SVM  
SVM is a common classifier in motion recognition [32; 33]. SVM constructs an N-dimensional hyperplane that optimally separates the dataset into categories on the theory of structural risk minimization [34]. It has significant advantages in classifying small samples and high-dimensional data [35]. In this study, SVM was applied to different feature vectors that belonged to more than two classes (8 classes). Following the one-versus-the-rest method, n different binary classifiers were trained, where each classifier recognizes one of n motion types. Function fitececoc (Statistics and Machine Learning Toolbox) for SVM was used in the MATLAB environment in this study [36]. Nb  
NB is a simple probabilistic classifier based on Bayes theorem with an intense independence assumption [37]. In human motion recognition, NB is necessary to calculate the Probability Density Function (EDF) of each feature and then calculate the posterior probabilities that the tested sample belongs to different categories. Function fitcnb (Statistics and Machine Learning Toolbox) for NB was used in the MATLAB environment in this study [38]. Logistic Regression is the process of modeling the probability of discrete outcomes for a given input variable. The standard Logistic Regression models binary outcomes, which take two values: true/false and yes/no. Polynomial Logistic Regression can model the situation where there are more than two possible discrete results [39]. Function fitlinear (Statistics and Machine Learning Toolbox) for Logistic Regression was used in the MATLAB environment in this study [40]. DT  
DT is a supervised machine learning technique used to derive Decision Trees from training data [41]. DT is a predictive model, expressed as a recursive division from the feature space to the subspace that forms the prediction basis [42]. DT is a directed tree with roots. In the tree structure, leaves represent categories, non-leaf nodes are features and branches represent a collection of features that lead to the classification [41]. Function fitctree (Statistics and Machine Learning Toolbox) for DT is used in the MATLAB environment in this study [43]. ANN is a computational model that simulates the structure of brain neurons for information processing. It consists of an input layer, one or more hidden layers and an output layer. Each layer contains many neurons, and each neuron contains an activation function [44]. In the study, two commonly used ANN, Back Propagation Neural Network (BPNN) and Radial Basis Function Neural Network (RBFNN), were used as classifiers to train and classify motions. BPNN is a multilayer feedforward network trained according to the error backpropagation algorithm. It has an excellent ability to approximate any continuous function and healthy nonlinear mapping function [14]. In this study, BPNN is constructed with three layers. The first layer is the input layer. The number of neurons is equivalent to the dimension of the feature vectors; the second layer is the hidden layer. The tangent sigmoid equation is applied as the activation equation:  
\[\text{f(x)}=\frac{2}{\left(1+\text{e}^{-2\text{x}}\right)^{-1}} \tag{10}\]  
The third layer is the output layer. The number of neurons is equal to the number of classified motions, and the activation equation is the tangent sigmoid equation.