Random forest regression has been recently demonstrated to be a powerful technique in multivariate calibration to deal with spectral complexity and possible non-linearity . Therefore, we also tested this estimator to evaluate whether the final predictive accuracy would have been improved compared to the most commonly used PLS. Training a random forest model required tuning the model hyperparameters. We selected the optimal hyperparameters with genetic algorithms in crossvalidation. PLS and random forest regression models were run independently for each feed ingredient and nutritional value, within the pre-processing optimization framework. Their performance was evaluated in cross-validation in combination with the tested pre-processing strategies: the combination with the lowest 𝑅𝑅𝑅𝑅𝑅𝑅𝑅𝑅 in cross-validation was selected as the most optimal to predict the ingredients' nutritional composition. Details about the optimized hyperparameters and crossvalidation schemes are provided in the Supplemental Information (Table -S6).