# A Resilient Large-Scale Trajectory Index for Cloud-Based Moving Object Applications
## 3 Resilient Moving Object Index
### Prediction Models
#### 3.2.2 Training Sets  
One of the obstacles in our work is the absence of available training data. In response, we have generated our own training sets. Each training set should give the best \(LP\) for any possible configuration. To find the best \(LP\), we need to have the result for all the possible \(LP\) values. Therefore, we conducted substantial experimentation on two real datasets with all the different feature values on every \(LP\) to generate the training sets. We used the German Trajectory dataset (GT) [37] and the RioBuses dataset [38] described in Table 1. The GT dataset, extracted from Planet GPX of OpenStreetMap database [39], contains spatio-temporal moving object trajectories and covering Germany and parts of its neighboring countries. It contains trajectories for different moving object classes such as vehicles, humans, airplanes, and trains. The RioBuses dataset is generated by the public buses of the city of Rio de Janeiro, Brazil. The TOver for RioBuses is 0.102, which is high compared to the TOver of GT 0.009. The reason for choosing these two datasets is because of the contrast between them in the global space scope. Moreover, we cover most of the essential queries of space-based, time-based, and trajectory-based query types as we will discuss them further in Section 4. The complete list of selected query types is as follows. * Lookup Query: contains 20 random \(Tids\)
* Aggregation Query: uses trajectory length as the aggregation function which returns the longest trajectory
* Range Query: contains 100 random queries with 0.1%, 0.3%, 1%, 10%, and 30% spatial selectivity
* Interval Query: contains 100 random queries with 0.1%, 0.3%, 1%, 10%, and 30% temporal selectivity
* Small Selectivity k-Continuous Range Query: contains 50 random queries with 0.3% spatial selectivity on k = 2, 3, 4, 5, and 6
* Large Selectivity k-Continuous Range Query: contains 50 random queries with 10% spatial selectivity on k = 2, 3, 4, 5, and 6
* Small Selectivity k-Continuous Interval Query: contains 50 random queries with 1% temporal selectivity on k = 2, 3, 4, 5, and 6* Large Selectivity k-Continuous Interval Query: contains 50 random queries with 10% temporal selectivity on k = 2, 3, 4, 5, and 6
* Small Selectivity k-Continuous Spatio-Temporal Query: contains 50 random queries with 0.3% spatial selectivity and 1% temporal selectivity on k = 2, 3, 4, 5, and 6
* Large Selectivity k-Continuous Spatio-Temporal Query: contains 50 random queries with 10% spatial selectivity and 10% temporal selectivity on k = 2, 3, 4, 5, and 6. Moreover, the features are set to cover the maximum, medium, and minimum values. Therefore, we set ComR to 2, 4, and 8. Furthermore, we set MemR to 0.16, 0.31, and 0.62. The TOver scores, as we mentioned before, are 0.009 and 0.102 for GT and RioBuses, respectively. \(LP\) takes the values from 1 to 7, which represent 1, 2, 4, 8, 16, 32, and 64 for \(\beta\). The \(tpn\) for both datasets is 64 partitions. We only changed one value at a time, which leads to 126 different combinations. We use the same system settings detailed in Section 5.1. Next, we processed the raw results of 126 runs. They contained more than 66k result factors. The goal was to generate three training sets for the CPModel, DPModel, and IFModel. The first set was used to train the CPModel, which is used when there is no prior information about the queries and their frequencies. We analyzed the result for all the query types and selected the proper \(LP\) for each feature combination. The selected \(LP\) is expected to be reasonably suitable for all the query types even if it is not the absolute best choice for a particular query. We considered the running time as the primary performance indicator. The second training set was used to train the DPModel, where the queries and their frequencies are known. We selected the best and the second-best values of \(LP\) for each query type (10 query types) on every feature combination.