A Hand-Modeled Feature Extraction-Based Learning Network to Detect Grasps Using sEMG Signal

Recently, deep models have been very popular because they achieve excellent performance with many classification problems. Deep networks have high computational complexities and require specific hardware. To overcome this problem (without decreasing classification ability), a hand-modeled feature selection method is proposed in this paper. A new shape-based local feature extractor is presented which uses the geometric shape of the frustum. By using a frustum pattern, textural features are generated. Moreover, statistical features have been extracted in this model. Textures and statistics features are fused, and a hybrid feature extraction phase is obtained; these features are low-level. To generate high level features, tunable Q factor wavelet transform (TQWT) is used. The presented hybrid feature generator creates 154 feature vectors; hence, it is named Frustum154. In the multilevel feature creation phase, this model can select the appropriate feature vectors automatically and create the final feature vector by merging the appropriate feature vectors. Iterative neighborhood component analysis (INCA) chooses the best feature vector, and shallow classifiers are then used. Frustum154 has been tested on three basic hand-movement sEMG datasets. Hand-movement sEMG datasets are commonly used in biomedical engineering, but there are some problems in this area. The presented models generally required one dataset to achieve high classification ability. In this work, three sEMG datasets have been used to test the performance of Frustum154. The presented model is self-organized and selects the most informative subbands and features automatically. It achieved 98.89%, 94.94%, and 95.30% classification accuracies using shallow classifiers, indicating that Frustum154 can improve classification accuracy.


Introduction
Electromyography (EMG) is a diagnostic procedure to assess the health of muscles and the nerve cells that control them (motor neurons). There are two types of EMG: used. The classification results showed that the most successful results in the analysis of the data were obtained by k nearest neighbor (kNN). The accuracy rate was calculated as 98% for kNN. Pancholi and Joshi [28] presented a system for evaluating EMG signals which aims to recognize the structure of arm movements from EMG signals received from amputees. In the study, six different movements from four individuals were collected and evaluated. The highest accuracy rate was 97.75%, which was achieved using LDA classifier with hold-out validation. Jia et al. [29] proposed a method for classifying EMG signals using convolutional neural networks. The windowing method was used to improve the performance of the proposed method. In the utilized dataset, sEMG signals from eight participants were used; the accuracy rate was 99.38%. Tuncer et al. [4] proposed an approach to ensure proper hand movement with EMG signals, and data from nine transradial amputee patients were used. Discrete wavelet transform and ternary pattern were selected as feature extractors in theit study. The evaluation results were presented according to the following parameters: accuracy (99.14%), geometric mean (99.13%), precision (99.14%), and F1-score (99.14%), employing kNN classifier with 10-fold cross-validation. Simãoa et al. [30] developed a model for the classification of EMG signals obtained from forearm muscles. In the model, feature extraction was provided by recurrent neural networks. In addition, the study was compared with long short-term memory networks and gated recurrent unit methods. Time and accuracy rates were presented using DualMyo [31] and NinaPro DB5 [32] datasets. Their model achieved about 95% accuracy using DualMyo datasets [31], and 91% using NinaPro DB5 [32] EMG datasets.
sEMG signal classification is an important research topic for machine learning and biomedical engineering. In this work, we propose a hand-modeled learning method for sEMG signal classification with high performance. To achieve our goal, three sEMG datasets were used for testing. A new effective learning method was also applied to achieve high classification ability with linear time complexity with sEMG signals; this learning model was named Frustum154. The main aim of the Frustum154 model is to select the most valuable subbands to generate features. Frustum154 comprises three main phases: (i) feature extraction using the presented frustum pattern, statistical features, and multiple parameter-based, tunable Q actor wavelet transform (TQWT) [33] decomposition, (ii) iterative neighborhood component analysis (INCA) [34] selector, and (iii) classification using a support vector machine (SVM) [35,36] or kNN [37]. Frustum154 allows us to propose a systematic hand-crafted method. It can also choose the most appropriate model for signal classification problems.
The key novelties and contributions of this model are given below: Novelties: • Shapes can be used to propose new local textural feature generators. Therefore, the frustum shape is used to present a new textural feature creation function, named the "frustum pattern". By using the frustum pattern, a shape-related, graph-based local feature extraction methodology is investigated in this work.

