Skip to main content
Phenomics

Artificial intelligence and machine learning for phenotyping – examples with spectral and time series data

Author
  • Maria Frizzarin (Agroscope)

Abstract

The objective of this work is to provide insights into the use of artificial intelligence (AI) and machine learning (ML) for predicting novel phenotypes from spectral and time series data in animal science. Advances in sensor technologies have led to the collection of large and complex datasets. Spectral data, characterized by multicollinearity, and time series data, which are longitudinal and temporally correlated, pose analytical challenges but offer strong opportunities for phenotyping. Using mid-infrared spectral data to predict milk protein fractions and milk coagulation properties (622 records) under an independent-animal cross-validation scenario, eleven ML models were compared. These included partial least squares regression (PLSR), ridge regression, LASSO, elastic net, principal component regression, projection pursuit regression, spike-and-slab regression, random forests, boosting decision trees, neural networks (NN), and post-hoc model averaging. Results indicated that no single model universally produced the most accurate predictions; rather, performance depended on the characteristics of the trait being predicted and on the accuracy metric used to assess model performance (i.e., root mean square error RMSE, coefficient of determination R2, or ratio of performance to interquartile range; Table 1). Moreover, the best model often varied depending on dataset size and the type of validation scenario employed. Some validation scenarios include independent-animal cross-validation, which randomly splits the dataset while ensuring that records from the same animal appear either in the calibration or in the validation set, and year-independent cross-validation, in which data from previous years are used to predict phenotypes in subsequent years. When spectral datasets were used to predict body condition score (BCS) change (12,994 records), methane emissions (3,047 records), and nitrogen use efficiency (NUE; 3,497 records), NN consistently outperformed PLSR under independent-animal cross-validation (BCS change: R² = 0.53 for PLSR and 0.67 for NN; methane emissions: R² = 0.48 for PLSR and 0.50 for NN; NUE: R² = 0.67 for PLSR and 0.74 for NN). However, under year-independent cross-validation, PLSR outperformed NN for NUE prediction (R² = 0.59 for PLSR and 0.30 for NN).Machine learning has also been applied to phenotyping using time series data. In a study conducted on nine commercial dairy farms, mastitis follow-up-defined as the severity of mastitis, ranging from cases with little impact on the cow to deadly cases-was predicted using data from automatic milking systems. A neural network-based approach (MiniRocket) transformed time series data into convolutional features capturing temporal patterns such as peaks, dips, and changes in trends. These features enabled prediction accuracies above 70% within three milkings following an increase in SCC.In conclusion, AI and ML are powerful tools for phenotyping spectral and time series datasets. Nevertheless, careful consideration of model choice, dataset size, validation design, and trait characteristics is essential to ensure robust and reliable prediction performance.

Keywords: 2026

How to Cite:

Frizzarin, M., (2026) “Artificial intelligence and machine learning for phenotyping – examples with spectral and time series data”, World Congress on Genetics Applied to Livestock Production Digital Archive 2026(1): 2278036. doi: https://doi.org/10.31274/wcgalp.23430

Rights: 1

Downloads:
Download PDF
View PDF

101 Views

17 Downloads

Published on
2026-02-26

Peer Reviewed