Context-Awareness for Mobile Sensing: A Survey and Future Directions <s> E. Context Inference <s> An autoregressive model for univariate, one‐dimensional, nonstationary, Gaussian random processes with evolutionary power spectra is introduced. At the same time, an efficient technique for numerically generating sample functions of such nonstationary processes is developed. The technique uses a recursive equation which: (1) Reflects the nature of the nonstationarity of the process whose sample functions are to be generated; and (2) involves a normalized univariate, one‐dimensional white noise sequence. The coefficients of the recursive equation are determined using the autocorrelation function of the process, which in turn is calculated from the evolutionary power spectrum at every time instant. Using the recursive equation with those coefficients, sample functions over a specified domain can be generated with substantial computational ease. Univariate, one‐dimensional, nonstationary processes with three different forms of the evolutionary power spectrum are modeled, and their sample functions are genera... <s> BIB001 </s> Context-Awareness for Mobile Sensing: A Survey and Future Directions <s> E. Context Inference <s> Abstract This paper rigorously establishes that standard multilayer feedforward networks with as few as one hidden layer using arbitrary squashing functions are capable of approximating any Borel measurable function from one finite dimensional space to another to any desired degree of accuracy, provided sufficiently many hidden units are available. In this sense, multilayer feedforward networks are a class of universal approximators. <s> BIB002 </s> Context-Awareness for Mobile Sensing: A Survey and Future Directions <s> E. Context Inference <s> Abstract Linear and quadratic discriminant analysis are considered in the small-sample, high-dimensional setting. Alternatives to the usual maximum likelihood (plug-in) estimates for the covariance matrices are proposed. These alternatives are characterized by two parameters, the values of which are customized to individual situations by jointly minimizing a sample-based estimate of future misclassification risk. Computationally fast implementations are presented, and the efficacy of the approach is examined through simulation studies and application to data. These studies indicate that in many circumstances dramatic gains in classification accuracy can be achieved. <s> BIB003 </s> Context-Awareness for Mobile Sensing: A Survey and Future Directions <s> E. Context Inference <s> In this paper, a framework for maximum a posteriori (MAP) estimation of hidden Markov models (HMM) is presented. Three key issues of MAP estimation, namely, the choice of prior distribution family, the specification of the parameters of prior densities, and the evaluation of the MAP estimates, are addressed. Using HMM's with Gaussian mixture state observation densities as an example, it is assumed that the prior densities for the HMM parameters can be adequately represented as a product of Dirichlet and normal-Wishart densities. The classical maximum likelihood estimation algorithms, namely, the forward-backward algorithm and the segmental k-means algorithm, are expanded, and MAP estimation formulas are developed. Prior density estimation issues are discussed for two classes of applications/spl minus/parameter smoothing and model adaptation/spl minus/and some experimental results are given illustrating the practical interest of this approach. Because of its adaptive nature, Bayesian learning is shown to serve as a unified approach for a wide range of speech recognition applications. > <s> BIB004 </s> Context-Awareness for Mobile Sensing: A Survey and Future Directions <s> E. Context Inference <s> Context-enabled applications are just emerging and promisericher interaction by taking environmental context into account.However, they are difficult to build due to their distributednature and the use of unconventional sensors. The concepts oftoolkits and widget libraries in graphical user interfaces has beentremendously successtil, allowing programmers to leverage offexisting building blocks to build interactive systems more easily.We introduce the concept of context widgets that mediate betweenthe environment and the application in the same way graphicalwidgets mediate between the user and the application. We illustratethe concept of context widgets with the beginnings of a widgetlibrary we have developed for sensing presence, identity andactivity of people and things. We assess the success of ourapproach with two example context-enabled applications we havebuilt and an existing application to which we have addedcontext-sensing capabilities. <s> BIB005 </s> Context-Awareness for Mobile Sensing: A Survey and Future Directions <s> E. Context Inference <s> Probabilistic graphical models and decision graphs are powerful modeling tools for reasoning and decision making under uncertainty. As modeling languages they allow a natural specification of problem domains with inherent uncertainty, and from a computational perspective they support efficient algorithms for automatic construction and query answering. This includes belief updating, finding the most probable explanation for the observed evidence, detecting conflicts in the evidence entered into the network, determining optimal strategies, analyzing for relevance, and performing sensitivity analysis. The book introduces probabilistic graphical models and decision graphs, including Bayesian networks and influence diagrams. The reader is introduced to the two types of frameworks through examples and exercises, which also instruct the reader on how to build these models. The book is a new edition of Bayesian Networks and Decision Graphs by Finn V. Jensen. The new edition is structured into two parts. The first part focuses on probabilistic graphical models. Compared with the previous book, the new edition also includes a thorough description of recent extensions to the Bayesian network modeling language, advances in exact and approximate belief updating algorithms, and methods for learning both the structure and the parameters of a Bayesian network. The second part deals with decision graphs, and in addition to the frameworks described in the previous edition, it also introduces Markov decision processes and partially ordered decision problems. The authors also provide a well-founded practical introduction to Bayesian networks, object-oriented Bayesian networks, decision trees, influence diagrams (and variants hereof), and Markov decision processes. give practical advice on the construction of Bayesian networks, decision trees, and influence diagrams from domain knowledge. give several examples and exercises exploiting computer systems for dealing with Bayesian networks and decision graphs. present a thorough introduction to state-of-the-art solution and analysis algorithms. The book is intended as a textbook, but it can also be used for self-study and as a reference book. <s> BIB006 </s> Context-Awareness for Mobile Sensing: A Survey and Future Directions <s> E. Context Inference <s> Clustering is traditionally viewed as an unsupervised method for data analysis. However, in some cases information about the problem domain is available in addition to the data instances themselves. In this paper, we demonstrate how the popular k-means clustering algorithm can be protably modied to make use of this information. In experiments with articial constraints on six data sets, we observe improvements in clustering accuracy. We also apply this method to the real-world problem of automatically detecting road lanes from GPS data and observe dramatic increases in performance. <s> BIB007 </s> Context-Awareness for Mobile Sensing: A Survey and Future Directions <s> E. Context Inference <s> The technology for building knowledge-based systems by inductive inference from examples has been demonstrated successfully in several practical applications. This paper summarizes an approach to synthesizing decision trees that has been used in a variety of systems, and it describes one such system, ID3, in detail. Results from recent studies show ways in which the methodology can be modified to deal with information that is noisy and/or incomplete. A reported shortcoming of the basic algorithm is discussed and two means of overcoming it are compared. The paper concludes with illustrations of current research directions. <s> BIB008 </s> Context-Awareness for Mobile Sensing: A Survey and Future Directions <s> E. Context Inference <s> When large multivariate datasets are analyzed, it is often desirable to reduce their dimensionality. Principal component analysis is one technique for doing this. It replaces the p original variables by a smaller number, q, of derived variables, the principal components, which are linear combinations of the original variables. Often, it is possible to retain most of the variability in the original variables with q very much smaller than p. Despite its apparent simplicity, principal component analysis has a number of subtleties, and it has many uses and extensions. A number of choices associated with the technique are briefly discussed, namely, covariance or correlation, how many components, and different normalization constraints, as well as confusion with factor analysis. Various uses and extensions are outlined. ::: ::: ::: Keywords: ::: ::: dimension reduction; ::: factor analysis; ::: multivariate analysis; ::: variance maximization <s> BIB009 </s> Context-Awareness for Mobile Sensing: A Survey and Future Directions <s> E. Context Inference <s> More than twelve years have elapsed since the first public release of WEKA. In that time, the software has been rewritten entirely from scratch, evolved substantially and now accompanies a text on data mining [35]. These days, WEKA enjoys widespread acceptance in both academia and business, has an active community, and has been downloaded more than 1.4 million times since being placed on Source-Forge in April 2000. This paper provides an introduction to the WEKA workbench, reviews the history of the project, and, in light of the recent 3.6 stable release, briefly discusses what has been added since the last stable version (Weka 3.4) released in 2003. <s> BIB010 </s> Context-Awareness for Mobile Sensing: A Survey and Future Directions <s> E. Context Inference <s> The accuracy of k-nearest neighbor (kNN) classification depends significantly on the metric used to compute distances between different examples. In this paper, we show how to learn a Mahalanobis distance metric for kNN classification from labeled examples. The Mahalanobis metric can equivalently be viewed as a global linear transformation of the input space that precedes kNN classification using Euclidean distances. In our approach, the metric is trained with the goal that the k-nearest neighbors always belong to the same class while examples from different classes are separated by a large margin. As in support vector machines (SVMs), the margin criterion leads to a convex optimization based on the hinge loss. Unlike learning in SVMs, however, our approach requires no modification or extension for problems in multiway (as opposed to binary) classification. In our framework, the Mahalanobis distance metric is obtained as the solution to a semidefinite program. On several data sets of varying size and difficulty, we find that metrics trained in this way lead to significant improvements in kNN classification. Sometimes these results can be further improved by clustering the training examples and learning an individual metric within each cluster. We show how to learn and combine these local metrics in a globally integrated manner. <s> BIB011 </s> Context-Awareness for Mobile Sensing: A Survey and Future Directions <s> E. Context Inference <s> Sensor convergence on the mobile phone is spawning a broad base of new and interesting mobile applications. As applications grow in sophistication, raw sensor readings often require classification into more useful application-specific high-level data. For example, GPS readings can be classified as running, walking or biking. Unfortunately, traditional classifiers are not built for the challenges of mobile systems: energy, latency, and the dynamics of mobile. Kobe is a tool that aids mobile classifier development. With the help of a SQL-like programming interface, Kobe performs profiling and optimization of classifiers to achieve an optimal energy-latency-accuracy tradeoff. We show through experimentation on five real scenarios, classifiers on Kobe exhibit tight utilization of available resources. For comparable levels of accuracy traditional classifiers, which do not account for resources, suffer between 66% and 176% longer latencies and use between 31% and 330% more energy. From the experience of using Kobe to prototype two new applications, we observe that Kobe enables easier development of mobile sensing and classification apps. <s> BIB012
As one of the most important properties of context-aware middleware, context inference has drawn much interest in the research area. The middleware provides basic functionalities such as sensory data acquisition, processing and context recognition. The applied methodology may show differences in context modeling or reasoning. The context initially is called "lowlevel (i.e., atomic) context" since all required operations are carried out directly from data obtained by physical sensors. On the other hand, "high-level context" is obtained later through the combination of low-level and/or high-level contexts, which is called "composition". Some mobile classifier development tools such as "Kobe" BIB012 ,"WEKA" BIB010 , and former toolkits "The Context Toolkit" BIB005 can deal with low-level context acquisition from raw sensory. They infer high-level semantic outcomes while exhibiting efficient utilization of available resources, and achieving an optimal balance among energy, latency and accuracy tradeoffs. Fig. 5 shows the stages of context inference problem during the low-level process. Accordingly, sensory readings are collected by a sliding window with a specific time interval and an overlap value. The length of windowing is an important design merit. The shorter windowing cannot seize the context properly, whereas the wider windowing would create a latency in detections, and puts additional workload in computations. Thus, obtained data segments by optimal windowing would provide more relevant information for context classification. In addition, the overlap value is important as well to detect any change in the context. Preprocessing (e.g., context filtering or fusion) could be applied, if raw sensory data is too coarse-grained. It may also offer necessary modifications to correct deficiencies in the data due to the possible limitations on sensory operations (e.g., power concern). It is generally very challenging to analyze, build a classification model, and infer any context from raw sensory data since it may consist of a large number of variant attributes, irrelevant information and additive noise distortion. Therefore, feature extraction is applied to exploit hidden information in the sensory data set, and remove direct effect of additive noise distortion. It also enables separability in the context classification algorithm while extracting and analyzing the spatial characteristics of sensory data in each window and assisting in identification of different context classes. A feature vector, as a representation of statistical characteristics in the contextual data, is then constructed by using diverse signal processing primitives, ranging from time space-based features such as mean, standard deviation, correlation etc. to frequency spectrum-based features such as entropy, Fast Fourier Transform (FFT) coefficients, power density etc., and also to wavelet transforms. Table III summarizes the elements of a feature vector in time and frequency domains. Time-domain feature extraction is the most-popular one in many practical real-time applications since sensory samplings are already obtained in a time-series way. Whereas, the frequency-domain features such as FFT coefficients require much computational power to discriminate such feature like periodicity of signals. On the other hand, sensors such accelerometers generate random signals in their nature, therefore, using time-domain features could be successful up to some limit since it is assumed that signals are mostly deterministic in time-domain analysis to make such a differentiation. As a result, it would be better to apply stochastic analysis in these cases in order to describe a suitable feature space. The purpose of the elements being used in the construction of feature vectors is as follows: • Mean represents DC component of a signal. • Variance shows dynamics of a signal activity. For instance, a low dynamic activity, or a stationary signal, will have a low value of variance. • Standard Deviation basically shows the similar information like variance does. It also notifies how far signal samples are spread out from its mean value. • Energy or Root Mean Square (RMS) captures the intensity of a signal. • Correlation among signals helps distinguish a similar activity occurring through a single dimension or multiple dimensions. • Zero-Crossing Rate captures the cyclic pattern of a signal. It could be seen as an approximation of frequency. Thereby, it requires less computation in time domain rather than having frequency value in spectrum analysis. • Spectral Peak shows the dominant frequency of a signal activity. • Spectral Entropy allows to specify whether or not energy is evenly distributed through different frequencies. For stationary signals, the entropy increases; whereas, nondeterministic signals gives out less entropy by having peaky look in spectrum. • Interquartile Range is used where different signals have a similar mean value. It represents the dispersion of signal data except for taking the extreme values into account. • Mean Absolute Deviation gives the averaged dispersion of signal data with respect to its mean value. • Spectral Centroid is the balanced point of the spectral power distribution of signal. • Bandwidth is the range of frequencies that occupy signal spectrum. • Normalized Phase Deviation notifies the phase deviations of spectral frequency peaks, that are weighted by their magnitude. • Derivative clears DC offset of a signal, and shows intensity of variations in signal data. • Histogram captures the density of a signal. • Kurtosis gives the peakedness (width of peak) of the density of a signal. • Discrete Cosine Transform is similar to FFT that enables to have spectrum based analysis, but only using real numbers. • Autoregressive Coefficients are used for filters to estimate characteristics of a signal. • Wavelet Transform is essential to time vs. frequency analysis. It allows only changes in time extension in correspondence to frequency analysis. • Cepstral Coefficients gives information about the rate of change in different spectrum bands. The diverse characteristics of feature vectors enable to have training data classes (i.e., structural features) for classification algorithms. Thus, a training data class is employed by classifiers to build a classification model, which will allow an unknown feature vector to test for its membership to any class dependency. A confusion matrix can be used to measure the performance of a classifier. The process basically is to test one of classifiers to map a feature vector into a training contextual data class, called supervised classification. In this regard, various classification algorithms can be used as a classifier to implement a context recognition system. Techniques include, but are not limited to, Naive Bayesian approaches and Decision Trees, pattern recognition techniques such as k-Gaussian Mixture Model (k-GMM), k-means, k-Nearest Neighbors (k-NN) search, Support Vector Machines (SVMs), and Multi-layer Neural or Fuzzy Logic Networks. In addition, a statistical tool based classification such as Hidden Markov Models (HMMs) or AutoRegressive (AR) Models is also widely applied; and pattern recognition toolkits such as WEKA provides powerful solutions to the context clustering problem. Table IV classifies studies according to the applied classification methods. The followings are listed for widely-used classification algorithms, and for their roles in context-awareness: • Naive Bayesian approach BIB006 assumes that each feature is conditionally independent in a given class definition, and estimates inter-class-conditional probability. Therefore, a Naive Bayes classifier fuses individual classification results to improve classification accuracy and robustness. This method uses the probability information residing in a training data in order to find the maximum probability of given hypothesis using the Bayes rule. On the other hand, Decision Trees BIB008 partition the feature space according to a tree structure. These structures fit the purpose of induction, and they are fast to be built for context inference on mobile devices. • A multivariate-Gaussian (k-GMM) BIB004 is a maximum likelihood classifier based on mean vector and covariance matrix estimated from each class. Any feature vector (i.e. tested data set) can be drawn from this model to check for which data class encapsulates a given specific feature vector (i.e., training data set), clustering problem. This is also called density problem, in which each class represents a cluster that is assigned as a Gaussian model with its mean approximately in the middle of the cluster, and also with a standard deviation showing a measure of how far the cluster spreads out. • k-Nearest Neighbors (k-NN) search algorithm BIB011 assigns the nearest class set for the input feature vector by defining a dissimilarity function that measures the nearness between training data set and new data points in the feature vector. The dissimilarity function is generally defined by the squared Euclidean distance. However, the Euclidean distance does not consider how the data is spread out, and also may let the largest length scale between data points dominate the dissimilarity function. Therefore, the Mahalanobis distance is used where the covariance matrix rescales all length of scales to make them essentially equal. • Support Vector Machine (SVM)  differentiates two classes from each other by using linear discrimination. SVM denotes each class as a binary data by labeling them +1/ − 1. The objective is to create a hyperplane that sets a rigid margin among data classes to achieve an optimal linear distance separation. Unfortunately, SVM cannot deal with multi-class classification directly. The multi-class classification problem is usually solved by decomposition of the problem into several two-class problems. • Multi-layer Neural or Fuzzy Logic Networks BIB002 ,  create a multi-dimensional Gaussian memberships. They can also be decomposed into a number of one-dimensional Gaussian membership functions to correlate with the number of input feature data. Each class in a multidimensional feature space represents a member of the classification network. The output is obtained by checking for Gaussian memberships of each input according to majority vote in the network classifiers. • k-Means clustering algorithm BIB007 is associated with a specific case of Gaussian mixture models that stems from the limitation of covariance matrices such as them being equal, diagonal or small for each user state class. k-Means algorithm finds the members of each class from a given data, where the classes are represented by their centers, which also show updated/re-constructed mean values. • A statistical tool shows dependencies of states at discrete time that are influenced directly by a state/states at prior discrete times. Discrete time is used to specify periodic sensor readings. Therefore, Hidden Markov Model (HMM)  is a mostly applied statistical tool that models time-series with spatial and temporal variability. In such statistical classifiers, sensor readings (i.e., extracted user contexts through mobile device based sensors) are seen as inputs. These readings undergo a series of signal processing operations, and eventually end up with a classification algorithm in order to provide desirable inferences. A required classification algorithm differs in terms of explanation of extracted context through a specific sensor. Outcomes of the algorithm are represented in a matrix whose elements show probability weights for possible context selections. Classification algorithms produce observations (i.e., visible states) of HMM. Among observations, only one observation is expected to provide the most likely differentiation in the selection of final context inference. On the other hand, desirable context inferences are defined as hidden states of HMM since they are not directly observable but only reachable over visible states. Therefore, each observation has cross probabilities to point any context inference. These cross probabilities build an emission matrix that basically defines decision probabilities of picking context from available observations. • Auto-Regressive (AR) models BIB001 are used to show the correlation among various feature parameters for each context inference. AR models apply time series analysis in which a multi-dimensional vector is transformed into a number of coefficients to make the analysis much easier. By doing that, AR captures the evolution and interdependencies among time series. • The feature vector constructed by any classification algorithm requires much computation. There is also no necessity to compute such features that are irrelevant or redundant to infer the context by providing insignificant improvement in accuracy. Hence, it is desirable to reduce the complexity and dimension of the feature set by retaining the core probability distribution spanned through feature vector spaces. In such cases, the dimension of feature vector can be reduced by using Principal Component Analysis (PCA) BIB009 or Linear/Quadratic Discriminant Analysis (LDA/QDA)  , BIB003 . They help obtain sufficient statistics to model the context and allow lower computational complexity. Both methods seek for a projection vector that transforms the original features into a lower dimensional space by preserving the content of separability. Unlike the PCA, the LDA performs well in seeking a suitable projection for data discrimination by applying an effective separation in data transform into different classes. The output of classifiers sometimes cannot resolve consistent discrimination in a time sequence of adjacent context inferences. In this case, a basic smoothing technique takes a majority voting scheme with a sliding window of a specific history 