## 7 Additional Fundamental Aspects of Chemometric Modelling: Data Preprocessing and Validation
### Data Pre-Processing  
Raw data are almost always not suited to be analyzed as such, i.e., directly in the form in which they are yielded by the instrument, and spectroscopic profiles in particular result from multiple contributions, and only a few of these contributions might be relevant for the problem under study. The combination of multiple sources of unwanted variability can have a significant impact both on the model performance and on its interpretation; for instance, bilinear approaches extract components according to some variance/covariance-based criteria which may lead to nuisance artifacts in the presence of a high amount of spurious/uninteresting information. Accordingly, data are preliminarily subjected to one or more transformations (preprocessing), so as to remove or reduce their so-called detrimental fraction [268]. When considering the possible ways of pretreating experimental data, it is necessary to point out that there are some strategies which are valid independently from the nature of the registered signal, while others are conceived for more specific types of instrumental responses. Within the first family of techniques, the two most commonly used operations are centering and scaling [269]. Centering aims at removing variable offsets; normally, mean-centering is adopted, i.e., \begin{table}
\begin{tabular}{c l l} \hline \hline
**Aim** & **Method** & **Reference** \\ \hline Chemical characterization of milk lactic acid fermentation & MCR-ALS & [236] \\ Milk renteting characterization and monitoring & MCR-ALS & [237; 238] \\ Chemical characterization of beer fermentation & MCR-ALS & [239] \\ Assessment of coconut oil purity/adulteration degree & MCR-ALS & [265] \\ Chemical characterization of chocolate samples & MCR-ALS & [266] \\ Egg-pasta characterization & ASCA & [76] \\ Coffee bean roasting monitoring & ASCA & [150] \\ Cheddar cheese ripening monitoring & ASCA & [264] \\ Eggplant chilling injury characterization & ASCA & [267] \\ \hline \hline \end{tabular}
\end{table} 
Table 4: Examples of applications of curve resolution and analysis of variance-based techniques in the fields of spectroscopy-based food analysis. MCR-ALS and ASCA stand for Multivariate Curve Resolution-Alternating Least Squares and ANOVA-Simultaneous Component Analysis, respectively. The abbreviation ANOVA denotes the analysis of variance. the mean value computed across each column of a data matrix is subtracted from all the elements of that column. This makes it possible to discard what is shared by the entire set of samples and magnify the differences among individuals. On the other hand, scaling is frequently applied to guarantee that the scales of the different recorded variables are comparable as well as their a priori contribution to the chemometric model. Mathematically, it consists of dividing all the elements of each column of the data matrix by a constant term (usually its standard deviation), and it is highly recommended when the descriptors have been collected using distinct analytical platforms and, therefore, have been reported in different measurement units. It goes without saying that scaling is rarely performed on spectral profiles. As mentioned before, there also exist several other preprocessing strategies which directly focus on the nature of the instrumental response itself and are designed to correct/remove unwanted sources of variability that are related to its specific characteristics, such as stochastic noise, non-linearities, baseline or wavelength shifts, or undesired variations due to particular chemical and physical phenomena (such as light scattering). The impact of stochastic noise can be reduced by the use of methods which filter high-frequency contributions out of the investigated signal. Fourier [270] or wavelet [271] transforms or Savitzy-Golay smoothing [272] are possible solutions to cope with such an issue.