# Hybrid LSTM Model to Predict the Level of Air Pollution in Montenegro
## 4 Results and Discussion
### Statistical Analysis
\begin{table}
\begin{tabular}{c c c c c c} \hline \hline
**Dataset** & **Model** & **Minimum** & **Maximum** & **Mean** & **Std. Deviation** \\ \hline \multirow{3}{*}{MAE training set} & LSTM & 4.909 & 48.593 & 8.861 & 8.2130 \\  & Best LSTM without bagging & 4.751 & 47.253 & 7.186 & 6.599 \\  & Ensemble model & 4.665 & 47.614 & 7.112 & 6.578 \\ \hline \multirow{3}{*}{MAE testing set} & LSTM & 4.695 & 47.434 & 8.921 & 8.484 \\  & Best LSTM without bagging & 4.410 & 45.694 & 7.049 & 6.636 \\ \cline{1-1}  & Ensemble model & 4.274 & 45.639 & 6.953 & 6.610 \\ \hline \hline \end{tabular}
\end{table} 
Table 8: Summary statistics for the calculated MAE values obtained from training and testing of the LSTM model, the best LSTM model without bagging, and the ensemble model. \begin{table}
\begin{tabular}{c c c c c} \hline \hline
**Dataset** & **Model** & **W** & \(p\)**-Value** & \(\alpha\) \\ \hline \multirow{3}{*}{MAE training set} & LSTM & 0.540 & \textless{}0.0001 & 0.05 \\  & Best LSTM without bagging & 0.400 & \textless{}0.0001 & 0.05 \\  & Ensemble model & 0.404 & \textless{}0.0001 & 0.05 \\ \hline \multirow{3}{*}{MAE testing set} & LSTM & 0.547 & \textless{}0.0001 & 0.05 \\  & Best LSTM without bagging & 0.409 & \textless{}0.0001 & 0.05 \\ \cline{1-1}  & Ensemble model & 0.412 & \textless{}0.0001 & 0.05 \\ \hline \hline \end{tabular}
\end{table} 
Table 9: Shapiro–Wilk test for the calculated MAE values obtained from training and testing of the LSTM model, the best LSTM model without bagging, and the ensemble model. To determine which models resulted in the rejection of the null hypothesis, it was essential to conduct multiple pairwise comparison procedures. In this research, we employed the two-tailed Steel-Dwass-Critchlow-Fligner test [28] on the calculated MAE values obtained from the training and testing of the three models. Based on the rank values for the models according to the calculated MAE values obtained from training and testing, as displayed in Table 10, the models were categorized into three distinct groups. It is not necessarily the group with the smallest mean of ranks that caused the rejection of the null hypothesis. Figure 13: Probability plot. (**a**) Calculated MAE values obtained from training of the LSTM model. (**b**) Calculated MAE values obtained from testing of the LSTM model. (**c**) Calculated MAE values obtained from training of the best LSTM model without bagging. (**d**) Calculated MAE values obtained from testing of the best LSTM model without bagging. (**e**) Calculated MAE values obtained from training of the ensemble model. (**f**) Calculated MAE values obtained from testing of the ensemble model. null hypothesis. Since \(p\)-values are lower than 0.0001 (the significance level is 0.05), we can conclude that all three models are responsible for rejecting the null hypothesis. The groups in the last column indicate that all three algorithms are classified according to their performance into separate units and, if they are compared in pairs, no two algorithms are similar. The first group consisted of the ensemble model exhibiting similar performance, the best LSTM model without bagging was placed in the second group, and the LSTM model was placed in the third. Finally, the Kolmogorov-Smirnov test was conducted to compare the distribution between the LSTM without bagging and the ensemble model. The null hypothesis assumed that both models had the same distribution. The significance level for this test was set at \(\alpha=0.05\). For the calculated MAE values obtained from the training of the models, the resulting \(D\)-value statistic was 0.250 and the \(p\)-value was less than 0.0001, leading to the rejection of the null hypothesis with a risk lower than 0.01%. For the calculated MAE values obtained from the testing of the models, the resulting \(D\)-value statistic was 0.153 and the \(p\)-value was 0.001, leading to the rejection of the null hypothesis with a risk lower than 0.15%.