•
A new learning network called Frustum154 is presented in this paper. Frustum154 is a self-organized learning feature extraction method which uses two types of feature selection. In the feature generation/creation phase, the best features are chosen using a loss function. By using this function, Frustum154 automatically selects the best subbands for the problem.
Main contributions: • sEMG signal classification is an important signal processing topic for machine learning; deep learning models have been widely used to classify sEMG signals, achieving excellent accuracy. However, deep models are highly complex. Frustum154 is a handcrafted, feature-based learning method which can choose the most appropriate model for signal classification problems.

•
In order to demonstrate the universal classification ability of the suggested model, three sEMG signal datasets were used; the proposed model achieved over 94% classification for these datasets. In this study, an sEMG for basic hand movement dataset from the UC Irvine Machine Learning Repository was used. This dataset contains two subdatasets, from which a third dataset was obtained by fusing the two. More details of these databases are given below. The main purposed of this dataset is to detect six basic hand-movements; (a) Cylindrical (C), (b) Tip (T), (c) Palmar (P), (d) Hook (H), (e) Spherical (S), (f) Lateral (L). Images of these gestures are presented in Figure 1 [38,39]. • In order to demonstrate the universal classification ability of the suggested model, three sEMG signal datasets were used; the proposed model achieved over 94% classification for these datasets.

Material
In this study, an sEMG for basic hand movement dataset from the UC Irvine Machine Learning Repository was used. This dataset contains two subdatasets, from which a third dataset was obtained by fusing the two. More details of these databases are given below. The main purposed of this dataset is to detect six basic hand-movements; (a) Cylindrical (C), (b) Tip (T), (c) Palmar (P), (d) Hook (H), (e) Spherical (S), (f) Lateral (L). Images of these gestures are presented in Figure 1 [38,39].

First sEMG Dataset
The first dataset, named DB1, consisted of data from three healthy female and two healthy male subjects. The ages of subjects range from 20-22 years. These subjects performed six movements. Each subject was asked to perform each of movement for 6 seconds, and movements were repeated 30 times. Thus, 180 pieces of six-seconds, two-channel EMG signals were recorded. This dataset included a total of 900 sEMG signals. The sampling rate of the EMG signal was 500 Hz.

Second sEMG Dataset
The second dataset (DB2) included three days of data from a healthy, male, 22-yearold subject. This subject performed 100 movements for three days. The length of the used sEMG segments was five seconds. This dataset included a total of 1800 sEMG signals. The sampling frequency was 500 Hz, as in the first dataset.

First sEMG Dataset
The first dataset, named DB1, consisted of data from three healthy female and two healthy male subjects. The ages of subjects range from 20-22 years. These subjects performed six movements. Each subject was asked to perform each of movement for 6 seconds, and movements were repeated 30 times. Thus, 180 pieces of six-seconds, two-channel EMG signals were recorded. This dataset included a total of 900 sEMG signals. The sampling rate of the EMG signal was 500 Hz.

Second sEMG Dataset
The second dataset (DB2) included three days of data from a healthy, male, 22-year-old subject. This subject performed 100 movements for three days. The length of the used sEMG segments was five seconds. This dataset included a total of 1800 sEMG signals. The sampling frequency was 500 Hz, as in the first dataset.

Third sEMG Dataset
DB3 is the fused dataset. It was created by merging DB1 and DB2. It is a homogeneous dataset, with each class containing 450 sEMG signals. Therefore, DB3 contains 2700 sEMG signals in total. In this version, we created a new, large dataset by using both the first and second datasets together.

