A machine learning based approach for gesture recognition from inertial measurements