# FSM-HSVM-Based Locomotion Mode Recognition for Exoskeleton Robot
## 2 Materials and Methods
### Motion Pattern Recognition Algorithm  
#### 2.4.1 Hierarchical Support Vector Machine Classifier (HSVM)  
Support vector machine (SVM) [29] is a new machine learning technique founded on [PERSON]'s statistical learning theory (STL). The statistical learning theory implements the structural risk minimization (SRM) criterion, which minimizes sample point error and structural risk. This criterion enhances the model's capacity for generalization, and has no restrictions on data dimension. In linear classification, the classification surface is taken at the point of greatest separation between the two sample types. Through kernel function [30], nonlinear classification problems can be into linear classification problem in high-dimensional space. Classical SVM is limited to two classification problems, therefore, multiclassification problems require further improvement. Currently, the multi-classification SVM is primarily implemented by decomposing and reconstructing multiple binary SVMs [31]. Commonly used techniques include one to one (OVO) [21], one to rest (OVR) [22], directed acyclic graph SVMs (DAG SVMs) [23], hierarchical support vector machines (HSVM) [24], etc. These multi-classification decomposition and reconstruction methods choose various training methods and combination strategies, which determine the training and classification complexity of the classifier. For the K-classification problem, Table 1 compares the training and classification complexity of the aforementioned common multi-classification SVMs. As shown in Table 1, both OVO and DAG use a one to one approach for basic SVM training. The number of SVM sub-classifiers that must be trained is the greatest and grows exponentially as the number of K classes increases. The basic thought of OVR and HSVM is one to rest, and the number of trainers is significantly less than OVO and DAG. HSVM employs a tree structure to reduce the complexity of training and requires the training of only (K-1) SVM classifiers. OVO and OVR must traverse all trained SVMs, resulting in low overall efficiency. DAG adopts directed acyclic graph structure, and the average number of SVMs required for classification is (K-1), with a small number and high classification efficiency. Although HSVM traverses all sub-classifiers, classification efficiency is also high due to the small number of trained classifiers. To sum up, it is very clear that HSVM requires the smallest number of sub-classifiers during training and identification due to its unique tree structure, and this method has the least amount of training calculation and the highest classification efficiency. Therefore, HSVM is used to classify and identify locomotion modes in this paper. The overall structure of HSVM is comparable to that of binary tree, in which the intermediate node implements local decisions and the leaf node identifies the category. This method makes full use of a priori human behavior. In order to ensure the validity of the classification, it makes the categories within the subclasses more similar while the categories between the subclasses have clear distinctions. For HSVM to have the best generalization performance, the divisibility between the upper layer's two subclasses must be as strong as possible [32]. Typically, the Euclidean distance between various samples in the input space is used to cluster layer by layer, so as to create a reasonable hierarchical structure. However, the Euclidean distance requires that time series data have the same length. The distance is then calculated and summed based on \begin{table}
\begin{tabular}{c c c c c} \hline \hline
**Complexity** & **OVO** & **OVR** & **DAG-SVM** & **HSVM** \\ \hline Basic Thought & One to One & One to Rest & One to One & One to Rest \\ \hline Combination Strategy & Voting Method & Maximum Output & Directed Acyclic Graph & Classification Tree \\ \hline Number of Trainers & K(K–1)/2 & K & K(K–1)/2 & K–1 \\ \hline Number of Recognizers & K(K–1)/2 & K & K–1 & K–1 \\ \hline \hline \end{tabular}
\end{table}