Raul Costa Mascarenhas Santana, Edilson da Silva Guimarães, Fernando David Caracuschanski, Larissa Cristina Brassolatti, Maria Laura da Silva, Alexandre Rossetto Garcia, José Ricardo Macedo Pezzopane, Teresa Cristina Alves, Patrícia Tholon, Marcos Veiga Dos Santos, Luiz Francisco Zafalon
Bovine subclinical mastitis (SCM) is the costliest disease for the dairy industry. Technologies aimed at the early diagnosis of this condition, such as infrared thermography (IRT), can be used to generate large amounts of data that provide valuable information when analyzed using learning techniques. The objective of this study was to evaluate and optimize the use of machine learning by applying the Extreme Gradient Boosting (XGBoost) algorithm in the diagnosis of bovine SCM, based on udder thermogram analysis. Over 14 months, a total of 1035 milk samples were collected from 97 dairy cows subjected to an automatic milking system. Somatic cell counts were performed by flow cytometry, and the health status of the mammary gland was determined based on a cutoff of 200,000 cells/mL of milk. The attributes analyzed collectively included air temperature, relative humidity, temperature-humidity index, breed, body temperature, teat dirtiness score, parity, days in milk, mammary gland position, milk yield, electrical conductivity, milk fat, coldest and hottest points in the mammary gland region of interest, average mammary gland temperature, thermal amplitude, and the difference between the average temperature of the region of interest and the animal's body temperature, as well as the microbiological evaluation of the milk. Using the XGBoost algorithm, the most relevant variables for solving the classification problem were identified and selected to construct the final model with the best fit and performance. The best area under the receiver operating characteristic curve (AUC: 0.843) and specificity (Sp: 93.3%) were obtained when using all thermographic variables. The coldest point in the region of interest was considered the most important for decision making in mastitis diagnosis. The use of XGBoost can enhance the diagnostic capability for SCM when IRT is employed. The developed optimized model can be used as a confirmatory mechanism for SCM.