Early recognition and prediction of gestures for proactive human-machine interface