To predict the nutritional composition of feed ingredients, we compared the performances of two different regressors: partial least squares (PLS) and random forest regression. PLS regression is commonly used for NIR spectra analyses due to its ability to handle numerous correlated spectral features . PLS identifies a set of new variables (latent variables, LVs), and finds the LVs' direction that explains the highest variance in the 𝐗𝐗 matrix and is most correlated to the response vector 𝐲𝐲 . We selected the number of LVs employed by the model with internal cross-validation to avoid overfitting.