A fuzzy granular logistic regression algorithm for sEMG-based cross-individual prosthetic hand gesture classification

Objective. Prosthetic systems are used to improve the quality of life of post-amputation patients, and research on surface electromyography (sEMG)-based gesture classification has yielded rich results. Nonetheless, current gesture classification algorithms focus on the same subject, and cross-individual classification studies that overcome physiological factors are relatively scarce, resulting in a high abandonment rate for clinical prosthetic systems. The purpose of this research is to propose an algorithm that can significantly improve the accuracy of gesture classification across individuals. Approach. Eight healthy adults were recruited, and sEMG data of seven daily gestures were recorded. A modified fuzzy granularized logistic regression (FG_LogR) algorithm is proposed for cross-individual gesture classification. Main results. The results show that the average classification accuracy of the four features based on the FG_LogR algorithm is 79.7%, 83.6%, 79.0%, and 86.1%, while the classification accuracy based on the logistic regression algorithm is 76.2%, 79.5%, 71.1%, and 81.3%, the overall accuracy improved ranging from 3.5% to 7.9%. The performance of the FG_LogR algorithm is also superior to the other five classic algorithms, and the average prediction accuracy has increased by more than 5%. Conclusion. The proposed FG_LogR algorithm improves the accuracy of cross-individual gesture recognition by fuzzy and granulating the features, and has the potential for clinical application. Significance. The proposed algorithm in this study is expected to be combined with other feature optimization methods to achieve more precise and intelligent prosthetic control and solve the problems of poor gesture recognition and high abandonment rate of prosthetic systems.


Introduction
Millions of people around the world have amputated limbs due to disease, industrial accidents, traffic accidents, and personal accidents. Amputees want prosthetics that can perform basic hand and motor functions [1]. With the development of rehabilitation robotics, intelligently controlled electric prosthetics have been developed to improve the quality of life of patients after amputation [2]. Surface electromyography (sEMG) records electrical biosignals generated by action potentials that occur during muscle fiber contraction, and control strategies based on sEMG pattern recognition (sEMG-PR) have been applied to rehabilitation training and intention recognition in healthy adults and amputee patients [3][4][5]. The sEMG-PR control strategy mainly includes performing EMG signal measurements (to capture more reliable EMG signals), feature extraction (retaining the most discriminative information from the signal), classification (predicting one of the subsets of expected limb movements), and sending control commands (convert control commands to drive multifunctional prosthetics) [6].
Generally, the prosthetic system can be divided into upper limb prosthesis and lower limb prosthesis according to the amputation site, which is used to perform different functions of body control. Upper limb prosthesis control is mainly through sEMG signal recognition of arm and hand activities, such as making a fist, turning the wrist, grasping, etc [7][8][9]. Lower limb prosthetic control research is using sEMG signals to predict daily joint movement and walking activities, such as walking stairs, walking uphill or downhill, crossing obstacles, etc [10][11][12]. Among them, sEMG-based gesture recognition, as a promising human-computer interaction technology [13,14], is used in assisted living, healthcare, neurorehabilitation, and sports fields [15]. How to achieve high-precision prediction of gesture recognition and intelligent control of prosthetic hands has become the focus of clinical application and promotion of prosthetic systems. This study only analyzes gesture recognition methods based on sEMG signals.
Currently, many PR algorithms have been used to recognize gestures from multi-channel sEMG signals, such as support vector machines (SVMs) [16,17], linear discriminant analysis [18,19], k-nearest neighbors (KNNs) [20] and logistic regression (LogR) [21], etc. Shi et al used a dual-channel sEMG sensor to measure physiological information from 13 healthy adults and developed a recognition algorithm to control four gestures of the bionic hand, using a KNN classifier to select mean absolute value and waveform length as the feature vector with the best classification accuracy (93.8%) [20]. Adewuyi et al developed a multi-channel sEMG-based gesture recognition algorithm using four classifier algorithms and validated it in 16 healthy adults and 4 partial hand amputees, finally determining the linear and nonlinear classifier scheme performance [22]. In addition, deep learning methods represented by artificial neural networks are increasingly used for sEMG gesture prediction and have achieved satisfactory performance [23][24][25][26][27][28][29].
Although sEMG-based gesture prediction research has accumulated rich achievements, they do not distinguish between individual habits and physiological differences of experimental subjects, all based on the same subject as the training and testing groups. Cross-individual recognition of intent and behavior has important implications and largely determines the acceptance rate of prosthetic systems among upper-limb amputees. The composition of human hand muscles is basically the same, but the degree of development of muscle tissue varies between different subjects [30], so the collected EMG signals will also be different, making the control performance of current prosthetic devices less than ideal. Min et al proposed a cross-individual gesture recognition algorithm based on a long short-term memory network, conducted a classification study of four kinds of actions on four healthy subjects, and finally achieved a classification accuracy of 86.5% [31]. Liao et al carried out gesture recognition among multi-object groups, combined features with the KNN classification algorithm, and the accuracy of six gesture classifications reached 91.05% [32]. Even so, there are relatively few studies based on crossindividual gesture classification, and prosthetic systems with good cross-individual gesture recognition and control performance are needed clinically.
Recently, machine learning algorithms based on fuzzy granule theory have been endowed with powerful functions for data processing of various diseases and biomedicine, and have achieved good performance. Fuzzy granulation can make the classification process structured and hierarchical by introducing granular computing, thereby improving the accuracy and robustness of data classification [33]. Samuel et al constructed a heart failure risk prediction system based on artificial neural networks (ANN) and fuzzy analytic hierarchy process (Fuzzy_AHP) algorithm, which achieved a significant improvement in classification performance compared to ANN [34]. Xin et al developed a fused lasso-based LogR method to diagnose Alzheimer's disease and showed good performance [35]. Chen et al proposed a fuzzy granular sparse learning model for identifying influenza virus antigenic variants, and the results showed good convergence and low prediction error [33]. In conclusion, a PR algorithm based on fuzzy granulation theory is expected to improve cross-individual sEMGbased gesture classification.
The concrete motivation of this research is to propose an algorithm that can significantly improve the accuracy of gesture recognition to enrich the cross-individual classification research of prosthetic systems. Based on fuzzy granulation theory and combined with the LogR algorithm, a fuzzy granulation logistic regression (FG_LogR) model is generated. The classifier was trained on the sEMG data of several participants making the same gesture, and then the performance was tested using individual data not included in the dataset. The performance of the proposed algorithm is verified using three evaluation metrics and compared with five classical classification algorithms. We hypothesize that the FG_LogR algorithm can improve the accuracy of cross-individual gesture classification and has the potential to be applied to the control of clinical prosthetic systems.