Frustum Pattern
Graph-based learning models are very popular in machine learning applications as they can solve difficult problems with a high level of accuracy. Therefore, the effects of such methods should be analyzed. We proposed a hand-modeled learning method using a graph-based feature extractor. This extractor is a graph-based function; the primary objective of this research is to investigate the feature extraction ability of the frustum shape [40] in order to create a new local textural feature generator. The proposed feature extractor was applied to three sEMG datasets to test the feature extraction ability. The main aim of the proposed frustum pattern is to extract hidden patterns from sEMG signals. The vertex and edges of the frustum [40] shape were used to create a new graph, which was utilized as the pattern for the extractor.
This shape was modeled as a feature extraction function. The frustum shape consists of two hexagons. The big hexagon is the bottom of the frustum and the small one is the top. There are six connection edges between the top and the bottom of the hexagons. Therefore, we used two matrices to model this shape as a graph-based pattern. The created bottom and top matrices and the matrices-based patterns are shown in Figure 2. DB3 is the fused dataset. It was created by merging DB1 and DB2. It is a homogeneous dataset, with each class containing 450 sEMG signals. Therefore, DB3 contains 2700 sEMG signals in total. In this version, we created a new, large dataset by using both the first and second datasets together.

Frustum Pattern
Graph-based learning models are very popular in machine learning applications as they can solve difficult problems with a high level of accuracy. Therefore, the effects of such methods should be analyzed. We proposed a hand-modeled learning method using a graph-based feature extractor. This extractor is a graph-based function; the primary objective of this research is to investigate the feature extraction ability of the frustum shape [40] in order to create a new local textural feature generator. The proposed feature extractor was applied to three sEMG datasets to test the feature extraction ability. The main aim of the proposed frustum pattern is to extract hidden patterns from sEMG signals. The vertex and edges of the frustum [40] shape were used to create a new graph, which was utilized as the pattern for the extractor.
This shape was modeled as a feature extraction function. The frustum shape consists of two hexagons. The big hexagon is the bottom of the frustum and the small one is the top. There are six connection edges between the top and the bottom of the hexagons. Therefore, we used two matrices to model this shape as a graph-based pattern. The created bottom and top matrices and the matrices-based patterns are shown in Figure 2.  Figure 2 shows that the proposed frustum pattern uses 7 × 7-sized matrices, as well as two types of edges to generate binary features, i.e., bottom, top, and connection edges. Moreover, the ternary function was utilized as a kernel to generate features. The equations of the ternary bit extractors are given in Equations (1)-(3).
where t 1 (., .) is the upper ternary function, t 2 (., .) is the lower ternary function, a, s denote input parameters, d is the threshold, std(.) defines standard deviation function and S defines the utilized input signal. The steps of the proposed frustum pattern are: 1: Divide the signal into overlapping blocks with a length of 49.
where obl represents the overlapping block and i, j are indices. 2: Create a matrix with a size of 7 × 7 using obl.
where mat is 7 × 7 sized matrix to apply frustum pattern. 3: Generate bits by applying the frustum pattern and ternary bit extractors.
5: Extract histograms of the six map signals. Each histogram has 64 elements. 6: Merge the extracted histograms to create a feature vector with a length of 384.
f where f v is the features extracted by using the frustum pattern.

The Proposed Learning Model: Frustum154
The main objective of the proposed model is to achieve excellent classification ability with biomedical signals for classification problems. The model comprises a feed-forward network and a hand-modeled architecture. The used architecture has feature extraction, feature selection, and classification phases. A machine learning model is proposed for feature extraction, comprising a multilevel method. Effective wavelet decomposition (TQWT) is utilized as a decomposition method. By using TQWT, 153 subbands are generated. Two feature extraction functions are used to generate fused features, i.e., a statistical generator and frustum pattern. Using these functions, 154 feature vectors (a raw sEMG signal and 153 subbands) are generated. Misclassification rates of these vectors are calculated using kNN and SVM classifiers (herein, kNN and SVM are utilized as loss functions) and a loss array is created. The top 20 feature vectors are selected using loss values, which are merged to create the final feature vector. INCA is applied to automatically choose the most discriminative features. In the classification phase, kNN or SVM are used to demonstrate the excellent classification ability of the created features. A graphical summary of the proposed model is shown in Figure 3.

