# Predicting Human Location Using Correlated Movements
## 5 Detection of Persons with Correlated Movements
### Behavioral Similarity-Based Method
\begin{table}
\begin{tabular}{c c c c c c c c c c} \hline \hline  & & \multicolumn{3}{c}{**Day 1**} & \multicolumn{3}{c}{**Day 2**} \\ \hline
**Time slot** & 1 p.m. & 3 p.m. & 5 p.m. & 7 p.m. & 1 p.m. & 3 p.m. & 5 p.m. & 7 p.m. \\
**Person \(p\)** & math class & gym & restaurant B & tea house & laboratory D & gym & restaurant B & home \\
**Person \(q\)** & office A & cafe & restaurant C & piano class & office A & cafe & restaurant C & piano class \\
**Person \(u\)** & math class & market & park & home & laboratory D & cafeteria & library & concert hall \\ \hline \hline \end{tabular}
\end{table} 
Table 3: Behaviors of Persons \(p,q\), and \(u\). converted to indicator vectors. Then, these vectors are used as input units of the neural network including one hidden layer with 150 logistic sigmoid activation nodes. These input features propagate progressively throughout the network until reaching the softmax output layer, which obtains a conditional probability distribution over locations. \(\Theta\) is defined as the parameters of the NN consisting of weights, denoted by \(\mathbf{W}\), and biases that are randomly initialized. Let \(\eta\) denote the number of samples in the training dataset. After retrieving the conditional probability at the output layer, regularized cost function \(J(\Theta)\) using cross-entropy error [42] is calculated as follows:  
\[J(\Theta)=-\frac{1}{\eta}\sum_{j=1}^{\eta}{\mathbf{t}^{(j)}}^{\top}\log f_{\text{ BSB}}^{(j)}(x_{q,t}^{\text{loc}},x_{t}^{\text{day}},x_{t}^{\text{time}})+\Omega( \mathbf{W}) \tag{4}\]  
where \(f_{\text{BSB}}^{(j)}(x_{q,t}^{\text{day}},x_{t}^{\text{time}})\) and \(\mathbf{t}^{(j)}\) are the estimated output and target vectors of the \(j^{\text{th}}\) instance, respectively. Note that \(\log(. )\) is an element-wise operation. \(\Omega(\mathbf{W})\) is the \(L^{2}\)-based regularization term. The neural network model is trained to minimize cost function \(J(\Theta)\) using a back-propagation algorithm combined with a gradient descent method. In order to select \(r\) PCMs of person \(p\), \((m-1)\) NNs are trained separately, where each NN measures the similar behavior pattern between individuals \(p\) and \(q\) (\(p,q\in\mathbb{M},p\
eq q\)). The prediction accuracy, \(\xi_{p,q}\), of the \(q^{\text{th}}\) NN, which indicates the behavioral similarity of persons \(p\) and \(q\), is defined as the ratio of the number of correctly predicted instances to the number of test samples. In the BSB method, \(r\) PCMs among the \((m-1)\) remaining members with the highest \(\xi_{p,q}\) are selected. It is worthwhile to note that there are alternative ways of selecting a set of PCMs. For example, forward search (FS) [43] begins with an empty set and then progressively incorporates each feature (i.e., PCM) into the set. However, FS has an inherent weakness, i.e., high time and space complexity when a large number of features need to be selected. Another simple approach that can be considered is that positional information of all \((m-1)\) remaining people is used as input features for a prediction model that labels the location of a person at time \(t\) with one of the \(|\mathbb{L}|\) positions. In our work, this simple method is called ignored feature selection (IFS) since there is no feature selection process. Note that IFS may need to train a model with tens or hundreds of thousands of features, which may result in a long training time, and might suffer from the overfitting problem. In order to gain insight into computational costs, the number of training parameters for three methods including IFS, FS, and BSB is compared. For IFS, there is no PCM selection phase, i.e., the location of person \(p\) is predicted given the positional information of the \((m-1)\) other people. With FS, to choose the first PCM, \((m-1)\) NNs are trained independently.