Experimental data acquisition
Eight healthy subjects (all right-handed) aged 22-33 years were recruited for this study. The sEMG data acquisition was performed using commercial equipment (Trigno Wireless System, Delsys Inc., Boston, USA). The main parameters are as follows: (1) the transmission distance is 20 m, and the baseline noise is less than 750 nV RMS; (2) the inter-sensor latency is less than 500 µs; (3) the common-mode rejection ratio is greater than 80 db. The system can detect up to 16 channels of sEMG signals, and we evenly attach a total of 8 channels of electrode pads to the surface of the forearm skin. The sampling frequency of sEMG was set at 2000 Hz with a bandwidth of 20-450 Hz.
During the experiment, all participants were required to perform seven gesture activities, including hand closed (HC), hand open (HO), wrist extension (WE), wrist flexion (WF), wrist pronation (WP), wrist supination (WS), no movement (NM), as shown in figure 1(a). The flow of the test is shown in figure 1(b). Each gesture needs to be performed and maintained for 5 s, then rested for 5 s, and repeated four times for a total of 40 s. After completing a gesture activity, a 2 min break was required to reduce muscle fatigue, and the experiment was performed twice. Before the experiment, participants were asked to sign an informed consent form, and all experiments involving human subjects had been approved by the Institutional Review Board of Ethics of the Shenzhen Institutes of Advanced Technology, Chinese Academy of Sciences.

Data pre-processing
Preprocessing and feature extraction operations were used on the acquired sEMG data. First, a 20-450 Hz passband filter is used to remove noise, then a 50 Hz notch filter is used to remove power frequency interference. Subsequently, four advanced features commonly used in current research are sequentially extracted, including time domain (TD4), sixth-order autoregressive coefficients (AR6), time domain power

