# Advances on Water Quality Detection by UV-Vis Spectroscopy
## 3 Theoretical Basis of UV-Vis Spectrum Data Processing
### Characteristic Wavelength Extraction of Spectral Data  
In water quality detection, there are serious non-linear overlaps in water quality spectral data. The high-dimensional data contain many redundant, hidden important relationships. Modeling directly using the original spectrum increases the model complexity and calculation time, which is not conducive to the application and promotion of the model. Because the whole spectrum data may contain irrelevant information that participates in the model building, the prediction accuracy of the model cannot be improved by using the above-preprocessing methods. Through data dimensionality reduction, the dimension and complexity can be reduced while enhancing the extraction of useful information [21]. Principal component analysis (PCA) is a method of characteristic wavelength extraction based on linear algebra [22]. PCA transforms multiple variables into a few uncorrelated comprehensive variables to reflect the whole dataset comprehensively and uses a few variables to represent all variables to explain the problems to be studied. PCA can simplify complex data structure and obtain potential characteristic variables. During processing of UV-Vis spectral water quality parameter data, researchers often use it to reduce the dimensions, reduce model complexity, and extract useful information from the spectral data. [PERSON] et al. [23] used PCA to capture the characteristics of the main pollutant varieties from the spectral matrix and reduce its dimensions, and then constructed a new statistical variable. The local outlying degree was evaluated according to the chi-square distribution in the main molecular space. [PERSON] et al. [24] compared the modeling results after a PCA dimensionality reduction with those obtained without a PCA dimensionality reduction, and found that the model prediction effect of the input sample after a PCA dimensionality reduction was better. The successive projections algorithm (SPA) is a forward variable selection algorithm that minimizes the collinearity of vector space. Its advantage lies in the extraction of several characteristic wavelengths in the whole band, which can eliminate redundant information in the original spectral matrix and can be used to screen spectral characteristic wavelengths. In recent years, when using UV-Vis spectroscopy to detect some parameters in water, researchers selected SPA to extract the characteristic wavelength of spectral data. [PERSON] et al. [25] used SPA to start with an initial feature, then selected a new feature in each iteration, and ended with a specified number of N features. Finally, the characteristic wavelength of spectral data was extracted, and the collinearity of spectral data was solved. [PERSON] et al. [26] used the SPA algorithm and other algorithms to extract characteristic wavelengths from spectral data, which eliminated redundant and collinear information in the original spectral data, and improved the operation speed and robustness of the model. On the basis of analyzing the correlation matrix of spectral data, [PERSON] et al. [27] proposed a correlation-based SPA (CB-SPA) which can select the variables subset with more valuable variables and less multicollinearity. For data dimensionality reduction, many researchers have performed a variety of research on feature wavelength extraction, among which the methods found to have better modeling effects after dimensionality reduction are the genetic algorithm (GA), competitive adaptive reweighted sampling (CARS), particle swarm optimization (PSO), and random frog (RF) algorithm (Table 3).