## 3 Results and Discussion
### Cross-Validation (CV) and Partial Least Squares Regression
#### 3.4.2 P LSR Calibration  
Prior to final model calibration, an iterative process was performed to evaluate 600 possible data splits into calibration and validation data sets, at 80/20%, respectively. The best data split was selected by the highest \(R^{2}\) resulting from P LSR prediction. The key function for this process was train test_split of the scikit-learn library, test_size parameter was 0.2 indicating the proportion of the validation set. The optimal value of random_state parameter was 280 in most cases. Using the split data set of the smoothed spectra, the performance of the model was significantly better in terms of \(R^{2}\) and \(RMSE\). Varying the number of LVs to 1 and 5, the values of \(R^{2}\) were 0.82 and 0.74 and \(RMSE\) were 0.64% and 0.75%, respectively. Usingmore than 5 LVs, the \(R^{2}\) decreased drastically. With some pre-processing settings the model fitted better than others (Table 2). This has been also found by several authors [16; 19; 26]. An ordinary least squares regression was performed to inspect the best model (Figure 8). Our best model (\(R^{2}=0.82\) and \(RMSE=0.64\%\)) indicates a good prediction capacity for TC in accordance with the standard used by [PERSON] et al. [8], and the worst model was obtained using a second-order derivative transformation (\(R^{2}=0.23\) and \(\mathrm{RSME}=1.51\%\)). These results were congruent with those reported by [49] who used a similar pre-processing configuration, and the second derivative transformation produced the worst models for the most of the predicted variables. In contrast, [PERSON] et al. [12] found subtle differences in P LSR performance using derivative transformations in pre-processing the data. On the other hand, [PERSON] et al. [50] indicated that non-preprocessed spectral data generated the best model for soil organic carbon. Window size and polynomial order in the Savitzky-Golay algorithm had no important influence on model performance (Table 2). Our results demonstrate that with the same data, it was possible to obtain different results in predicting soil TC. This discordance between the two procedures (with and without cross-validation), may lead to an ambiguous interpretation of the predictive capacity of the built model. For example, avoiding cross-validation, the model resulted in a good capacity for predicting soil TC and could be used to predict TC from soil samples. Before final model calibration, the cross-validation technique was useful to inspect the potential of the spectral data to predict soil TC, and to select the optimal number of the latent variables for regression. P LSR is subject to overprediction when the number of samples for calibration is small (\(<\)58, in the soil spectroscopy context) [22]. However, some studies applied soil spectroscopy with fewer samples [12]. We used 70 soil samples from two study sites. After splitting the data and removing outliers, the calibration set resulted with 54 samples in most cases. The Ultisol samples were re-scanned several days later and the results were similar despite a different intensity of reflectance. More research is needed to better understand soil reflectance variability in these soil types. \begin{table}
\begin{tabular}{c c c c c} \hline
**SG Filter** & **Number of LVs** & \(R^{2}\) & \(RMSE\) & **Outliers ID** \\ \hline \((5,1,0)\) & 2 & 0.82 & 0.61 & 21, 60 \\ \((5,2,0)\) & 2 & 0.82 & 0.61 & 21, 60 \\ \((5,1,1)\) & 2 & 0.58 & 1.22 & 20, 57 \\ \((5,2,2)\) & 1 & 0.23 & 1.51 & – \\ \((11,1,0)\) & 2 & 0.82 & 0.61 & 21, 60 \\ \((11,1,0)\) & 2 & 0.82 & 0.61 & 21, 60 \\ \((11,1,1)\) & 1 & 0.54 & 1.08 & – \\ \((11,2,2)\) & 1 & 0.36 & 1.29 & 20 \\ \((17,1,0)\) & 2 & 0.82 & 0.61 & 21, 60 \\ \((17,2,0)\) & 2 & 0.82 & 0.61 & 21, 60 \\ \((17,1,1)\) & 2 & 0.58 & 1.48 & – \\ \((17,2,2)\) & 1 & 0.26 & 1.59 & 20 \\ \((17,1,0)\) + Log(1/R) & 2 & 0.79 & 0.66 & 21, 60 \\ \((17,1,0)\) + centering & 2 & 0.79 & 0.66 & 21, 60 \\ \hline \end{tabular}
\end{table} 
Table 2: P LSR performance for different Savitzky-Golay filter configurations applied to spectral data.