Granular LogR
The preprocessed and feature-extracted sEMG data needs to be fuzzy and granulated. First, features are normalized and granularized into multiple granules. The granularity is then input into the fuzzy granularity classification decision by the defined granularity computation, and finally, the sample prediction label is output. The algorithm flow chart is shown in figure 2, and the specific steps are introduced as follows.

Fuzzy granulation
A fuzzy set is an effective tool for processing uncertain information.
Definition 1. For the information system I = (X, C, D), X = {x 1 , x 2 , …, x n } is the sample set, C = {c 1 , c 2 , …, c m } is the feature set corresponding to the sample, and D is the decision set corresponding to the sample. For the given sample x ∈ X, where a single c ∈ C, u(x, c) ∈ [0, 1] feature denotes the value of sample x normalized over the feature c. The similarity of x 1 and x 2 on feature c is: Definition 2. For the information system I = (X, C, D), we granulate the sample x ∈ X on the feature c ∈ C. Sample x is granulated on feature c and forms a granule, which is defined as: is a collection. r j is an element of the collection. And r j is the similarity between the sample x and the reference sample x j on the feature c. It is easy to know from Definition 1 that r j = u c x, x j ∈ [0, 1]. We define g(x) as the fuzzy granule, g(x) j as the jth granule kernel of the fuzzy granule g(x). The granule is composed of granule kernels.
Definition 3. For the information system I = (X, C, D) with anyx ⊆ X, any feature subset B = {b 1 , b 2 , . . . , b m } ⊆ X, the fuzzy granular vector of x on the feature subset B is: G(x) is a fuzzy granular vector that is composed of fuzzy granules g b . And g bm (x) is the fuzzy granular of x on the feature b m . It is also known as an element of the fuzzy granularity vector. Therefore, the elements of the granular vector are sets, unlike the conventional vector. The elements of the conventional vector are real numbers.

Fuzzy granular operations and metrics
This subsection gives the operations and metrics of granules.

Definition 4.
Let g a (x), g b (x) be the two fuzzy granules of sample x on features a and b respectively, then the addition, subtraction, multiplication, and division operations of fuzzy granules are as follows: Definition 5. Letg a (x), g b (x) be the two fuzzy granules of sample x on feature a, then the addition, subtraction, multiplication, and division operations of fuzzy granules are as follows: The result of the fourth operation of two fuzzy granules is also a fuzzy granule. The four fundamental operations in Definition 4 are operations on fuzzy granules of the same sample on different features. The operations in Definition 5 are operations on fuzzy granules of different samples on the same feature. Definition 6. Let the fuzzy granular vectors are G(x) = (g 1 (x), g 2 (x), . . . , g m (x)) T and G(y) = (g 1 (y), g 2 (y), . . . , g m (y)) T , then the dot product of two fuzzy granular vectors is defined as: The dot product of two fuzzy granular vectors results in one fuzzy granule.

Definition 7.
Let the fuzzy granule be g(x) = r j k j =1 , then the fuzzy granular function is defined as: Definition 8. Let the fuzzy granule be g(x) = r j k j =1 , the size of fuzzy granule g(x) is defined as: Definition 9. Let the m-dimensional fuzzy granular vector be G = (g 1 , g 2 , . . . , g m ), then the fuzzy granular vector norm is defined as: (a) The 1-norm of a fuzzy granular vector: (b) The 2-norm of a fuzzy granular vector: (c) Th p-norm of a fuzzy granular vector: The results of the norm operations of fuzzy granular vectors are fuzzy granules. The norm operation provides a way to transform from fuzzy granular vectors to fuzzy granules.

Granular logistic function
To construct the granular LogR system, we first define the granular logistic function.
Definition 10. Let the fuzzy granule be g(x) = r j k j =1 . Its granular logistic function is as follows: The derivative of the granular logistic function is:

Granular LogR model
LogR is a linear classification model. To obtain a granular LogR model, the granular linear equation needs to be derived. Chen has defined the granular linear regression model in previous work [41,42].
Definition 11. In the information data set I = (X, C, D), x ∈ X is granularized and expanded as The granular regression equation is defined as: We apply the granular linear regression to the granular logistic function to obtain the granular logistic regression model.

