# Space-Time Prediction of PM\({}_{2.5}\) Concentrations in Santiago de Chile Using LSTM Networks
## 5 Experiments  
In this section, we present two experiments used to validate the proposed models and analyze the results of the space-time predictions for Santiago. First, a short-term prediction is proposed, one hour in the future (Section 5.1). This was expected to be the most reliable prediction due to the short time in the future to be predicted. In addition, a medium-term prediction was performed, 24 h into the future (Section 5.2). In this case, the predictions from (t+1) to (t+24) were done simultaneously considering the data recorded in the previous 24 h (from (t-23) to (t)). The reason for this experiment was to test how the network behaves over a longer horizon, in addition to analyzing its behavior when it has multiple outputs. Indeed, the prediction of a 24 h period did not produce the best prediction for any particular hour. On the other hand, we also considered different areas within Santiago as input for the neural network. We first studied the set of seven nearby stations: Cerrillos, Cerro Navia, El Bosque, Independencia, La Florida, Parque O'Higgins and Pudahuel. We then studied all eleven stations available in the database. The reason for this differentiation is that we observed that there are stations very far from others, such as Talagante (see Figure 3). Normally, very distant stations contain contamination values that are poorly correlated with the others due to their particular conditions (sources of emissions or meteorological factors). Since the predictions in a given location are based on input variables which are collected in different spatial points, the space-time prediction quality could be affected by farthest stations. Hence, we removed the four furthest stations: Las Condes, Quilicura, Puente Alto and Talagante.  
Regarding the design of experiments, in addition to the indicated training and testing sets, we proceeded to divide the testing set: 30% for validation and the rest for testing. In relation to the compared models, we tested five models: a multivariable linear regression  
Figure 5: Evolution of loss function during training of LSTM-4 neural network model for one-hour-ahead PM\({}_{2.5}\) prediction of station Cerro Navia using the 6 closest stations as input.  
(LR), a feed forward neural network (FFN), an LSTM neural network (LSTM), a multilayer gated recurrent units (GRU) neural network and a multilayer LSTM neural network. This last network is identified by LSTM-X, where \(X\) is the number of stacked LSTM layers. The validation of the results was carried out considering the following standard metrics: the coefficient of determination (\(R^{2}\)), the square root of the squared error (RMSE) and the median absolute error (MAE). A demo source code with the tested models is made available to the community ([[https://github.com/sagagk/ExperimentosPM25](https://github.com/sagagk/ExperimentosPM25)]([https://github.com/sagagk/ExperimentosPM25](https://github.com/sagagk/ExperimentosPM25)), accessed on 1 January 2020).  
Finally, regarding the configurations of the stacked LSTM neural network, in the prediction experiments at 1 and 24 h, the LSTM-4, detailed in Section 4.4.2, was used. Regarding the GRU model, the same number of layers and dropout operators given in the stacked LSTM configurations where the LSTM layer was replaced by a GRU were used. The LSTM model had the configuration of the first layer of the LST3 and LSTM-4 model, having 200 neurons without dropout. The FFN model was multilayered and consisted of 512 and 64 neurons. This setup was based on a greedy search using a validation set with \(\{64,128,256,512\}\) neurons in each layer. On the other hand, the LR model did not require configuration, since it corresponds to a linear combination of the input variables. This section is divided into two subsections which detail the short-term forecast (1 h in the future) and medium-term forecast (24 h ahead), each considering both seven and eleven stations.