# Characterization of Surface Ozone Behavior at Different Regimes
## 2 Materials and Methods
### Statistical Model  
In this study, threshold models with ANNs were defined with GAs, aiming to evaluate the effect of environmental and meteorological variables in O\({}_{3}\) concentrations. The applied model is defined as the following:  
\[y=\left\{ \begin{array}{l}\mathrm{net}_{1}(x_{i}),\ \mathrm{if}\ x_{d}\leq r\\ \mathrm{net}_{2}(x_{i}),\ \mathrm{if}\ x_{d}>r\end{array} \right. \tag{1}\]  
where \(y\) is the output variable, \(\mathrm{net}_{1}\) and \(\mathrm{net}_{2}\) are ANN models, \(x_{i}\) are the exploratory variables, \(x_{d}\) is the threshold variable, and \(r\) is the threshold value. Applied feedforward ANN models had three layers (input, hidden, and output) and considered eight input variables (hourly average data): NO concentration, NO\({}_{2}\) concentration (due to the chemical reactions R1 and R3), the ratio NO\({}_{2}\)/NO (due to the equilibrium constant of the chemical reaction R3), \(T\), \(RH\), \(1/RH\) (as \(RH\) usually shows a negative effect on O\({}_{3}\) levels), \(WS\), and \(1/WS\) (the same as the \(RH\) effect). The output variable was the hourly average O\({}_{3}\) concentrations measured at the same time of the input data to infer the direct influence of these variables on O\({}_{3}\) chemistry. Regarding the activation functions, the linear function was considered for the output neuron and four functions were selected by GAs: sigmoid, hyperbolic tangent, inverse, and radial basis. The data were divided in training (75%) and validation (25%) sets and the early stopping method (ANN training procedure is stopped when an increase in validation error is observed) was applied to avoid overfitting. The division of the data was performed by time: 75% for training (January 2012 to 25 May 2013); 25% for validation (25 May 2013 to 19 December 2013). In the training set, O\({}_{3}\) concentrations ranged from 0 to 161 \(\mathrm{\SIUnitSymbolMicro g\cdot m^{-3}}\), while O\({}_{3}\) concentrations ranged from 0 to 170 \(\mathrm{\SIUnitSymbolMicro g\cdot m^{-3}}\) in the validation set. GAs are a search and optimization technique based on [PERSON] principles of evolution and natural genetics [30; 31]. This procedure begins with a set of individuals (population) that is randomly generated. Each individual (also called chromosome) is a binary code string and contains information about a set of parameters, which is a potential solution to a given problem. To evaluate the quality of the proposed solution (to rank the individuals in the population), a fitness function should be defined. To create new chromosomes for the next generation, the fittest chromosomes are submitted to the genetic operations [30]: (i) selection; (ii) crossover; (iii) mutation. These new chromosomes are then evaluated according to the fitness function, and the ones with the highest performance were selected. The repetition of this procedure generates a sequence of populations containing better solutions. The termination criteria can be (i) to stop after a previously defined maximum number of generations is achieved, or (ii) to stop when a desired fitness value is achieved. In this study, GAs were used to define the threshold variable and value, the number of hidden neurons, and the activation function in the  
Figure 1: Monitoring site of _Sobreiras—Lordelo do Ouro_ (from [[http://qualar.apambiente.pt/](http://qualar.apambiente.pt/)]([http://qualar.apambiente.pt/](http://qualar.apambiente.pt/))). hidden layer, and to select the explanatory variables to be used in each ANN model.