Location Prediction in a Smart Environment

The context prediction and especially the location prediction is an important feature for improving the performance of smart systems. Predicting the next location or context of the user make the system proactive, so the system will be capable to offer the suitable services to the user without his involving. In this paper, a new approach will be presented based on the combination of pattern technique and Bayesian network to predict the next location of the user. This approach was tested on real data set, our model was able to achieve 89% of the next location prediction accuracy. Keywords—Location prediction; context; pattern; Bayesian network


I. INTRODUCTION
Nowadays, we are witnessing an exponential advancement of technology.From the advent of the computers to the advent of laptops and tablets, technology has become an integral part of our daily life.Still, the evolution of computer networks and telecommunications marked the most important development enabling mobility and information sharing.This allowed the emergence of new systems that combine ubiquity and intelligence.Using such systems creates a smart environment, capable to have an autonomous decision making, an automatic adaption to the needs of the user without his intervention and provide comfort to the user.
An intelligent/smart system is based on the early idea of the ubiquitous computing [1].It is a machine that integrates a computer connected to the network that can collect and analyze data and communicate with other systems.These systems are also characterized by their ability to learn from historic of user behaviour, security and connectivity.Their capability to adapt to the recent data extracted from the environment.This information extracted from the environment are the context [2].
During the previous years, most research topics were centered upon the concept of smart systems.The main goal of these researches is to divulge user's needs, to provide to user help and convenience to accomplish their daily activities and in different domains.The omnipresent system or ubiquitous system will be focused in this study [3].To accomplish their goals, these systems should be sensitive to the context: contextaware [4].Determine the contexts surrounded the user is the essential part in smart system.In this context, this research work is situated.
The main goal of this research work is to develop a dynamic adaptation system of services according to the context.This research paper is an extended work from previous work that was published in [18].In this paper, an improved approach of user location prediction is presented based on the current context features that are considered important for the prediction.
The paper is prearranged as follows.Section 2 presents related works and highlights the novelty of our work.Section 3 present the challenges and the proposed solution.Section 4 introduces our approach for location prediction based on integration of pattern and Bayesian Network.Section 5 the paper is concluded.

II. RELATED WORK
This section will present a summary of the existing research within the context prediction topic, specifically those that present the location prediction.
Firstly, a definition of the context is presented.In [5] and [6], they defined the context as any portion of information used to give information about any entity.This entity can be a person, a place or an object.
In [7], they used a clustering approach to predict the next location.This approach is based on kernel model using the point of interest of user behavior.In [8], [9], [10] and [11], they used a Markov chain to predict the future context.This approach is based on states or steps using the following equation: It means that if the chain or actual context is in state Xi then the next state or context is X j .This transition is done by a probability p ij that does not depend of the previous context or states.This approach depends on the calculation of the probability transition between states.It is used principally to report the short-term location problem [9].In [12] the WhereNext system is proposed.According of the historic trajectory of a moving entity, the finest corresponding association rule is selected.The selected rule is used and then to predict the next location.Therefore, this approach is created by determining the ordered sequence of the locations and the association rules.To predict the future user mobility, a historical spatial-temporal movement patterns are used in [13] and [14].They indicate that the preferences of the user's change unceasingly according two temporal proprieties which are non-uniformness and consecutiveness.In [15], they used a supervised learning classifier SVM (Support vector machine) to predict the next cell.This approach is based on the use both long-and short-term context information as CSI (Channel state information).Also [16] used SVM to predict the image features from dataset of 1000 images.In [17], they used neural network to predict the next location based on location updates of adjacent past.This approach uses a huge data set of users behaviour as training to guarantee a good result.www.ijacsa.thesai.org In [21], to determine the next location of a mobile object, a new leverage context information is presented.Combining many different contexts, they predict the next location of vehicles by using a context-aware location prediction algorithm.Their approach is based on the determination of the appropriate movement pattern according to the current context.
According to the cited works, we perceived that most of the research works used a limited number of contexts or only the user's behaviour to predict the next location of the user.Despite that using other contextual information will improve the prediction.
Consequently, this paper uses the combination of the Bayesian network and the pattern technique modeled on the ontology with contexts information.This will be an efficient approach.

III. CHALLENGES AND PROPOSED SOLUTION
The main purpose of this research paper is to develop a smart system capable to predict the user behaviour, which is aimed at providing the comfort and facilitate many of the complex tasks we face in our daily lives.Therefore, the system will be capable to detect any change of the context on the environment where the user exists.Then, according to these changes the system will offer the most adequate services to the user.
To accomplish our objectives, there is needed to define the challenges that should be taken in account to develop our system along with our proposed solution.
 What are the required components to design the architecture of a user feature prediction system?
At this point, all the necessary components of the system will be defined, specified and developed.
 How will we represent information concerning the feature of the user, patterns, Bayesians networks and rules of the feature prediction?
 How will the system manage uncertain or ambiguous data in the prediction process presented in [18]?
For question two and three, the new context-based method will be introduced using the pattern technique and a Bayesian network (BN) to resolve the uncertainty problem during the prediction process in a pervasive system.

IV. ARCHITECTURE OVERVIEW
In this section, an overview of the architecture is presented.To address the questions presented in Section 3, we have designed the context awareness architecture (Fig. 1).The main modules of the architecture are: pattern, Bayes and ontology.
As shown in Fig. 1, any change on the environment will trigger an event.This event is detected by the sensors installed on the environment.Theses captors send new information detected to the module pattern.The role of the module pattern is to determine the predicted location (in case of no ambiguity) by interacting with the ontology.In case of ambiguity, the module Pattern sends a set of the different ambiguous locations to the module Bayes that will uses the Bayesians networks to determine the most probable location.This is done by sending the adequate information to the ontology Once the next location is determined, the module adequate services determine the adequate services to offer bestowing to the location.
The ontology (Fig. 2) contains all information concerning the context (user, location, system and environment), the patterns, and the Bayesian networks.

