Automating Classification of Veterinary Biosecurity Recommendations Using Machine Learning

Figure reproduced from Lima-Campêlo , Preventive Veterinary Medicine

Abstract

Every other year, Canadian veterinarian provides personalized recommendations to improve dairy farm biosecurity, resulting in a large volume of text data. This study aimed to develop a machine learning model capable of automatically classifying these biosecurity recommendations into 12 predefined categories. The model was trained on 11,250 manually classified veterinary recommendations collected between 2018 and 2021. Three algorithms were tested: Multinomial Naïve Bayes (MNB), Support Vector Machine (SVM), and Random Forest (RF). The trained SVM model was selected to classify new recommendations collected between 2022 and 2024 from herds in Alberta, Ontario, and Québec. To evaluate model’s performance on this new dataset, a random sample of 250 recommendations was manually classified. The agreement between human classification and model predictions resulted in a Cohen’s Kappa of 0.88, suggesting strong agreement. This study highlights the potential of machine learning to classify biosecurity recommendations and support timely, informed decision-making in dairy herd management.

Publication
Preventive Veterinary Medicine (2026)