Classification of Finger Activation using Genetic Algorithm EMG Feature Selection

In cases of hand amputation there is a need for a way to control a robotic replacement hand.

Abstract
In cases of hand amputation there is a need for a way to control a robotic replacement hand. Although the hand is missing, the muscles in the forearm, which are responsible for finger movement, remain, and can nonetheless be flexed. This muscle activity, via electrodes attached to the forearm, can be read as electomyographic (EMG) signals. In order to analyze and classify finger movements using EMG signals, previous studies used several learning techniques, such as perceptron linear separation and a backpropagation-type neural network. These techniques yielded probabilities of misclassifications too high for a realistic implementation.

The Solution
In this project, a combination of a K-Nearest neighbor (KNN) classifier of EMG signal features and a genetic algorithm (GA) for feature selection, is used, with the results that the probability of finger identity misclassification is approximately 5%.

The Algorithm
The process begins with reading the EMG signals from an electrode pair attached to the test subject’s forearm. Finger activation (FA) was identified when the signal’s envelope crossed a threshold higher than the maximum noise level. From the finger activation characteristic features were chosen in order to represent the FA. The characteristic features were derived from two sources. The first is the amplitude of the Discrete Fourier Transform of the EMG signal: The frequency region was divided into 20 equal sections of frequencies and each section was characterized by its mean and variance values. The second source is the Auto Regressive (AR) model: In the AR model the signal is modeled as the output of an all-pole IIR filter with white Gaussian noise input. The features from this model are the AR coefficients.
A modified K Nearest Neighbor classifier used these features in order to ascertain which finger was activated (e.g. a test example’s label is evaluated according to its features). The modified KNN classifier uses a set of examples (a training set) as its decision space. Each example is comprised of N characteristic features and a label indicating the true finger identity. The N- dimensional Euclidian distance between the test example and the training examples is calculated. The nearest example to the test example is declared the nearest neighbor and the test example’s label becomes the nearest neighbor’s label. This is the case when the classifier looks for only k=1 nearest neighbors. For a general k the classifier algorithm takes into account the k nearest labels and decides which is nearest.
Due to an over fitting problem feature selection was required. It was utilized with a Genetic Algorithm that searched for the combination of features with which the KNN classifier classifies with the fewest errors. Genetic algorithms simulate nature’s evolutionary process. The equivalent of an organism is a “solution”. A solution is a binary vector of length N (the number of features), where ‘1’ terms in the solution indicate inclusion of the appropriate feature in the KNN classification. A certain number of solutions are evaluated and they make up a “population” of solutions. They are evaluated against a criterion of survival. The criterion is the number of misclassifications the KNN classifier makes when using the features denoted by the solution. The members of the population, which have the worst criteria die, while the rest survive and breed among themselves (crossover technique), and make up the population of the next iteration (equivalent to a generation).
The algorithm reaches an end when most of the population is identical (this means the algorithm has converged into a solution) or until a certain predetermined number of generations is reached.

Discussion
Most likely due to a highly local solution, in all the search runs the genetic algorithm never converged and terminated by reaching the maximum number of generations, set in all the searches to be 1000. This is a compromise between more generations, which have a higher chance of finding a better solution, and fewer generations, which use fewer hardware resources and less calculation time. Yet if 1000 generations seems like a high value, a simple calculation proves that the genetic algorithm only searches through a fraction of the possibilities:
Number of possible permutation = 1
Number of permutations examined per generation = 32
Number of generation = 1000

% of permutations examined by GA = 2
The first 0.4 seconds (200 samples) were not utilized because their inclusion raised the probability of misclassification. Dividing the finger activation into two kinds of regions can elucidate a possible explanation to this phenomenon:
1.Transient period: first 0.4 seconds.
2.Steady state: rest of FA.
As opposed to the steady state, the transient period depends on how the finger is contracted, without any correlation to which finger was activated.

An interesting tendency is the GA’s number of selected features in the best feature combinations. Despite different starting number of selected features – 10 and 25, the best feature combination selected ~25 features. This is part of a wider trend of the GA. Even when initialized at ten selected features, after ~200 generations the GA searches in the vicinity of 25 features (As can be seen in the bottom left handed figure in Figure 1) and as a direct consequence finds the best feature combinations only in that vicinity of features.

If about 25 selected features still seem as an over fitting problem one must consider the method the probability of error is calculated. The total set of 150 FA measurements is separated into a training set of 120 and a test set of 30. This process is repeated 10 times and at each iteration a different training and test set are randomly selected. If there were a problem of over fitting (e.g. a feature identifies a particular measurement and not a certain general quality) then the probability of error would increase because at each iteration there is a different training set and a different test set.

3
Figure 1: A demonstration of the search process. The top right-handed figure displays the evolution of fitness (probability of misclassification in percent) over the generations. The blue and green graphs indicate the fitness of the chromosome population per generation. The red asterisk indicates the generation in which the chromosome with the best fitness throughout the evolution appears

If the choice of features is completely random, the probability of misclassification error is ~25%. An intuitive approach (for example viewing each feature at a time and searching for ‘good’ separation between the labels) yielded a probability of misclassification of ~15%. The GA managed to lower the probability of misclassification to only ~5%. Hence making finger identification in cases of hand amputation realistic.

Acknowledgments
We would like to thank our supervisor, Elad Yom-Tov, for his guidance and support of this project. We would also like to thank the staff of the PSPL staff, Johanan Erez and Ina Krinsky for all their help.
The Ollendorff Reasearch Center Fund supported this project.