# DeepST-Net: Leveraging Spatiotemporal Data Refinement for Enhanced Travel Time Prediction
## 3 Background  
Travel time prediction relies on past experiences stored in datasets. Each experience corresponds to a trip that begins at a specific time and ends after a certain duration. In the following, we formally introduce the concepts used in this research:  
**Geographic Point**  
A geographic point is represented by GPS coordinates as a pair \(\langle lat,long\rangle\), where \(lat\) and \(long\) represent the point's latitude and longitude. For example, the geographic coordinates for Central Park in NYC and Brooklyn Bridge are, respectively, represented as \(g_{1}=\langle 40.7825593,-73.9861829\rangle\) and \(g_{2}=\langle 40.7058174,-74.0011234\rangle\). **Trip**  
Let \(\mathcal{G}\) be the set of all the possible geographic points. A trip \(tr\) is a tuple \((src,dest,t)\), where \(src,dest\in\mathcal{G}\) represent the source and destination of the trip, and \(t\in\mathbb{R}^{+}\) is the timestamp that indicates the starting time of the trip. For instance, consider a trip \(tr_{1}\) from \(g_{1}\) to \(g_{2}\) starting at 8:38. This trip is denoted as \(tr_{1}=\langle g_{1},g_{2},8\rangle\). **Experience**  
Let \(\mathcal{TR}\) be the set of all the possible trips. An experience of a trip \(tr\in\mathcal{TR}\) is a pair \(\langle tr,\Delta\rangle\), where \(\Delta\in\mathbb{R}^{+}\) is the trip duration in seconds. In the given example, \(exp_{1}=\langle tr_{1},790\rangle\) represents an experience of the trip \(tr_{1}\) with a duration of 790 s.  
**Dataset**  
Let \(\mathcal{EX}\) be the set of all possible past experiences. A dataset of past experiences \(D\) is a subset of \(2^{\mathcal{EX}}\). A dataset consists of trips represented by geographical points indicating the source and destination, along with their corresponding durations. Travel time prediction involves a sequential workflow, as illustrated in Figure 1. This workflow is divided into three primary processes as follows: preprocessing, learning, and integration. The _preprocessing phase_ ensures data quality and integrity through various preprocessing steps, preparing the data for subsequent phases. Formally, let \(\mathcal{D}\) be the set of all  
Figure 1: Overview of the proposed framework. possible datasets and \(\mathcal{C}\) be the set of all possible configurations that can be applied to refine a dataset. The mapping \(refine:\mathcal{D}\times\mathcal{C}\rightarrow\mathcal{D}\) produces a refined dataset from an original dataset. For instance, \(D_{ref}=refine(D_{raw},\mathcal{C})\) yields a refined dataset \(D_{ref}\) from \(D_{raw}\) by applying a set of refinement configurations \(\mathcal{C}\) (Section 4.1 describes in detail the proposed methodology for data refinement). In the _learning phase_, a predictive model is trained to learn the underlying traffic patterns from a part of the refined data (\(D_{t}\)). Following the training phase, the model is evaluated using a separate test dataset (\(D_{e}\)), which it has not encountered before. This crucial step enables the comprehensive assessment of the models' performance and its generalization ability to unseen data. A model \(M\) is initialized by a set of hyper-parameters \(HP\). Let \(\mathcal{M}\) and \(\mathcal{HP}\) be, respectively, the sets of all the possible models and hyper-parameters. Let \(2^{\mathcal{EV}}\) be the set of all the possible metric evaluations, each one of the form \(\langle m,v\rangle\), where \(m\) represents a metric (e.g., MAE, MAPE, or RMSE) and \(v\in\mathbb{R}^{+}\) is its value. To obtain the best-trained model, we define the successive mappings as follows:  
* \(split:\mathcal{D}\rightarrow\mathcal{D}\times\mathcal{D}\), which consists of splitting a dataset into 2 complementary sub-datasets, training dataset \(D_{t}\) and evaluation dataset \(D_{e}\), such that \((D_{t},D_{e})=split(D)\mid D=D_{t}\cup D_{e}\). Usually, the proportion of the split is 80% for the training dataset, 10% for the validation dataset, and 10% for the evaluation dataset.