The Proposed Learning Model: Frustum154
The main objective of the proposed model is to achieve excellent classification ability with biomedical signals for classification problems. The model comprises a feed-forward network and a hand-modeled architecture. The used architecture has feature extraction, feature selection, and classification phases. A machine learning model is proposed for feature extraction, comprising a multilevel method. Effective wavelet decomposition (TQWT) is utilized as a decomposition method. By using TQWT, 153 subbands are generated. Two feature extraction functions are used to generate fused features, i.e., a statistical generator and frustum pattern. Using these functions, 154 feature vectors (a raw sEMG signal and 153 subbands) are generated. Misclassification rates of these vectors are calculated using kNN and SVM classifiers (herein, kNN and SVM are utilized as loss functions) and a loss array is created. The top 20 feature vectors are selected using loss values, which are merged to create the final feature vector. INCA is applied to automatically choose the most discriminative features. In the classification phase, kNN or SVM are used to demonstrate the excellent classification ability of the created features. A graphical summary of the proposed model is shown in Figure 3.

Operation
Parameter Output Channel merging Two channels The used datasets comprise two-channeled sEMG signals. These channels are concatenated to use both channels. Classification kNN: k is 1, distance is Manhattan and voting is none. Validation is 10-fold CV. SVM: Kernel scale is auto, kernel is 3rd degree polynomial, C value is 1 and coding is one-vs-one. Validation is 10-fold CV.

Predicted values
More explanations of the FrustumNet41 are given in subsections.

Feature Generation
The most complex and first phase of the Frustum154 is feature extraction. In this paper, a machine learning method is proposed as a feature extraction method, since this phase uses feature creation and classification methods together to generate the most appropriate features. The concatenated sEMG signal (channels 1 and 2 were merged to obtain the sEMG signal) and TQWT subbands (153 subbands were generated) were utilized for feature generation. By deploying this feature extractor (Frustum Pattern and Statistics), textural and statistical features were generated from the 154 signals (raw sEMG signal and 153 TQWT subbands). Therefore,154 feature vectors were created, which were then merged to create the final feature vector. To better explain the presented feature generation method, the steps of this process are given in below.
Step 0: Read sEMG signals and concatenate channels to obtain the input sEMG signal.
Herein, the concatenated sEMG describes the sEMG signal, Ch 1 and Ch 2 are the first and second channels of the sEMG signal and conc(.) is the concatenation function.
Step 2: Extract features by deploying the proposed Frustum pattern and statistical features.
f ev 1 = conc(FP(sEMG), SE(sEMG)) f ev j+1 = conc FP(SB j ), SE(SB j ) , j ∈ {1, 2, . . . , 153} where f ev are feature vectors and this model creates 154 feature vectors, FP(.) is frustum pattern and SE(.) is the statistical extractor. We used 15 statistical moments in the used statistical feature extractor; the used moments are tabulated in Table 2. These statistical moments (see Table 2) were applied to the raw signal and absolute values of the signal.
Step 4: Apply a loss generation function (kNN or SVM with 10-fold cross-validation) to generate features and calculate the loss array. The main objective of this step is to select the most significant subbands for feature extraction. In order to choose the most significant subbands according to the proposed frustum pattern and statistical feature extraction (see Table 2), loss values had to be calculated. Therefore, shallow classifiers were utilized as the loss value generator.
Step 5: Choose the top 20 feature vectors and concatenate them to obtain features with a length of 8280. This architecture is parametric and we selected the top 20 feature vectors to create the final feature vector. A variable number of features or a threshold point can be used to create the final feature vector.
After creating the final feature vector, the optimal number of features was chosen using INCA selector; details are presented in Section 4.2.

