# Space-Time Prediction of PM\({}_{2.5}\) Concentrations in Santiago de Chile Using LSTM Networks
## 4 Pre-Processing of Data and Selection of Neural Model
### Training Net Selection  
For the selection of the architecture of the network, first we considered models for temporal prediction of PM\({}_{2.5}\), which is an easier task. The resulting model was used as a basis for the final space-time neural model. For the training network selection, a new dataset was generated based on Table 3.  
In this task, we considered 24 h for input and 1 h for output. Input variables are indicated by columns with expression \((t-n)\), where \(n\) takes values from 0 to 23, and output variables are indicated by expression \((t+n)\) in an analogous way. Note that each input series was concatenated with the 11 stations which are identified by the coordinates E (longitude) and N (latitude). To achieve a temporal forecast, we first (i) selected a station to forecast. In this case we eliminated all the columns of the output variables that do not correspond to the station we sought to predict. Then (ii) we modified the input variables of the station to be predicted by replacing them with \(-1\), with the exception of the coordinate of the station itself. Finally, (iii) the two previous steps (i and ii) were repeated for all the stations in all the data of Table 3. In this way it was expected that the neural network learned that the values to be predicted correspond to the locations that contain values of \(-1\). Relevantly, it should be noted that this step only considered the original training data, that is, from the year 2012, and that it was aimed at finding an initial network structure for our models; that is, the weights learned in the experiment were not used anymore in space-time. The reason for this step was the difficulties in finding a good initial structure in the space-time problem, which is why it was decided to first obtain a solution in a more relaxed problem, in this case only temporarily. An alternative is to eliminate a station in each test, which required a high computational cost, since the experiment had to be repeated for each station. However, we expected that the bias effect would be reduced, since it was only considered in the selection of the network structure. Subsequently, a new pre-processing stop will be carried out to adapt it to a spatio-temporal modeling. Table 4 presents a summary of the results of this procedure.  
\begin{table}
\begin{tabular}{c c c c c c c c c} \hline E & N & PM\({}_{2.5}\) & & PM\({}_{2.5}\) & E & PM\({}_{2.5}\) & PM\({}_{2.5}\) \\ (Es-01) & (Es-01) & **(Es-01)** & **...** & **(Es-01)** & **(Es-02)** & **...** & **(Es-01)** & **...** & **(Es-N)** \\  & & **(t-23)** & & **(t-0)** & & & **(t + 24)** & & **(t + 24)** \\ \hline A & B & 38.0 &... & 35.0 & C &... & 36.0 &... & 36.5 \\ A & B & 34.0 &... & 33.0 & C &... & 30.0 &... & 33.4 \\ A & B & 27.0 &... & 28.6 & C &... & 30.0 &... & 25.0 \\ \hline \end{tabular}
\end{table}
Table 3: Data structure expressed in time series.  
In Table 4 the new dataset is presented. The first row has the predicted values of PM\({}_{2.5}\) of station 01; therefore, its columns (Es-01) have values of \(-1\). For the second row, the values of predicted PM\({}_{2.5}\) for station 02, and again, its corresponding columns have values \(-1\).