Recently, some studies for head gestures recognition have been proposed, but most of them are based on image processing technology. Moreover, there is less focus on the use of wearable devices in recognizing head gestures. In this paper, we apply machine learning techniques to recognize some common head activities using a head-mounted wearable device. We use the wearable device to collect sensor data related to user's head activities. Then, we apply energy-based segmentation method on the collected data to find out the data segments where the activities may occur. Finally, we extract candidate features from the segments and feed them into a pre-Trained classifier to identify the type of head gesture. We implement the prototype of above methods on Arduino platform and evaluate the efficiency of the proposed methods on real datasets. The experiment results show that our proposed methods can effectively and efficiently identify different types of head gestures with an average accuracy rate of 95%.