Feature Selection
Herein, an iterative feature function, i.e., INCA, was used to select the best feature combination. This is an iterative version of the NCA classifier; its primary purpose is to solve automated optimal feature vector selection using NCA, since NCA cannot select the best number of features without using the trial and error method. INCA was presented by Tuncer et al. [34] in 2020, and is a very effective feature selector. The parameters of the applied INCA are defined in Table 1. For cubic SVM and kNN (1NN with L1-norm) with 10-fold cross-validation were used. For DB1 (first database), kNN is the best classifier. For others (DB2 and DB3), the best loss value generator is Cubic SVM. This generator chooses 413 features and selects the best combination according to misclassification rates. In this work, three datasets were used for testing. INCA chose 279, 277, and 295 features for the DB1, DB2, and DB3 datasets, respectively. The steps for the NCA are given below.
Step 6: Deploy INCA to select the most informative features.

Classification
kNN and SVM classifiers were used and results were obtained. Therefore, the most appropriate classifier was selected to solve the problem. We used two classifiers and the proposed Frustum154 chose the most effective one. The properties of the used classifiers are tabulated in Table 1.
Step 7: We then calculated the results using the kNN or SVM classifier. The hyperparameters of the used classifiers are as follows. For the kNN classifiers, k is 1, distance is Manhattan and voting is none. The hyperparameters of the SVM classifier are as follows: Kernel scale is auto, kernel is 3rd degree polynomial, C (box constraint) value is 1 and coding is one-vs-one. Moreover, ten-fold CV was used to validate these classifiers.

Experimental Setup
In this paper, three publicly-available sEMG signal datasets were used to evaluate Frustum a pattern-based classification model. The presented model is self-organized. To implement it, MATLAB 2021b was used. We programmed this model using the following functions: main, TQWT, Frustum_Pattern, statistics, loss_calculator, feature_vector_selector, INCA and classification. This model was implemented on a personal computer (PC) with a simple configuration, as it is lightweight and there is no need to use any unusual hardware.

Validation
The presented model is a classification model. In the classification and loss value generation phases, 10-fold cross-validation was used to obtain robust results. In this validation technique (10-fold cross-validation), the observations were divided randomly into 10 folds, and the average value of the results was calculated.

Results
To evaluate the presented Frustum154, three sEMG signals datasets were used for the general classification results. We used recall, precision, F1-score, and accuracy performance metrics to obtain measurements. The present model can select the best classifier according to the problem. The results of the DB1 were calculated by utilizing the kNN classifier. SVM was used for the other two datasets (DB2 and DB3). Furthermore, 10-fold cross-validation was utilized as a validation model to obtain robust classification results. The calculated confusion matrices are tabulated in Table 3.   Table 3 shows that the proposed Frustum154 achieved 100% class-wise accuracies (recall) for cylindrical and spherical movements, as well as 100% F1-score for spherical movement. The confusion matrix for DB2 is tabulated in Table 4. For DB2, the best class was spherical movement (S), for which Frustum154 achieved 99.67% recall. The worst categories were Palmar and Lateral, which reached 91% classification accuracies.
The last signal dataset was DB3; this is a merged dataset. Table 5 shows the confusion matrix for DB3. Spherical movement was the best class for DB3, as was the case with DB1 and DB2. The worst category was Tip, with Frustum154 achieving 91.11% recall.
Moreover, the differences among the used feature selection methods (we used two feature selection approximations, i.e., loss value-based selection in the feature extraction and the INCA model) are explained below. To choose the most appropriate feature vectors, loss values were calculated; these error rates are shown in Figure 4.  Figure 4. As shown in Figure 4, the best accuracies of the individual feature vector for DB1, DB2, and DB3 were calculated as 90.56%, 73.89%, and 77.30% respectively. Feature merging (top 20 features concatenation) and INCA were applied to increase these classification accuracies. The INCA feature selection process is shown in Figure 5. As shown in Figure 4, the best accuracies of the individual feature vector for DB1, DB2, and DB3 were calculated as 90.56%, 73.89%, and 77.30% respectively. Feature merging (top 20 features concatenation) and INCA were applied to increase these classification accuracies. The INCA feature selection process is shown in Figure 5.  As shown in Figure 4, the best accuracies of the individual feature vector for DB1, DB2, and DB3 were calculated as 90.56%, 73.89%, and 77.30% respectively. Feature merging (top 20 features concatenation) and INCA were applied to increase these classification accuracies. The INCA feature selection process is shown in Figure 5. The feature merging and INCA processes increased the accuracy rates from 90.56%, 73.89%, and 77.30% to 98.89%, 94.94%, and 95.30% for DB1, DB2, and DB3 respectively.

