Journal of Dairy Science (Jul 2023)

Early detection of subclinical mastitis in lactating dairy cows using cow-level features

  • A. Pakrashi,
  • C. Ryan,
  • C. Guéret,
  • D.P. Berry,
  • M. Corcoran,
  • M.T. Keane,
  • B. Mac Namee

Journal volume & issue
Vol. 106, no. 7
pp. 4978 – 4990

Abstract

Read online

ABSTRACT: Subclinical mastitis in cows affects their health, well-being, longevity, and performance, leading to reduced productivity and profit. Early prediction of subclinical mastitis can enable dairy farmers to perform interventions to mitigate its effect. The present study investigated how well predictive models built using machine learning techniques can detect subclinical mastitis up to 7 d before its occurrence. The data set used consisted of 1,346,207 milk-day (i.e., a day when milk was collected on both morning and evening) records spanning 9 yr from 2,389 cows producing on 7 Irish research farms. Individual cow composite milk yield and maximum milk flow were available twice daily, whereas milk composition (i.e., fat, lactose, protein) and somatic cell count (SCC) were collected once per week. Other features describing parity, calving dates, predicted transmitting ability for SCC, body weight, and history of subclinical mastitis were also available. The results of the study showed that a gradient boosting machine model trained to predict the onset of subclinical mastitis 7 d before a subclinical case occurs achieved a sensitivity and specificity of 69.45 and 95.64%, respectively. Reduced data collection frequency, where milk composition and SCC were recorded only every 15, 30, 45, and 60 d was simulated by masking data, to reflect the frequency of recording of this data on commercial dairy farms in Ireland. The sensitivity and specificity scores reduced as recording frequency reduced with respective scores of 66.93 and 80.43% when milk composition and SCC were recorded just every 60 d. Results demonstrate that models built on data that could be recorded routinely available on commercial dairy farms, can achieve useful predictive ability of subclinical mastitis even with reduced frequency of milk composition and SCC recording.

Keywords