# Learning Optimal Time Series Combination and Pre-Processing by Smart Joins
## 5 Experimental Results
### Results on Real Industrial Datasets  
With respect to the real dataset, all features had a common sampling distribution after the joining as per Figure 11. In this case, the common sampling distribution was represented by having the same colour by row for all the features (represented by columns). Furthermore, as the selected temporal reference system (\(t_{D}\)) had a constant sampling interval, the figure results in constant colour (four data points for each feature each hour). \begin{table}
\begin{tabular}{c c c c c c} \hline \hline \(t\) Range & Backward Join & Forward Join & Left Join & Nearest Join & Theoretical \\ \hline
0–2 & **0.00**\(\times\) 10\({}^{0}\) & **0.00**\(\times\) 10\({}^{0}\) & **0.00**\(\times\) 10\({}^{0}\) & **0.00**\(\times\) 10\({}^{0}\) & all  
In Figure 12 the original time series (\(y\)) and the one obtained from the joining methodology (\(\hat{y}\)) are shown for making a visual comparison. Both time series (\(y\) and \(\hat{y}\)) had similar appearance until 16:00 where the feature became unstable. Due to the selected time sampling and the joins considered for finding the optimum being the ones operated by SQL database engines, only a data point near the needed sampling was selected. Figure 13 shows the alignment distortion for the feature with id 14. Negative values in this misalignment imply that anticipated time data were used in the join, whereas positive values imply  
Figure 11: Result after the use of smart join. After the joining, all features have a common sampling distribution. Figure 12: Comparison between original time series and after the use of smart join for the feature with id 14.  
delayed time. The difference in the alignment could imply delays in prediction if anticipated data were used in the join or did not really have updated information of the process in order to make an adequate decision. In this particular case as the original time sampling initially writes nearly each 20 min and the desired time sampling is every 15 min, delays or anticipations of nearly 8 min become common. In the last part of the original time series, as data were available every minute or two, the delays or anticipations are drastically reduced for the joined time series. Figure 14 shows used and unused points from the original time series in the join time series. Depending on the application the lost information could have a great impact. For time later that 16:00, as the selected time sampling (\(t_{D}\)) is slower than the dynamic of the original time series, a lot of data points are unused in the joining process, losing the information provided by those data points showed in blue in the figure. In some cases, different aggregation methods or rolling windows could be more adequate to use the data that otherwise will be lost. Figure 14: Data used and not used from \(y\) to generate \(\hat{y}\). Figure 13: Alignment distortion for feature 14 between \(y\) and \(\hat{y}\). Negative values in this misalignment imply that anticipated time data has been used in the join, whereas positive values imply delayed time. The difference in the alignment could imply delays in prediction if anticipated data was used in the join or did not really have updated information of the process in order to make an adequate decision. The difference between the original time series and the joined one can help optimize the time sampling for a specific application. At the top of Figure 15 both the time series used for error calculation in part of \(Diff(y,\hat{y})\) (\(\hat{y}_{interp}\) and \(y_{interp}\), i.e., generated by linear interpolation of time series \(y\) and \(\hat{y}\) in order to have common data sampling distribution (\(t_{O}\bigcup t_{D}\))) are shown, while the lower diagram shows the absolute error value calculated at each point.