## 2 Materials and Methods
### Extracting Features of Motion Data
#### 2.3.2 Extracting Features  
After extracting and converting raw data to unit quaternions, the features were extracted from the data to represent each type of motion in the form of feature vectors. The extracted features used in motion recognition include features of time-domain, frequency-domain and wavelet. The time-domain features include the mean, variance, standard deviation, skewness, kurtosis, quartiles, average absolute deviation and correlation coefficient between axes [21; 22; 23]. Frequency-domain features include the peak value, energy of the discrete Fourier transform spectrogram and discrete cosine transform [24; 25]. Wavelet features include approximate wavelet coefficients and wavelet detail coefficients obtained after discrete wavelet transform [26]. In this study, we extracted the time-domain features of motion data. 1. Extracting time-domain features  
After raw data were converted into the unit quaternion of 17 skeleton points, the scalar component was removed, leaving the three vectors of [w, x, y, z]. For each skeleton point, the features are represented as an n \(\times\) 1 dimensional vectors: \(X=[X_{1},X_{2},\ldots,X_{n}]^{\mathrm{T}}\). The mean, variance, standard deviation, skewness, kurtosis and quartile deviation of the time-domain features were extracted. The description of the features is shown in Table 1.  
Figure 3: The skeleton model of BVH file for Perception Neuron 2.0. The calculation equations for these features are as follows:  
Mean:  
\[\rm m=\frac{1}{n}\sum\limits_{i=1}^{n}X_{i} \tag{3}\]  
Variance:  
\[\rm s^{2}=\frac{1}{n}\sum\limits_{i=1}^{n}\left(X_{i}-m\right) \tag{4}\]  
Standard deviation:  
\[\rm s=\sqrt{s^{2}} \tag{5}\]  
Skewness:  
\[\rm S_{k}=\frac{\frac{1}{n}\sum\limits_{i=1}^{n}\left(X_{i}-m\right)^{3}}{ \left[\frac{1}{n}\sum\limits_{i=1}^{n}\left(X_{i}-m\right)^{2}\right]^{3/2}} \tag{6}\]  
Kurtosis:  
\[\rm K=\frac{\frac{1}{n}\sum\limits_{i=1}^{n}\left(X_{i}-m\right)^{4}}{\left[ \frac{1}{n}\sum\limits_{i=1}^{n}\left(X_{i}-m\right)^{2}\right]^{2}} \tag{7}\]  
Quartile deviation:  
\[\rm Q=Q_{3}-Q_{1} \tag{8}\]  
In Equation (8), \(\rm Q_{1}\) represents the first quartile value, indicating that 25% of the value of vectors is less than or equal to \(\rm Q_{1}\). \(\rm Q_{3}\) represents the third quartile value, indicating that 75% of the value of vectors is less than or equal to \(\rm Q_{3}\). 2. Normalization  
Normalization refers to transforming a dimensional expression into a scalar expression, which simplifies the calculations. In this study, the features were normalized to facilitate subsequent data analysis and improve the convergence speed of the classifier. The characters were normalized in the range of \([0,1]\), using the following equation:  
\[\rm x_{i}=\frac{X_{i}-X_{min}}{X_{max}-X_{min}} \tag{9}\]  
In Equation (9), \(\rm x_{i}\) is the i-th data after normalizing. \(\rm X_{i}\) is the i-th data in the feature vector before normalizing, while \(\rm X_{max}\) and \(\rm X_{min}\), respectively, are the maximum and minimum values in the feature vector. 3. Dimensionality reduction of feature vectors  
High dimensionality of the feature vectors during training would result in the classifiers encountering problems such as large calculation load, data redundancy and poor visibility. In order to prevent these problems, it is recommended that dimensionality reduction be performed [27; 28]. Dimensionality-reduction methods commonly applied in research include principal component analysis (PCA), linear discriminant analysis (LDA)