Definition 12.
In the information data set I = (X, C, D), G(x) is the input granular vector, and W is the weight granular vector. The granular logistic regression is shown below:

Granular LogR loss functions
In the granular LogR model, the input is a feature fuzzy granular vector and the output is a decision fuzzy granule. The decision fuzzy granule can be compared with the label fuzzy granule, which constitutes the granular loss function.

Definition 13. Let the output decision fuzzy granule
The granular log loss function is defined as follows:

Granular LogR learning algorithm
After completing the construction of the granular LogR, the granular LogR training will be carried out. The stochastic gradient descent algorithm was used to optimize the parameters. The learning algorithm of the granular LogR is shown in table 1.

Algorithm:
Input: The training set is U = (X, Y), where x i is an m-dimensional feature vector x i ∈ X ⊆ R m , y i is an l-dimensional label vector, which means it contains l categories, Output: Granular weight matrix W and granular threshold b.
(1) The sample set X is granularized over the feature set (X, C) to obtain G(x).
(2) Construct a granular logistic regression model and randomly initialize the granular weights.
(3) Input the characteristic fuzzy granular vector into the granular logistic regression model GL(x). We get output decision fuzzy granule

Performance evaluation
To verify the performance of the algorithm, three subjects are selected as the training group for crossindividual prediction, and the remaining one subject is selected as the test group, e.g. the combination ABC_D. There are 8 participants, and each subject has 35 combined prediction modes, and the final accuracy is obtained by averaging the 35 results. For the original training group, the 10 s data of the first two experiments were used as training. For the test group, the 10 s data of the last two experiments were used. A sliding window was used for data segmentation, and finally, each action was divided into lengths of 200, i.e. 1400 length data per participant. Additionally, three metrics are used for performance evaluation, including accuracy, sensitivity (recall), and specificity [43][44][45]. The expressions are as follows where TP (true positives) and FP (false positives) are the true and false samples identified by the model as positives, respectively. Whereas TN (true negative) and FN (false negative) are the true and false samples identified as negative by the model.

Results of gesture classification for different subjects
The performance of the proposed FG_LogR algorithm and the LogR algorithm in terms of classification accuracy of the four features (TD4, AR6, TDPSD, iDFT) is studied and reported, and the results are shown in table 2. In general, there are significant differences in classification accuracy between different features, as well as between different subjects. When the LogR algorithm is discussed, the overall recognition rate based on TD4 is only 71.1%. In terms of participants, subjects two and six had lower classification accuracies of 62.7% and 59.0%, respectively. After fuzzy granulation, the average classification accuracy of all participants improved on different scales, with the largest being 13.5% (subject 6, TD4). Among them, the classification results of subject 3 have the most significant improvement. The classification accuracies of the four features based on the LogR algorithm are 74.5%, 78.7%, 68.0%, and 77.0%, while the accuracies based on the FG_LogR algorithm are 81.6%, 87.2%, 80.9%, and 86.4%, respectively, and the average accuracy is increased by 9.5%. Some subjects are not significantly improved. The classification accuracy of subject 8 is only increased by 3.7% because the average accuracy based on the LogR algorithm is close to 85%, which is acceptable.
To observe the improvement of algorithm performance before and after fuzzy granulation more clearly, figure 3 shows the histogram of the classification results of eight subjects under four features (TD4, AR6, TDPSD, iDFT). All results classified by the FG_LogR algorithm have a larger area, i.e. the classification performance is better than that of the LogR algorithm. According to the overall average results, the improvement effect based on TD4 features is the most obvious, and the overall average accuracy rate is increased from the original 71.1% to 79.0%. In conclusion, the FG_LogR algorithm shows strong performance in cross-individual gesture recognition.

