Machine Learning Algorithm for Cow Health Classification
Researchers from Cornell University have developed a framework for training and selecting machine learning algorithms to classify cow health status daily using data from automated health monitoring systems and other cow management and performance indicators.
The study aimed to identify a single candidate algorithm that could be deployed in a commercial dairy operation to identify cows potentially affected by health disorders for clinical examination. The researchers collected data from 1,252 Holstein cows, including rumination, eating, and physical activity measurements, as well as milk yield and milk components. They used a diverse set of nondeep learning algorithms, including XGBoost, AdaBoost, Nearest Centroid, and Bernoulli Naive Bayes, and compared their performance using the open-source automated ML tool Lazy Predict Classifier (LZP).
After selection of the best-performing nondeep learning algorithms, the researchers compared them with more complex deep learning algorithms, including multilayer perceptron, recurrent neural networks, long short-term memory networks, and gated recurrent unit models. The ensemble learning models, particularly XGBoost, achieved the best performance, with a sensitivity of 82.4%, a precision of 42.6%, and a specificity of 86.4%. The XGBoost algorithm also demonstrated robustness in handling missing data and had the highest F1-score (0.56) and area under the curve (84.4%).
Key Takeaways:
- The study aimed to develop a framework for training and selecting machine learning algorithms to classify cow health status daily using data from automated health monitoring systems and other cow management and performance indicators.
- The researchers collected data from 1,252 Holstein cows, including rumination, eating, and physical activity measurements, as well as milk yield and milk components.
- A diverse set of nondeep learning algorithms, including XGBoost, AdaBoost, Nearest Centroid, and Bernoulli Naive Bayes, and deep learning algorithms, including multilayer perceptron, recurrent neural networks, long short-term memory networks, and gated recurrent unit models, were trained and compared using the open-source automated ML tool Lazy Predict Classifier (LZP).
- The ensemble learning models, particularly XGBoost, achieved the best performance, with a sensitivity of 82.4%, a precision of 42.6%, and a specificity of 86.4%.
- The XGBoost algorithm also demonstrated robustness in handling missing data and had the highest F1-score (0.56) and area under the curve (84.4%).
- The study concluded that ensemble classification learner algorithms such as XGBoost and Adaboost might outperform other deep learning and nondeep learning algorithms for classifying cow health daily using automated health monitoring technologies and other predictors of cow health.
Statistics:
- 1,252 Holstein cows were used in the study.
- The dataset included 22,415 cow-day records with 49 features.
- The dataset was split into training and testing sets in an 80:20 ratio, resulting in 17,887 and 4,528 cow-day records, respectively.
- Data imputation and standardization were applied automatically or manually.
- The XGBoost algorithm achieved a sensitivity of 82.4%, a precision of 42.6%, and a specificity of 86.4%.
Sources:
- Journal of Dairy Science, 2025
- ELSEVIER SCIENCE INC, STE 800, 230 PARK AVE, NEW YORK, NY 10169, USA
- Research Conducted at Cornell University Has Updated Our Knowledge about Machine Learning (Screening and selection of a machine learning algorithm for development of a model to select cows for clinical examination using data from automated ...). Journal of Engineering. October 13, 2025; p 3150.