*4.4. Performance Assessment of Selected Subset*

In this section, we evaluate UIR for all able-bodied and transfemoral amputee subjects with feature subset *p*9. All classifiers are trained with three representative methods (SVM-RBF, SVM-linear, and QDA). The RBF kernel tuning parameter is *σ* = 1 and *σ* = 4 for able-bodied and amputee subjects, respectively. In this section, we use multiple-fold CV to train and test UIR, where each walking sequence that consists of different gait modes is considered a fold (see Section 2.1). In training phase, we use all walking sequences except one to train UIR. We then test the UIR accuracy on the excluded walking sequence (fold). Accuracy is defined as the total number of correctly classified test patterns divided by the total number of test patterns. We repeat training and testing by shifting the excluded folds. We calculate the accuracy averaged over all folds to find the mean performance of UIR.

We use average classification error of *c*-fold cross validation (CV). In *c*-fold CV, we randomly divide the training set into *c* distinct folds. Then, we repeat training *c* times; each time, the model is trained using *c* − 1 folds and is tested with the remaining fold. The average of the *c* classification errors is used as the quality measure.

We saw in Section 2.2 that overlapped windowing with frame length *Lf* = 250 ms and increment *I* = 50 ms is the best data window option. For real-time operation, a conservative choice for parameter *q* = 5 satisfies the constraint *q* × *I* ≤ 300 ms. Therefore, we use a majority voting filter (MVF) with length 2 × *q* + 1 = 11. Results verify a fast processing time on a standard desktop computer of less than 50 ms, on average, including feature extraction and classification with each of the three classifiers.

Figure 10 illustrates the mean classification error of QDA, SVM-linear, and SVM-RBF trained with feature subset *p*9. Training was conducted individually for able-bodied subjects AB01, AB02, and AB03 and amputee subjects AM01, AM02, and AM03, with and without MVF. Figure 10 indicates that: (1) SVM-RBF outperforms SVM-linear and QDA, which confirms the statistical results in Section 4.3; (2) MVF statistically significantly decreases classification error for locomotion mode detection (*p* < 0.05); and (3) *p*<sup>9</sup> is an effective feature subset and results in accurate as well as compact UIR. Feature subset *p*<sup>9</sup> uses only 14 features out of a total of 60 available features, which reduces the size of the feature set by 77%.

SVM-RBF was also trained for the able-bodied subjects with the full set of 60 features. When combined with MVF, it results in a mean classification accuracy of 98.54% ± 1.92%. In comparison, we achieve 97.14% ± 1.51% mean classification accuracy with feature subset *p*9, which includes only 14 features. Statistical tests at 5% significance level indicate no significant difference between UIR performance when trained with the full feature set and subset *p*9.

SVM-RBF was also trained for the amputee subjects with the full set of 60 features. When combined with MVF, it results in a mean classification accuracy of 99.37% ± 0.96%. In comparison, we achieve 98.45% ± 1.22% mean classification accuracy with feature subset *p*9. As with the able-bodied subjects, statistical tests indicate no significant difference between UIR performance when trained with the full feature set and subset *p*9. This indicates the satisfactory performance of our framework, which is able to eliminate unneeded features with no significant degradation in overall accuracy.

In this paper, we decoupled the optimization problem of window length and feature selection by dividing it into two smaller sequential optimization problems [35]. We may obtain a suboptimal feature subset with this approach, but this point is not critical since we were able to find accurate and simple UIR that has no meaningful performance difference than UIR designed with the full feature set.

(**a**) Trained with subset *p*<sup>9</sup> for able-bodied subjects (**b**) Trained with subset *p*<sup>9</sup> for amputee subjects

**Figure 10.** Classification performance of QDA, SVM-Linear, and SVM-RBF with feature subset *p*<sup>9</sup> for able-bodied subjects (AB01, AB02, and AB03) and amputee subjects (AM01, AM02, and AM03).