Time Complexity Analysis
A time complexity analysis was conducted. Big theta notation was used to present the general results. By using this notation, the training and testing complexities of our presented Frustum154 could be computed; see Table 7. Table 7. Time complexity computation of the proposed Frustum154.

Phase
Step Here, variables were used to calculate asymptotic notation as follows. t is the number of subbands, n defines the length of the sEMG signal, d is the number of observations, k defines the time complexity coefficient of the parameter, f is the number of features and m is the number of iterations in INCA. As shown in Table 7, the time complexity of this model is linear.

Discussion
This research presents a new classification network to detect six basic hand movements using sEMG signals. The proposed model, Frustum154, creates 154 feature vectors and selects the 20 most appropriate feature ones to create final features. The results (see Section 5) clearly demonstrate the success of the presented feature generation network and a new attribute, i.e., shoelaces, was investigated. To better illustrate the success of the model, a performance comparison was performed; the results are tabulated in Table 8.  To the best of our knowledge, to date, no method has utilized DB2 and DB3. Therefore, we cannot perform any comparisons of such cases. We obtained over 94% classification accuracies for all datasets, indicating the high classification rates of our model. Comparisons were made using DB1, since this is the simplest dataset. Subasi and Qaisar [41] presented a statistical feature extraction-based model using DB1 which achieved 94.11% accuracy. They showed the classification ability of the statistical features but their classification result was not good. Nishad et al. [17] presented a TQWT and statistical feature extraction-based model. They used DB1 to calculate the results. DB1 contains five subjects, and the authors calculated the results for each. To calculate the overall performance, they used the average values. They did not use all of the dataset to get general results; other models [42,43] have used the same strategy. Coskun et al. [19] presented a one-dimensional, CNN-based deep learning model and achieved 94.94% accuracy. Tsinganos et al. [44] introduced a CNN-based deep learning model but did not achieve satisfactory classification results. Deep learning models have high computational complexity, since many parameters need to be optimized. A self-organized hybrid, hand-crafted feature-based model is presented in this research. To show the classification ability of the presented Frustum pattern-based model, three sEMG datasets for basic hand-movements were used; our model yielded excellent classification results. It is worth noting that:

•
The feature generation capabilities of the frustum pattern/graph were investigated and the sEMG classification was found to be highly successful; • To maximize the effectiveness of TQWT, multiple parameter-based TQWT was used and 153 subbands were generated; • An improved feature selector (INCA) was used; • A novel hand-modeled learning method is proposed; • The proposed Frustum154 achieved a higher classification rate than deep learning models (see Table 8); • The present model showed good general classification success.
The proposed model could also be applied to more complex and larger datasets; this will be explored in future work.

Conclusions
The objective of a machine learning model is to achieve excellent classification with low execution time; however, there is usually a tradeoff. To overcome this problem, a self-organized model has been presented and three sEMG signal datasets have been used to depict the general efficacy of the presented model. A novel, hand-modeled feature selectionbased, basic hand-movement classification network using a multilevel feature generation method is presented. This approach was inspired by deep feature networks and it has lowand high-level feature generation capabilities. The proposed Frustum154 method generates 154 features, selects the top 20 feature vectors, and chooses the most discriminative ones by deploying the INCA selector. FrustumNet154 has been tested on three datasets, achieving good performance with all three. The accuracies for these datasets were 98.89%, 94.94% and 95.30%, respectively. In the literature (see Table 8), the first sEMG dataset was used