V. LOCATION PREDICTION: COMBINATION OF PATTERN TECHNIQUE AND BAYESIAN NETWORKS
In this section, we will present in detail our approach and how we improved the approach presented in [18].In the next section, we will present a brief detail about the approach presented in [18] and the inconvenient of this approach.Then in section Bayesian Network, we present the integration of Bayesian network with pattern to overcome the problem presented in [18].www.ijacsa.thesai.org

A. Ontological Model 1) Pattern technique:
In [18] they presented an approach based on patterns (Fig. 2).These patterns are presented on the form of problem and solution as showing in Fig. 3.
In their approach [18] they present the pattern problem as a set of; user behaviors and contexts; and pattern solution as the next location (predicted location) (Fig. 4).This approach involves searching for similar pattern problem in the ontology (Fig. 2) and presenting the corresponding of pattern solution once the similar pattern problem has found.For instance, Fig. 5 shows how the approach is employed.As can be seen that the search system starts by creating a patternSearch composed of the actual user behaviour history and the contexts.Then, the system search for the matching of the patterns problems.When it is found, the adequate pattern solution (next location) is presented.
This approach was tested on real data and the achieved accuracy of the next location prediction was 86% (in the situation of no similar pattern).But this approach has shown a markable weakness in the case of the existing of similar pattern problem [18].
To resolve this problem, we integrate the Bayesian network to overcome the indecision cases (our approach).
2) Bayesian network integration: As mentioned in [18] during the prediction of the context, the system might face uncertainty or ambiguity.This is caused by the resemblance of many patterns that was created from user behaviour modeled on the ontology (Fig. 2).To avoid this problem and improve the results obtained in [18], the integration of the Bayesian network is introduced using context.
The Bayesian Network is a graphical model reasoning in the case of uncertainly [19].It is a direct acyclic graph and all independencies are described using conditional probability distributions [20].
For instance, if the system finds that the possible next location is C1 or C3 or C6, the system cannot make decision about the possible solution (ambiguity).In this situation, comes the role of the Bayesian network to take decision according to the actual contexts.Fig. 6 shows an example of the Bayesian network with context information.As shown, every next location ambiguity has relations between every context information with a certain probability.The adaptation of the Bayesian Network with context information such as (time, weather, actual location, etc.) is presented by following equation: (1) Where t presents the number of ambiguous next location and j∈ [1..n] (n present the number of context) As mentioned on the equation ( 1), every context (Cnt j ) is on relation between all the ambiguous next location (li) with a certain probability (P i ) (likelihood probability).

Pattern
To make decision about the suitable next location, the equation ( 2) was used to calculate all a posteriori probability for every ambiguous next location and choose the one that has the greater probability. Where: ( | ): a posteriori probability P(M|C): likelihood P(M): evidence P(C): a priori probability For the example presented in Fig. 6, suppose that likelihood probabilities are in the Table I.These probabilities usually estimated by an expert.The contexts presented in Table I are examples to explain our idea.
In this case the equation ( 2) is used to determine the next location by calculating the posteriori probabilities.Suppose that the actual time is 6:30 pm and the weather is bad.

VI. USE CASE AND RESULTS
In this section, the experimental results are presented for the proposed approach.The used data set is introduced before presenting the evaluation of the approach.
A real data set was used named MDC (mobile data challenges) [22], it was created by Nokia.This data was recorded during 18 months by 200 voluntaries.They used smart phones to gather information about their speeds, their displacement, information on the use of the device, etc.
To test our approach, the dataset was spilt to 80% as training data and 20 % as testing.The patterns used in [18] were increased from 2500 to 4500 patterns to get more consistent results.
A java program was developed to send queries to the ontology.We randomly generate 1500 queries of user behaviour for each day.Fig. 7 shows the number of queries created randomly for every day to test our approach.The blue lines present the number of rejected queries and red lines are the number of the accepted queries.
The results obtained are presented in Fig. 8.The average of the prediction model was 89%, there is also more than 90% in some days as shown in the following diagram.
A competitive result was obtained a comparing to the approach presented in [18].In [23], they used the same data set to test different algorithms, comparing to their results (Table II), motivating results were attained for the prediction of a user's next location using our approach based of the combination of pattern technique and Bayesian networks.

VII. CONCLUSION
This research work is an entry point for the field of service adaptation in smart system by the prediction of the context using the contextual information collected from the sensors existing in the environment such as the current position of the user, time, day etc.The progress of smart system/pervasive system is related to the determination of user's behaviour and context.The prediction of the future context is one of the important elements in pervasive system /smart system to provide a proactive context-awareness adaptation.This paper is presented a new approach based on pattern and Bayesian network to predict the next location of the user.At first, this approach uses the pattern technique to determine the next location and in the case of the ambiguity to take decision the Bayesian network is used to make decision about the adequate next location.From the experimental results, it can be seen comparing to other algorithms presented on the literature review that the competitive results are obtained.However, some limitation should be noticed and should be taken into consideration in the future work.In our case study, the prediction of the location was limited to eight locations.Moreover, in a smart environment, the number of locations will not be limited to eight locations; in this case the size of the ontology will increase exponentially because for every location we will create a separate Bayesian network.