## 2 Methodology
### Revision of Rating Scores and Weights
#### 2.2.2 Modification of the Weights Based on the Data-Driven Method  
Many studies used the correlation between the hydrogeological parameter and nitrate concentration to determine weight [3; 12; 22; 25]. The mechanism of weighting based on correlation analysis and logistic regression is the following: if there is a stronger correlation between the parameter and nitrate concentration, the parameter will have a stronger weight. Thus, the correlation between the vulnerability indexes and nitrate concentration is enhanced and a more accurate result is obtained.  
The problem of optimization of the parameter weights can be formulated into a mathematical problem: the vulnerability index is a linear combination of parameters, and the weights are unknown coefficients between zero and five, as defined by the common DRASTIC model, which can be optimized to maximize the correlation coefficient. A weight of zero means that the parameter should be excluded. In this study, Pearson's \(\rho\) correlation coefficient was used to represent correlations and to optimize weights (other correlation coefficients are also suitable criteria). The application of [PERSON]'s \(\rho\) correlation assumes a normal distribution of the nitrate concentration, which is not satisfied based on the dataset of this study area. A logarithmic transformation of the nitrate concentration depicted by Equation (6) was used to satisfy this condition:  
\[C_{n}^{{}^{\prime}}=\log(1+C_{n}), \tag{6}\]  
where \(C_{n}\) and \(C_{n}^{{}^{\prime}}\) are the nitrate concentration and the value of the logarithmic transformation of the nitrate concentration, respectively, and n is the number of samples. The problem is expressed in mathematical terms as follows (in this case):  
Let \(C_{n}^{1}\), \(C_{n}^{2}\),..., and \(C_{n}^{k}\) be the values of the logarithmic transformation of the nitrate concentration of all k observations, denoted by \(C_{n}=\left[C_{n}^{1}\ C_{n}^{2}\ C_{n}^{3}\ \cdots\ C_{n}^{k}\right]^{\text{T}}\). The matrix A consists of all hydrogeological parameters at the corresponding sample locations:  
\[\text{A}=\begin{bmatrix}d_{1}&r_{1}&a_{1}&s_{1}&t_{1}&i_{1}&c_{1}&l_{1}\\ d_{2}&r_{2}&a_{2}&s_{2}&t_{2}&i_{2}&c_{2}&l_{2}\\ \vdots&\vdots&\vdots&\vdots&\vdots&\vdots&\vdots&\vdots\\ d_{k}&r_{k}&a_{k}&s_{k}&k_{k}&c_{k}&l_{k}\end{bmatrix},\]  
where \(d\), \(r\), \(a\), \(s\), \(t\), \(i\), \(c\), and \(l\) are the parameters of the hydrogeological setting and subscripts 1, 2,..., and k represent the different sample locations. The unknown weights to be solved are denoted by \(\text{W}=\left[W_{\text{d}}\ \ W_{\text{r}}\ W_{\text{a}}\ W_{\text{s}}\ W_{ \text{t}}\ W_{\text{i}}\ W_{\text{c}}\ W_{\text{l}}\right]^{\text{T}}\) and the vulnerability indexes evaluated by DRASTIC at these sample locations are denoted by \(\text{V}=\left[V_{1}\ V_{2}\ V_{3}\ \cdots\ V_{k}\right]^{\text{T}}\), which can be calculated by matrix multiplication, that is, \(\text{V}=\text{A}\ \times\text{W}\). The optimal weights are the solution of Equation (7):  
\[\text{MAXIMIZE}\ \rho_{C_{N},\ V}=\frac{\text{COV}(C_{N},V)}{ \sigma_{C_{N}}\sigma_{V}}\] \[\text{subject to}\ W_{i}\in[0,5],\ i=\text{d},\text{r},\...,\text{l}, \tag{7}\]  
where \(\rho_{CN,V}\) is the Pearson correlation coefficient, \(\text{COV}(C_{N},V)\) is the covariance of \(C_{N}\) (nitrate concentrations), \(V\) (vulnerability indexes) and \(\sigma_{CN}\) and \(\sigma_{V}\) are the standard deviationsof the two variables, respectively, and \(W_{i}\) is the weight for parameter \(i\), \(d\), \(r\), \(\ldots\), \(l\), which are the parameters of the hydrogeological setting.  
Equation (7) does not only consider the relationship between the vulnerability indexes and nitrate concentration, but also the effects between the parameters, thus making up for the shortcomings caused by neglecting the relationship between the parameters. The MC and GA methods can be used to solve this equation and are described in the following subsections.