# Trajectory Clustering and k-NN for Robust Privacy Preserving Spatiotemporal Databases
## 2 Materials and Methods
### System Model
Finally, our aim was to extend this work for large-scale trajectory data and transfer the whole processing in a distributed computing environment based on Hadoop. Apache Spark is the most promising environment with high performance in parallel computing, designed to efficiently deal with supervised machine learning algorithms, e.g., \(k\)-NN [26]. Deep Learning, which is part of a broader family of machine learning methods, gains more and more attention due to the rising volume of data. Thus, deep learning platforms have been designed for mining values in big data [27]. A future direction is to design above methods and experiments in big data environments [28; 29; 30; 31] and investigate their scalability and running time performance under different datasets and parameters \(k\), K combinations. ## 4 Results

### Experiments Results

In this section, the results of the experiments conducted are presented in Figures 4-9. We relied on real data to evaluate the performance in terms of the vulnerability of MWCL (Method-Without-CLustering, Algorithm 3) and MCL (Method-with-CLustering, Algorithm 4). We experimented on two different datasets with size \(N=\{400,2000\}\), respectively. The parameters of two experiments and the relevant values are presented in Tables 3 and 4, respectively. Parameter \(cs\) refers to the number of clusters and \(k\) to the number of nearest neighbors in terms of Euclidean distance. Concerning the MCL (Method-with-CLustering, Algorithm 4), we considered the attribute combination shown in both tables. For a fair comparison, in MWCL (Method-Without-CLustering Algorithm 3), the \(k\)-NN was applied to the same attribute combination. Figure 4: Both clustering and \(k\)-NN: (**a**) \(x\) and (**b**) (\(x\),\(y\)) for \(N=400\) trajectories, \(L=100\) time-stamps and \(k=5\). Figure 5: Both clustering and \(k\)-NN: (**a**) (\(x\),\(y\),\(g\)) and (**b**) (\(x\),\(y\),\(g\),\(z\)) for \(N=400\) trajectories, \(L=100\) time-stamps and \(k=5\). Figure 6: Both clustering and \(k\)-NN: (**a**) \(x\) and (**b**) (\(x\),\(y\)) for \(N=2000\) trajectories and \(L=100\) time-stamps. \[T^{j}=\{(x_{1}^{j},y_{1}^{j},t_{1}^{j}),(x_{2}^{j},y_{2}^{j},t_{2}^{j}),\ldots, (x_{L}^{j},y_{L}^{j},t_{L}^{j})\}.\]0 Clustering (\(x\),\(y\),\(g\),\(v\)) and \(k\)-NN \(x\) for \(N=400\) trajectories, \(L=100\) time-stamps for (**a**) \(k=5\) and (**b**) \(k=15\). \[T^{j}=\{(x_{1}^{j},y_{1}^{j},t_{1}^{j}),(x_{2}^{j},y_{2}^{j},t_{2}^{j}),\ldots, (x_{L}^{j},y_{L}^{j},t_{L}^{j})\}.\]1 Clustering with (\(x\),\(y\),\(g\),\(v\)) and \(k\)-NN in \(x\). Figure (**a**) concerns \(k=15\) while (**b**) \(k=30\) for \(N=2000\) trajectories and \(L=100\) time-stamps. We investigated the \(k\)-anonymity gradually, by adding one new attribute each time. In the first four cases of both experiments and approaches (see Figures 4-7), we observed that the information of attribute \(x\) is not sufficient to make both methods robust enough in terms of nearest neighbors indexes change. More to the point, in the combination (\(x\),\(y\)), although vulnerability (see Algorithm 5) dropped significantly, the usage of attributes (\(g\),\(v\)) did not enhance it. In real datasets, many dimensions contain high levels of inter-attribute correlations. In this work, by definition, as described in Section 2.4, attributes (\(g\),\(v\)) and (\(x\),\(y\)) are correlated. This stems from the fact that the non-linear trajectories of the mobile users are approximated as linear ones between time-stamps. Specifically, velocity is computed as \(v_{x}=\frac{x_{n+1}-x_{n}}{t_{n+1}-t_{n}}\), \(v_{y}=\frac{y_{n+1}-y_{n}}{t_{n+1}-t_{n}}\) and \(v=\sqrt{v_{x}^{2}+v_{y}^{2}}\) while angle \(g=\tan^{-1}(\frac{y_{n+1}-y_{n}}{x_{n+1}-x_{n}})\). The curse of dimensionality has remained a challenge for a wide variety of algorithms in data mining, clustering, classification, and privacy, and seems to affect both methods performance in terms of vulnerability. The experimental results seem to suggest that the dimensionality curse is an obstacle to privacy preservation.