## 2 Materials and Methods
### Chemometrics Methods  
The experimental data set was properly arranged in data matrices and auto-scaled (column mean-centered and scaled) to eliminate offsets and changes in measurement scales. Exploratory analysis of the autoscaled data set was conducted by principal component analysis PCA [22; 33; 34; 35; 36; 37]. The main objectives of the principal component analysis (PCA) are the transformation of the original data's coordinate system into a more relevant one and reduction of the original system dimension using a limited number of the principal components (PC's) which reflect the inherent structure of the data [38]. A principal component model approximates a given data matrix as follows [28]:  
\[\mathrm{X}\left(\mathrm{n}\times\mathrm{p}\right)=\mathrm{T}\left(\mathrm{n} \times\mathrm{d}\right)\mathrm{LT}\left(\mathrm{d}\times\mathrm{p}\right)+ \mathrm{E}\left(\mathrm{n}\times\mathrm{p}\right) \tag{7}\]  
where \(\mathrm{n}\) represents the number of objects (samples), \(\mathrm{p}\)--the number of variables (wavelengths), and \(\mathrm{d}\)--the number of principal components (PC's), \(\mathrm{T}\)--the scores matrix, \(\mathrm{L}\)--the loadings matrix, \(\mathrm{LT}\)--the transposed loadings matrix, and \(\mathrm{E}\)--the residuals matrix. The number of PC's was determined by the eigenvalue-one criterion analysis of the covariance matrix, according to which only the PC's with eigenvalues greater than one are considered relevant. The rotation of the components extracted was converted into six iterations by Varimax method with Kaiser normalization in order to extract optimal amount of PC's. Tests of PC's derived were performed by correlation and regression means. Two types of plots were obtained from the application of PCA. Loadings plots which describe and map the relationships between water quality parameters and the extracted principal components, and scores plots, which describe and map the mean samples UV/Vis spectra in the new axes defined by the principal components. One-vector scores plot to interpret the spectral PCA results was performed [28]. Multivariate calibration was performed using principal component regression analysis (PCR). The multiple linear regression (MLR) models assume that in addition to the \(\mathrm{p}\) independent x-variables, a response variable \(\mathrm{y}\) is measured, which can be explained as a linear combination of the x-variables. The prediction of the factor of interest \(\mathrm{y}_{\mathrm{j}}\) can be described as [14]:  
\[\mathrm{y}_{\mathrm{j}}\mathrm{=b}_{0}+\sum_{\mathrm{i}=1}^{\mathrm{k}}\mathrm{ b}_{\mathrm{i}}\mathrm{x}_{\mathrm{i}}\mathrm{+e}_{\mathrm{i}\mathrm{j}} \tag{8}\]  
where \(\mathrm{b}_{\mathrm{i}}\) is the computed coefficient, \(\mathrm{x}_{\mathrm{i}}\) represents the absorbance at each wavelength and \(\mathrm{e}_{\mathrm{i}\mathrm{j}}\), is the error. One drawback of PCA technique is that it captures only the characteristics of the X-vector or predictive variables. No importance is given of each predictive variable relation to the dependent or the target variable. Therefore, it is an unsupervised dimension reduction technique. Partial least square (PLS) allows achieving this balance and providing an alternative approach to PCA technique. Therefore, advanced modeling was performed by partial least square regression (PLS) statistical techniques [13; 16; 22; 34; 37; 39; 40]. PLS takes the X-Block (physico-chemical properties) and correlates them with Y-Block (spectral data) information to calculate latent variables (LV) for PLS calibration and prediction models. The calibration model is built by means of PLS, outlier tests and validation procedures to reach both high correlation quality and robustness. The result of the calibration procedure is a recovery function. The recovery function is obtained by plotting the reference measurements (actual targets) vs. the predicted values (estimated targets). Chemometric models are used to correlate the concentrations of required determinants to spectra.