Results of gesture classification for different activities
The study also reports the classification performance of seven gesture activities (HC, HO, WE, WF, WP, WS, NM) based on the proposed FG_LogR algorithm and the LogR algorithm, and the classification confusion matrix of all subjects are shown in figure 4. Figure 4(a) shows the prediction results of the four features based on the LogR algorithm, while figure 4(b) shows the prediction results of the FG_LogR algorithm. As can be seen from figure 4(a), the gesture WE, WP, and NM show a better classification result, with average accuracies of 86.8%, 88.4%, and 93.7% based on the four features, respectively. The performance of gesture HC and HO classification is relatively poor, with an average accuracy of only 74.3% and 59.0%, respectively. The results in figure 4(b) show that the classification accuracy of most gestures has been improved after the fuzzy granulation operation. For gestures HC and HO based on four features, the average classification accuracies are improved by 7.3% and 7.2%, respectively. It should be noted that some gestures are prone to misclassification and have similar performance in the four categories of features (e.g. HO and HC, HO and WS), which is due to the similar muscle exertion between the activities.
To further compare the improved performance of different FG_LogR algorithms for each feature and gesture, table 3 shows the prediction sensitivity and specificity of all gesture activities. It can be observed that the FG_LogR algorithm can improve the correct recognition rate of gestures and reduce the misclassification rate of confusing gestures. For some confusing actions (e.g. HC and HO), the sensitivity based on TD4 feature classification results is increased by 11.2% and 15.6%. It should be noted that the improvement of specificity based on the FG_LogR classification results is less than the sensitivity, which is the trade-off for this study to explore the best performance. In conclusion, the proposed FG_LogR algorithm is superior to the LogR algorithm in predicting gestures, and can ideally improve the action recognition rate in cross-individual gesture prediction.

Performance of FG_LogR and other algorithms
The performance of the proposed FG_LogR algorithm is also compared with other currently popular five classical algorithms (KNN, classification and regression tree (CART), naive bayesian model (NBM), SVM, random forest), and the results are shown in table 4. It can be observed from the overall accuracy that LogR has the best classification performance compared to the other five algorithms. The classification performance of SVM and RF algorithms is comparable and outperforms KNN, CART, and NBM classifiers. Overall, the proposed FG_LogR algorithm has the best performance, and the average accuracy is generally improved by more than 5%, which has practical clinical significance.
To further compare the advantages of the FG_LogR algorithm with other algorithms in crossindividual prediction, subject 5 is analyzed as an example. The classification results based on four features (TD4, AR6, TDPSD, iDFT) of different   0.762 ± 0.108 0.795 ± 0.095 0.711 ± 0.111 0.813 ± 0.085 0.797 ± 0.093 0.836 ± 0.080 0.790 ± 0.094 0.861 ± 0 classifiers are shown in figure 5. The proposed algorithm has better performance on all four features. The FG_LogR algorithm is nearly 10% more accurate than the KNN algorithm for features that other classifiers perform poorly (e.g. TD4). Even so, it should be noted that the aim of this study is not to achieve state-of-the-art classification performance but to explore classifier improvement schemes for sEMG cross-individual recognition. Therefore, only general features are used for comparison and verification with five classical algorithms, and better accuracy depends on more complex features.

