**2.1. Passive Sampling of NO2**

The most frequent method in monitoring studies for passive sampling of NO2 is using diffusion tubes described by Atkins [17]. This method for NO2 measurement is reliable, easy to handle, and it is an inexpensive method for screening air quality. Moreover, passive samplers are preferably appropriate for extensive spatial measurement of NO2, and they have been reported in many studies of NO2 monitoring of air in many countries like the United Kingdom, USA, France, Turkey, Argentina, and China [18].

Basically, passive samplers are designed on the principle of air diffusion having an efficient absorber at one end of the tube, and the flow rate (sampling rate) at constant temperature can be measured by using Flick's Law [19]. For that, the length and diameter of diffusion tubes are known, whereas sampling by using diffusion tubes is independent of air pressure.

#### **2.2. Neural network design**

From different sampling sites covering the whole study area, data was collected for neural network analysis. Collected data was fed to the neural network that has area\_id, season\_id, temperature, humidity, rainfall, and the respective concentrations as columns. For the neural network, the marked value was set to predict concentrations and rests were used as input to the neural network.

Neural network has two phases: training and testing. In the first phase (training), the network is trained by providing the complete information about the characteristics of data and observable outcomes to perform a particular task.

A neural network can develop a model that learns the relationship between input data and the desired outcome in the training phase. In the testing phase, testing data are provided as input. The performance of the testing phase depends upon the training phase (it depends on the number of samples that are provided during the training phase and also on the number of times that the network is accurately trained. However, it is impossible that the output is 100% precise for any network input. MS Access was used as the database engine because it is easy to use for all.

For testing the neural network, the cross validation method is used by using holdout method in which data was divided into testing and training data. The database consisted of two tables: training\_ data and testing\_data. The function of training\_data is to train the ANN by adjusting weights in order to maximize the predictive ability of ANN and minimize error during forecasting. Testing data was used to test the prediction accuracy of ANN on new data. The structure of training data and testing data is given in Table 1.

In Table 1, the first key "id" is primary key, which contains the number that indicates row number and the second key "loc\_id" contains the number that indicates location from where data is gathered, loc\_name indicates the name of location and the next six fields indicate position of location with respect to north and east. The next two indicate temperature and humidity levels.

The 13th and 14th fields indicate concentration of NO2 and level of concentration value. The last field of dataset contains week number, which indicates the number of weeks in which data is gathered from particular location. The attribute for testing data are the same in the testing data structure.


**Table 1.** Structure of training data

For designing a network, we need to specify the architecture of a neural network by designing a number of hidden layers and units in each layer along properties of network that describe error function and network activation.

For optimal generalization of collected data, two types of architectures: the rtNEAT (real-time neuro evolution of augmented topologies) architecture with evolution algorithm and the feed forward architecture with back propagation algorithm of ANN are used in order to ensure high accuracy of ANN prediction about impacts of NO2 concentration achieved in future. This rtNEAT architecture is used to train neural network with evolutionary algorithm, which has three steps, i.e., selection, mutation, and reinsertion. But before the training of neural network, the topology has to be created in the design of the neural network. A neural network is a connection of neurons, which contains three types of nodes: input, output, and hidden node. All nodes are randomly created during its execution.

Table 2 describes the properties of network, which contains an error function and network activation parameters. These properties are functional to all tested networks by the architecture search method and manually selected network.


**Table 2.** Network properties

position of location with respect to north and east. The next two indicate temperature and

The 13th and 14th fields indicate concentration of NO2 and level of concentration value. The last field of dataset contains week number, which indicates the number of weeks in which data is gathered from particular location. The attribute for testing data are the same in the testing data

**Field Name Data type Primary key Field size** Id Number Yes Long Integer loc\_id Number Long Integer

map\_id Number Long Integer north\_d Number Long Integer north\_m Number Long Integer north\_s Number Long Integer east\_d Number Long Integer east\_m Number Long Integer east-s Number Long Integer

loc\_name Text 50

Temp Text 50 Humidity Text 50

Concentration Number Long Integer con\_level Number Long Integer Week Number Long Integer

For designing a network, we need to specify the architecture of a neural network by designing a number of hidden layers and units in each layer along properties of network that describe

For optimal generalization of collected data, two types of architectures: the rtNEAT (real-time neuro evolution of augmented topologies) architecture with evolution algorithm and the feed forward architecture with back propagation algorithm of ANN are used in order to ensure high accuracy of ANN prediction about impacts of NO2 concentration achieved in future. This rtNEAT architecture is used to train neural network with evolutionary algorithm, which has three steps, i.e., selection, mutation, and reinsertion. But before the training of neural network, the topology has to be created in the design of the neural network. A neural network is a connection of neurons, which contains three types of nodes: input, output, and hidden node.

humidity levels.

92 Current Air Quality Issues

**Table 1.** Structure of training data

error function and network activation.

All nodes are randomly created during its execution.

structure.

The logistics function has a sigmoid curve and sum of squares. The sum of squares is the most frequent function error, which is used for the classification problem. The error is the sum of the square differences between the real input value and neural network target value.

#### **2.3. Architecture search**

A heuristic search is used to search the dataset for the best networks. Heuristic methods are used to speed up the process of finding a satisfactory solution. The architecture search for the designed neural network NO2 is given in Table 3.


**Table 3.** Heuristic architecture search for NO2

#### **2.4. Training of neural network**

The next step is to train the neural network for the NO2 dataset by using the propagation algorithm. Weight change is calculated by the quick propagation algorithm by utilizing the quadratic function *f*(*x*) = *x*<sup>2</sup> . In neural networks, several layers contain neurons in each layer that are connected with each other like neurons in the input layer connected to one or more neurons of the hidden layer, which are further connected to the output layer's neuron. With each presentation in neural network, error is computed as the difference between network output and observable output. The combination of randomly assigned weight (giving low error) replaces weights that are at the first location. This is called training to adjust the connection weights to enable the network to produce the expected output. Two different weights having two different error values are two points of a secant. Relating this secant to a quadratic function, it is possible to calculate its minimum *f*'(*x*) = 0. The x-coordinate of the minimum point is the new weight value.

$$\begin{aligned} S(t) &= \frac{\partial E}{\mathbb{R}w\_i(t)}\\ \Delta w\_i(t) &= \alpha \cdot \frac{\partial E}{\partial w\_i(t)} \text{(Normal back propagation)}\\ \frac{\Delta w\_i(t)}{\alpha} &= \frac{\partial E}{\partial w\_i(t)}\\ S(t) &= \frac{\partial E}{\partial w\_i(t)} = \frac{\Delta w\_i(t)}{\alpha}\\ \Delta w\_i(t) &= \frac{S(t)}{S(t-1) - S(t)} \cdot \Delta w\_i(t-1) \text{(Quick propagation)} \end{aligned}$$

Here *w* =weight, *i* =neuron, *E* =error function, *t* =time (training step), α= learning rate, and µ= maximal weight change factor

The quick propagation coefficient was set to 1.75, learning rate was 0.1, and iterations were 500. The training graph for dataset errors for NO2 is shown in Figure 3.

**Figure 3.** Dataset errors for the NO2 dataset

The training graph of correlation for NO2 is shown in Figure 4.

**Figure 4.** Graph of correlation for NO2

neurons of the hidden layer, which are further connected to the output layer's neuron. With each presentation in neural network, error is computed as the difference between network output and observable output. The combination of randomly assigned weight (giving low error) replaces weights that are at the first location. This is called training to adjust the connection weights to enable the network to produce the expected output. Two different weights having two different error values are two points of a secant. Relating this secant to a quadratic function, it is possible to calculate its minimum *f*'(*x*) = 0. The x-coordinate of the

Normal back propagat

( <sup>p</sup> ) ( ) ( 1)( ) ( 1)

Here *w* =weight, *i* =neuron, *E* =error function, *t* =time (training step), α= learning rate, and µ=

The quick propagation coefficient was set to 1.75, learning rate was 0.1, and iterations were

Quick

( opagation )

r

ion)

minimum point is the new weight value.

94 Current Air Quality Issues

( ) ( )

¡

¶ D =×

¶ <sup>=</sup>

*<sup>E</sup> S t*

( )

<sup>D</sup> ¶ <sup>=</sup> ¶

*w t E*

*i*

*i*

a

maximal weight change factor

**Figure 3.** Dataset errors for the NO2 dataset

() ( ( )

¶

*i*

a

*w t <sup>E</sup> w t*

( ) ( ) ( )

*<sup>E</sup> w t S t w t*

¶ <sup>D</sup> = = ¶

*i*

( )

*i i*

D = ×D - - -

500. The training graph for dataset errors for NO2 is shown in Figure 3.

The training graph of correlation for NO2 is shown in Figure 4.

*S t w t w t St St*

*i*

a

*i*

*w t*

*i*

*w t*

The graph of error improvement – network errors for NO2 is shown in Figure 5.

**Figure 5.** Network errors for NO2

The error distribution of network statistics obtained after training of neural network is shown in (Figure 6).

**Figure 6.** Error distribution for NO2
