In the agri-food supply chain, geographical traceability of milk is essential, quality components being strictly related to the environment and to specific farming. The aim of this study was to test different machine learning approaches for tracing the origin of milk from infra-red spectra in two economically important Italian dairy sheep breeds: Sarda and Valle del Belice. A total of 905 milk samples were collected from Animal farmed in different altimetric zones: plain (≤ 200 metres), hills (350–450), and mountains (> 650 metres). The datasets were divided in training (90%) and testing (10%). Seven models were tested: linear discriminant analysis (LDA), stochastic gradient boosting machine (GBM), support vector machines (SVM), recursive partitioning robust tree (RPART), random forest (RF), K-Nearest neighbours (KNN). The models were calibrated in the training dataset and then used to predict the zone in the testing data set. The procedure was repeated one thousand times by randomly selecting the samples, in the whole dataset or separately by breed. Very different computing time were found, moving from few seconds (LDA and RPART) to more than 20 min (RF). Considering the two breeds together, the LDA model showed the highest accuracy (0.98). The model performances changed according to the breed: GBM was the best model for Sarda, whereas LDA was the best for Valle del Belice. In both breeds, the lowest accuracy was observed for the hill group. The results suggested that this approach can be promising to routinely classify the origin of milk samples using midinfrared spectroscopy.

Cesarani, A., Congiu, M., Persichilli, C., Carta, F., Sardina, M.T., Dimauro, C., et al. (2025). Machine learning algorithms to trace the origin of milk from infra-red spectra in sheep. ITALIAN JOURNAL OF ANIMAL SCIENCE, 24(1), 2325-2333 [10.1080/1828051X.2025.2582396].

Machine learning algorithms to trace the origin of milk from infra-red spectra in sheep

Carta F.;Sardina M. T.;Mastrangelo S.
2025-11-01

Abstract

In the agri-food supply chain, geographical traceability of milk is essential, quality components being strictly related to the environment and to specific farming. The aim of this study was to test different machine learning approaches for tracing the origin of milk from infra-red spectra in two economically important Italian dairy sheep breeds: Sarda and Valle del Belice. A total of 905 milk samples were collected from Animal farmed in different altimetric zones: plain (≤ 200 metres), hills (350–450), and mountains (> 650 metres). The datasets were divided in training (90%) and testing (10%). Seven models were tested: linear discriminant analysis (LDA), stochastic gradient boosting machine (GBM), support vector machines (SVM), recursive partitioning robust tree (RPART), random forest (RF), K-Nearest neighbours (KNN). The models were calibrated in the training dataset and then used to predict the zone in the testing data set. The procedure was repeated one thousand times by randomly selecting the samples, in the whole dataset or separately by breed. Very different computing time were found, moving from few seconds (LDA and RPART) to more than 20 min (RF). Considering the two breeds together, the LDA model showed the highest accuracy (0.98). The model performances changed according to the breed: GBM was the best model for Sarda, whereas LDA was the best for Valle del Belice. In both breeds, the lowest accuracy was observed for the hill group. The results suggested that this approach can be promising to routinely classify the origin of milk samples using midinfrared spectroscopy.
nov-2025
Settore AGRI-09/A - Zootecnia generale e miglioramento genetico
Cesarani, A., Congiu, M., Persichilli, C., Carta, F., Sardina, M.T., Dimauro, C., et al. (2025). Machine learning algorithms to trace the origin of milk from infra-red spectra in sheep. ITALIAN JOURNAL OF ANIMAL SCIENCE, 24(1), 2325-2333 [10.1080/1828051X.2025.2582396].
File in questo prodotto:
File Dimensione Formato  
Machine learning algorithms to trace the origin of milk from infra-red spectra in sheep.pdf

accesso aperto

Tipologia: Versione Editoriale
Dimensione 945.54 kB
Formato Adobe PDF
945.54 kB Adobe PDF Visualizza/Apri

I documenti in IRIS sono protetti da copyright e tutti i diritti sono riservati, salvo diversa indicazione.

Utilizza questo identificativo per citare o creare un link a questo documento: https://hdl.handle.net/10447/693963
Citazioni
  • ???jsp.display-item.citation.pmc??? ND
  • Scopus 0
  • ???jsp.display-item.citation.isi??? 0
social impact