Discussion
Aiming at the current lack of research on crossindividual gesture recognition and the high abandonment rate of prosthetic systems, we proposed a new FG_LogR algorithm and verified its advantages on seven gestures of eight subjects. The main findings and contributions of this study include: (1) The proposed FG_LogR algorithm can significantly improve the overall accuracy of cross-individual classification; (2) the LogR algorithm has better performance in cross-individual gesture recognition than other classical recognition algorithms; (3) the cross-individual gesture classification based on the FR_LogR algorithm has significant individual differences. The specific findings and contributions of this paper are discussed as follows.
For cross-individual gesture classification, three participants were used for training and the other one participant was used for testing, i.e. the combination of ABC_D. The results show that the average recognition accuracy of the eight reported subjects has been significantly improved (table 2, figure 3). Compared with the simple operation of the LogR algorithm, the FR_LogR algorithm structures the process of feature  processing by introducing granular computing and standardizing the training process, thereby improving the accuracy and robustness of data classification [46,47]. To further illustrate the performance of the FR_LogR algorithm in cross-individual gesture recognition, figure 6 shows the classification results for selecting 2-7 training subjects. The results show that in all combinations AB_C, ABC_D…, the granular LogR algorithm has better performance. In addition, the TD4 feature has the most significant   improvement, while the TDPSD feature has the best results, consistent with section 3.1, which verifies the superiority of the proposed algorithm. Based on the traditional classification algorithm, the research on the gesture classification of a single subject has achieved satisfactory results. Akhmadeev et al used the Myo ™ armband to acquire accompanying sEMG of six different gestures from seven subjects, and the SVM classification results showed that the system provided excellent classification rates [48]. Copaci et al proposed a new classifier based on a Bayesian neural network to recognize six rehabilitation gestures with 98.7% accuracy [49]. Zhang et al proposed an ensemble learning method based on random forests to adaptively learn the gesture features of high-density sEMG, and the results outperformed other advanced algorithms [50]. Karnam et al proposed energy features for sEMG classification, and finally the KNN classifier achieved the highest validation accuracy of 88.8%, exceeding the state-ofthe-art accuracy of 13% [51]. However, the crossindividual gesture classification performance of the above algorithms (KNN, CART, NBM, SVM, RF) lags behind the LogR algorithm (table 4), which is beyond expectation. Furthermore, the average accuracy of the FG_LogR algorithm has increased by more than 5% compared with other algorithms, which shows significance.
The proposed FG_LogR algorithm still needs a more comprehensive comparison to further prove its robustness. Therefore, we obtained a public dataset from the Kaggle website (www.kaggle.com/ code/gabo515/emg-hand-gesture-analysis/notebook), which includes seven gesture activities of eight subjects, like our experimental data. Among them, three subjects were eliminated due to incomplete gestures (No.1/3/6), and five subjects (No.2/4/5/7/8) were used for cross-individual gesture classification. Table 5 shows the classification results of FG_LogR and other classical classification algorithms. It can be found that the average classification accuracy of all subjects has been significantly improved, which is better than the classic (KNN, CART, NBM, SVM, RF) algorithms. What is exciting is that the data classification results are in good consistent with ours, demonstrating the strong robustness of the proposed algorithm.
The effect of the FR_LogR algorithm on crossindividual gesture classification performance has individual differences (figures 3 and 4). The average classification accuracy of the four features for subject 3 increased by 9.2%, while subject 7 only improved by 1.7%. However, the average recognition accuracy of subject 7 based on the LogR algorithm reached 85%, which was significantly higher than that of subject 3 (74.6%). Although the subject's hand muscle composition is consistent, the development of the musculature is different, which will have a greater impact on the sEMG signal and gesture recognition [42][43][44][45][46][47][48][49][50][51][52][53][54]. In addition, for gesture activity recognition, the classification accuracies of HC and HO increased by 7.3% and 7.2%, respectively, while WS and NM did not improve significantly. In summary, the FR_LogR algorithm tends to improve the results of poor initial classification and has typical individual differences, and the specific performance needs further exploration.
We acknowledge some limitations of this study. Firstly, the purpose of this study is to verify the performance improvement of the proposed algorithm in cross-individual classification, and only four commonly used features are selected for verification. Although the expected goal is achieved, the overall accuracy is not very high. Secondly, the proposed algorithm was verified on our and public datasets, and the fuzzy granulation theory has also been proven to have general significance in improving data classification accuracy. Nonetheless, further validation in work with amputees is warranted. Further, the adopted fuzzy granulation method has the limitation of poor interpretability, like neural networks, which affects its large-scale application. Future work can be performed as follows: 1) Combining more complex feature processing methods (e.g. transfer learning) to further improve the classification accuracy [55,56]; 2) Continue to expand the database, increase the verification of amputee patients and more gestures, and promote the clinical application of this research; 3) Improve the interpretability of the algorithm as much as possible and promote its value in many fields.

Conclusion
To improve the accuracy of cross-individual gesture recognition, a FG_LogR algorithm is proposed in this paper. The performance of the algorithm is validated using data from seven gesture activities from eight subjects, and the results show that the proposed algorithm has a significant improvement over the original algorithm, while outperforming other current classical methods. This study is an efficient attempt to address cross-individual gesture recognition from a classifier perspective, showing significant implications. In the future, feature processing algorithms can be combined to further improve the prediction performance, and it is expected to be used in clinical prosthetic system control to improve the utilization rate of prosthetic systems.

Data availability statement
The data used to support this study were provided with permission from Yan Liu and are not freely available. If you need to access this data, please contact Yan Liu (liuyy2019@163.com).