# Hybrid LSTM Model to Predict the Level of Air Pollution in Montenegro
## 3 Implementation Methodology
### Feature Engineering  
The CAQI value is based on the measurement of several air pollutants: \(PM_{2.5}\), \(PM_{10}\), \(NO_{2}\), \(O_{3}\), \(O_{2}\), and \(CO\). It provides a numerical value or color-coded scale that corresponds to the air quality level, i.e., very low, low, medium, high, and very high, as shown in Table 1.  
CAQI values are not available on the Montenegro EPA website; only the specific pollutant concentration values are provided, such as \(PM_{2.5}\), \(PM_{10}\), \(NO_{2}\), \(O_{3}\), \(SO_{2}\), and \(CO\)  
\begin{table}
\begin{tabular}{c c c c c c c c c} \hline
**CAQI Scale** & **Index** & \(PM_{2.5}\) **(1 h)** & \(PM_{2.5}\) **(24 h)** & \(PM_{10}\) **(1 h)** & \(PM_{10}\) **(24 h)** & \(NO_{2}\) & \(O_{3}\) & \(SO_{2}\) & \(CO\) \\ \hline Very low & 0-25 & 0–15 & 0–10 & 0–25 & 0–15 & 0–50 & 0–60 & 0–50 & 0–5000 \\ Low & 25–50 & 15–30 & 10–20 & 25–50 & 15–30 & 50–100 & 60–120 & 50–100 & 5000–7500 \\ Medium & 50–75 & 30–55 & 20–30 & 50–90 & 30–50 & 100–200 & 120–180 & 100–350 & 7500–10,000 \\ High & 75–100 & 55–110 & 30–60 & 90–180 & 50–100 & 200–400 & 180–240 & 350–500 & 10,000–20,000 \\ Very high & \(\gtrsim\)100 & \(>\)110 & \(>\)60 & \(>\)180 & \(>\)100 & \(>\)400 & \(>\)240 & \(>\)500 & \(>\)20,000 \\ \hline \end{tabular}
\end{table}
Table 1: CAQI scale representation. Concentrations of all pollutants are presented in \(\mathrm{\SIUnitSymbolMicro g}/\mathrm{\SIUnitSymbolMicro m}^{3}\).  
Figure 3: Air monitoring stations in Montenegro.  
Based on the preliminary statistical analysis, 4 pollutants were selected: \(PM_{2.5}\), \(PM_{10}\), \(NO_{2}\), and \(O_{3}\). The selected pollutants were considered to be equally harmful. Consequently, their weighted factors were set to 1. Due to the low statistical significance, \(SO_{2}\) and \(CO\) were excluded from further analysis.  
The CAQI values were calculated by applying Equation (14) to the 4 selected input parameters:  
\[CAQI=max\big{\{}I_{O_{3}},I_{PM_{2.5}},I_{PM_{10}},I_{NO_{2}}\big{\}}, \tag{14}\]  
where the pollutant concentration \((C_{i})\) is mapped to pollutant index \((I_{i})\) by applying the following equation:  
\[I_{i}=I_{low}+\frac{C_{i}-C_{low}}{C_{high}-C_{low}}(I_{high}-I_{low}), \tag{15}\]  
where \(i\) denotes the air pollutant. Values \(C_{low}\) and \(C_{high}\) denote the minimal and maximal 1-h concentration values of the CAQI category that corresponds to the concentration of the specific pollutant, while \(I_{low}\) and \(I_{high}\) denote the minimal and maximal air quality index values of the category shown in the second column of Table 1. The following calculations are used in our work: maximum mean hourly values for \(NO_{2}\), \(O_{3}\) (in \(\mathrm{\mu g/m^{3}}\)) and calculated daily mean value for \(PM_{10}\), \(PM_{2.5}\) (in \(\mathrm{\mu g/m^{3}}\)).  
In addition, based on the EPA recommendation, in order for the measurement to be considered valid, it is necessary that there are at least three measured values of the input parameters at the same time, and that among them there is at least one measured value for \(NO_{2}\), \(PM_{10}\), or \(O_{3}\), which we also took into account.  
As an example, based on the CAQI system provided by the Montenegro EPA website [4], if the concentration of \(PM_{10}\) is \(C_{PM_{10}}\)= 82.2 \(\mathrm{\mu g/m^{3}}\), it will fall within the concentration interval of 50 and 90 and the index interval of 50 and 75, corresponding to a moderate pollutant level. The index value \(I_{PM_{10}}\) is then calculated based on Equation (15) as follows:  
\[I_{PM_{10}}=50+\frac{82.2-50}{90-50}(75-50)=70.125, \tag{16}\]  
It is important to note that, while one pollutant may have the highest concentration value, another pollutant could be dominant, meaning it has the highest index value. This ambiguity comes from different concentrations of certain input quantities that are considered dangerous.