Problem Statement
The objective of the project is to use data from the IMU of a phone
(3 axis gyroscope and 3 axis accelerometer) and predict the gestures
performed. We have the 6 following gestures wave, figure 8, circle,
pendulum, hammer and fish. We have to implement Hidden Markov Models
(HMM) to predict the probability of each sequence of observation to
belong to a particular gesture.
Description of approach
By visually inspecting the variation in the sensor values, I
trimmed of the regions where the sensors are moving randomly
before starting of the gestures. I vector quantized the 6
dimensional space of accelerometer and gyroscope values into 20
clusters using data from all the gestures. Assuming a total of 15
hidden states, I performed training using EM or Baum-Welch
algorithm to my Hidden Markov Model. I used the recursive forward
backward algorithm to compute the intermediate values. In order to
account for the numerical instabilities I used the scaling
technique mentioned in the Lawrence R. Rabiner's paper on "A
Tutorial on Hidden Markov Models and Selected Applications in
Speech Recognition". For the testing, I computed the log
probability of the sequence using the Forward Algorithm.