1 AbstractThis paper proposes an algorithm, called Sequence Prediction via Enhanced Episode Discovery (SPEED), to predict inhabitant activity in smart homes. SPEED is a variant of the sequence prediction algorithm. It works with the episodes of smart home events that have been extracted based on the ON- OFF states of home appliances. An episode is a set of sequential user activities that periodically occur in smart homes. The extracted episodes are processed and arranged in a finite-order Markov model. A method based on prediction by a partial matching (PPM) algorithm is applied to predict the next activity from the previous history. The result shows that SPEED achieves 88.3% prediction accuracy, which is better than LeZi Update, Active LeZi, IPAM, and C4.5. Index TermsMarkov Model, Prediction by partial matching (PPM), Activity prediction, Smart home, Prediction algorithm I. INTRODUCTION MART home is a branch of ubiquitous computing in which the information-perceiving and information-processing units remain invisible in the surroundings to create a pervasive environment. In the future, most of the common services, e.g., communication, medical, energy, utility, entertainment, and security, will be integrated into homes. People spend a significant amount of time in their houses, and this has drawn researchers to promote integration of all possible services with traditional homes. However, the process requires effective algorithms to predict user activity. These algorithms create an interactive intelligent environment to assist the inhabitant in daily life. This is the accepted version of the published paper. The full citation of this paper is given below: Alam, M.R., Reaz, M.B.I., Mohd Ali, M.A., "SPEED: An Inhabitant Activity Prediction Algorithm for Smart Homes," IEEE Transactions on Systems, Man and Cybernetics, Part A: Systems and Humans, vol.42, no.4, pp.985-990, July 2012, doi: 10.1109/TSMCA.2011.2173568. Muhammad Raisul Alam is with the Institute of Microengineering and Nanoelectronic, Universiti Kebangsaan Malaysia, 43600 UKM Bangi, Selangor, Malaysia (phone: +603-89216316; fax: +603-89216146; e-mail: mraisul@gmail.com). M. B. I. Reaz is with Department of Electrical, Electronic, and Systems Engineering, Faculty of Engineering and Built Environment, Universiti Kebangsaan Malaysia, 43600 UKM, Bangi, Selangor, Malaysia (e-mail: mamun.reaz@gmail.com). M. A. Mohd Ali is with Department of Electrical, Electronic, and Systems Engineering, Faculty of Engineering and Built Environment, Universiti Kebangsaan Malaysia, 43600 UKM, Bangi, Selangor, Malaysia (e-mail: mama@vlsi.eng.ukm.my). Providing intelligence to the home appliance is a critical problem in designing an intelligent system. The design architecture strongly depends on a system’s perception of the environment and its behavior based on observation. Smart homes, the next emerging research area in the field of artificial intelligence (AI), depend on effective usage of AI algorithms for reliable performance. A smart home should consciously observe the sequence of user behavior, learn the user activity pattern, and try to predict the next probable event. This paper proposes an algorithm called SPEED (Sequence Prediction via Enhanced Episode Discovery) for inhabitant activity prediction. SPEED discovers periodic episodes of inhabitant behavior, trains itself with learned episodes, and makes decisions based on the obtained knowledge. An episode is a pattern of sequential events that occur periodically in smart homes. The performance of a sequence prediction algorithm primarily depends on how an algorithm determines and distinguishes episodes. The algorithms that were previously proposed to provide home intelligence, primarily came from the fields of data compression [1], [2], Bayesian statistics [3], artificial neural networks [4], fuzzy logic [5], [6], neural fuzzy networks [7], machine learning [8], and Markov logic networks [9]. These algorithms were based on the manipulation of traditional data sequences and did not consider the pattern of the smart home events that depict the unique characteristics of smart home inhabitant activity. The proposed SPEED algorithm provides a new approach for episode extraction, utilizing the characteristics of human behavior in smart homes. Prediction accuracy is also influenced by decision-making methods and their efficiency. A method derived from the Prediction by Partial Matching (PPM) algorithm is used to select the most probable future activity [1], [2], [10]. The PPM algorithm estimates the weighted probability of every event using all the possible episodes based on the current window state. An alternative to PPM is using a combination of tree length and episode frequencies to measure the event cost. However, this procedure is not efficient because it considers only a single tree branch to calculate the probable activity. The advantage of PPM is that it uses every possible episode from different branches of the tree and measures the probability based on the weighted episode length. Short-length episodes have less influence on the probability measurement. The final SPEED: An Inhabitant Activity Prediction Algorithm for Smart Homes Muhammad Raisul Alam, Student Member, IEEE, M. B. I. Reaz, Member, IEEE and M. A. Mohd Ali, Member, IEEE S