Predicting the nutritional composition and environmental footprint from NIR spectra requires employing multivariate chemometric techniques to remove spectral artefacts and enhance the model's predictive accuracy . Finding the appropriate techniques enables testing the possibility of employing NIRS in (near) real-time feed optimization. Chemometric prediction aims at maximizing the relationship between the spectral data matrix 𝐗𝐗 and the response to predict 𝐲𝐲; this can be achieved by selecting the optimal pre-processing technique that extracts the information in the data matrix 𝐗𝐗 which is relevant to the response . We employed a classification approach to assign each feed ingredient to the respective country of origin, predicting the environmental impact when associated with LCA. In this study, the country of origin was related to the location of the factory where the spectra were measured: this information was included both in the classification model and in the LCA.