Online Human Activity Recognition on Smart Phones Mustafa Kose, Ozlem Durmaz Incel, Cem Ersoy Computer Engineering Department Bogazici University, Istanbul, Turkey {mustafa.kose, ozlem.durmaz, ersoy}@boun.edu.tr ABSTRACT This paper analyzes the performance of different classification methods for online activity recognition on smart phones using the built-in accelerometers. First, we evaluate the performance of activity recognition using the Naïve Bayes classifier and next we utilize an improvement of Minimum Distance and K-Nearest Neighbor (KNN) classification algorithms, called Clustered KNN. For the purpose of online recognition, clustered KNN eliminates the computational complexity of KNN by creating clusters, i.e., smaller training sets for each activity and classification is performed based on these compact, reduced sets. We evaluate the performance of these classifiers on five test subjects for activities of walking, running, sitting and standing, and find that Naïve Bayes provides not satisfactory results whereas Clustered KNN gives promising results compared to the previous studies and even with the ones which consider offline classification. Categories and Subject Descriptors I.5.2 [Design Methodology]: Classifier design and evaluation General Terms Algorithms, Experimentation, Performance Keywords Activity Recognition, Naïve Bayes, Clustered K-Nearest Neighbor, Smart Phones. 1. INTRODUCTION Human activity recognition using sensory data has become an active field of research in the domain of pervasive and mobile computing. It involves the use of different sensing technologies to automatically collect and classify user activities for different application domains, ranging from medical applications, home monitoring & assisted living, sports & leisure applications. Initially, vision-based sensing, using cameras has been the focus of research studies and more recently inertial sensing, using movement based sensors that can be attached to the user’s body has been investigated [10]. Motivated by the recent studies, activity recognition using the smart phones equipped with a rich set of embedded sensors, such as the accelerometer, GPS, microphone [1-9], has been introduced. Algorithms used in the classification of activities originate from statistical machine learning techniques. However, a trendy algorithm in machine learning research may not exhibit a superior performance in the field of activity recognition [12], especially on the mobile phone platform with limited resources, such as the limited processing power and battery. Moreover, when we look at the literature on activity recognition using inertial sensors, we see that most of the studies first collect sensory data and apply classification algorithms offline on the collected data, using a large part of the collected data for training 1 . It is clear that larger the amount of overlap between the training data and the testing data, better recognition results will be achieved. Offline processing exploits this advantage. Offline processing can be used for applications where online recognition is not necessary. For instance, if we are interested in following the daily routine of a person, such as in [4], the sensors can collect the data during a day; the data can be uploaded to a server at the end of the day and can be processed offline for classification purposes. However, for applications such as a fitness coach where the user is given a program with a set of activities, their duration and sequence, we might be interested in what the user is currently doing [13]. Another application can be the recruitment for participatory sensing applications [11]. For instance, the application might be interested in collecting information from users that are currently “walking” in a particular part of a city. Therefore, online recognition of activities becomes important. In this paper, we focus on activity recognition using the embedded accelerometers on smart phones. Our objective is the classification of basic movements of a user, such as walking, running, sitting and standing. As we mentioned, in contrast to the offline processing of data, we focus on online classification of these activities and evaluate the performance of classifiers such as Naïve Bayes. For this purpose, we developed an activity recognition system for Android phones. Besides online recognition of activities, the training phase is also performed on the phone instead of processing the data offline to learn the model parameters. It is known that training phase of a classification method used in activity recognition is costly and there is a general interest in providing an activity recognition system that does not need training [14] or requires only limited training by the end user. In this paper, we are interested in the performance of classifiers with limited training data considering the limited memory available on the phones. In the proposed system, training data can be collected only in a few minutes and can be used directly for classification steps which reduce the burden on the users. Being one of the first Android applications used for activity recognition is another important motivation for this study. Another contribution of our paper is that the performance evaluation is carried out by using several smart phone models with different capabilities instead of focusing on one model. Besides the performance of classifiers such as Naïve Bayes, we also take advantage of a classification scheme, called Clustered 1 We consider supervised learning methods thus the models require labeled training data to learn the model parameters Permission to make digital or hard copies of all or part of this work for personal or classroom use is granted without fee provided that copies are not made or distributed for profit or commercial advantage and that copies bear this notice and the full citation on the first page. To copy otherwise, or republish, to post on servers or to redistribute to lists, requires prior specific permission and/or a fee. 2nd International Workshop on Mobile Sensing, April 16, 2012, Beijing, China. Copyright 2012 ACM 978-1-4503-1227-1/12/04...$10.00.