A multi-stage analysis of automatic milking system data: Integrating descriptive, predictive, and prescriptive analytics for dairy health management

Authors: Junsheng Zhu and Elsa Vasseur and Kevin Wade

Date: 2026-05-01

Journal: Biosystem Engineering

Status: Published

DOI: https://doi.org/10.1016/j.biosystemseng.2026.104433

View External Publication


This study utilised a comprehensive dataset from automatic milking system (AMS) records, containing detailed data on various milking parameters and cow health indicators. One of the key metrics analysed was Somatic Cell Count (SCC), a critical marker for detecting clinical mastitis in dairy cows. The research was structured into three stages: descriptive, predictive, and prescriptive analytics. In the descriptive stage, extreme and potentially erroneous values were thoroughly examined, basic correlations and trends were explored, and the underlying causes of erroneous values were investigated. In the predictive stage, the focus was on forecasting SCC surges of 2,000,000 cells ml−1. Stationary and time-series methods were compared, with time-series approaches yielding better results, achieving a 3-day area-under-the-curve (AUC) of 85%, compared to 72% from stationary models. This highlighted the importance of incorporating temporal dynamics into predictive models for improved SCC forecasts. In the prescriptive stage, reinforcement learning (RL) was explored as a decision-support tool. Three fixed methods – baseline, SCC testing, and bacteria testing – were tested alongside a Q-learning agent. Results indicated that optimal management strategies varied across herds, but the consistency between training and testing sets confirmed the reliability of different RL agents. Equipping RL agents with predictive models allows them to integrate forecasts, converting model accuracy into tangible economic returns.