## 5 Discussion and Conclusions  
The major finding of this paper is the overall superiority of the averaging methods compared to the usual PLSR selecting dimensionality \(a\) by minimum RMSEP\({}_{\text{CV}}\). In our evaluation, we chose a severe splitting of the data (test set = half of the data) to prevent optimistic estimates of performances, which can occur frequently when the study materials have complex structures. To check the consistency of the results, we replicated all the same computations presented in this paper but with the more usual splitting {training set = 2/3, test set = 1/3}. The same types of patterns were observed in the performances (not detailed in this text), in particular the superiority of the averaging methods to the usual PLSR. When using averaging or stacking, the maximal dimensionality \(A\) has to be set as input parameter. In practice, \(A\) can be optimized based on each dataset \(\{\mathbf{X},\mathbf{y}\}\), as the dimensionality \(a\) in the usual PLSR. However, the methods have the advantage of allowing a strategy where \(A\) is set _a priori_ as an omnibus value, with the expectation that this value will provide results that are sufficiently efficient even if not fully optimal for each dataset. Such a strategy was implemented in this work. The _a priori_ choices \(A=50\) LVs (n\({}_{\text{train}}>400\)) and \(A=30\) LVs (n\({}_{\text{train}}\leq 400\)) appeared relevant for our forages data. More generally, for any type of data, relevant orders of magnitude of \(A\) can be easily estimated on a few preliminary validation samples. For instance, with a few runs of CV on other datasets  
Figure 9: Mean relative errors (100 \(\times\) RMSEP\({}_{\text{test}}\)/mean(\(y\))) for the study models, datasets, and values of parameter \(\alpha\): \(\alpha=0\) in purple, \(\alpha=0.3\) in yellow. than those presented in this paper (containing lower heterogeneity and lower sample sizes; \(n_{\text{train}}\leq 200\)), we observed that \(A=20\) LVs was very efficient for these data. This easy and fast calibration process can help the user to find a value of \(A\) that will be efficient \"everywhere\" on his data. On our data, the SHENK weights [38] did not provide good performances. This was not in adequation with the observations of Zhang et al. [11] on smaller and less complex datasets. Stacking results were also disappointing. Optimizing the weights by a top regression model did not improve the prediction performances. Averaging with CV-, AIC-, and BIC-weighting appeared to be the best methods overall. Nevertheless, uniform weighting was often almost as performant. The AVG method has the advantage of being simpler and much faster to compute (no need to internally estimate training error rates on \(\{\mathbf{X}_{\text{train}},\mathbf{y}_{\text{train}}\}\), required to compute the variable model weights). AVG can therefore be recommended for a fast strategy, providing efficient results even if not always optimal. This paper focused on forages, a priority material studied in feed research teams for which significant data in numbers and representativity are available. Forage data have the characteristic to contain a high level of heterogeneity due to scattering effects in the NIR signals, diversity of origins, species, climate, conditions of data collections, spectrometers, etc. The presented averaging methods may be advantageous for other materials, such as foods and other agricultural products, when they present heterogeneity. The readers are encouraged to test these generic and easy-to-implement methods on many other types of materials than forages to eventually validate this guess. Finally, averaging methods presented in this paper can be easily embedded in pipelines of local PLSR [26; 39; 40; 41; 42]. Such pipelines fit a PLSR model for each new observation to predict, after having selected a neighborhood of this observation. Local PLSR are particularly efficient when the relation between \(\mathbf{y}\) and \(\mathbf{X}\) is nonlinear.