Skip to main content

ORIGINAL RESEARCH article

Front. Vet. Sci.
Sec. Veterinary Epidemiology and Economics
Volume 12 - 2025 | doi: 10.3389/fvets.2025.1517173
This article is part of the Research Topic Utilizing Real World Data and Real World Evidence in Veterinary Medicine: Current Practices and Future Potentials View all 3 articles

Improved Cattle Farm Classification: Leveraging Machine Learning and Linked National Datasets

Provisionally accepted
  • 1 Institute of Veterinary Public Health, Department of Clinical Research and Veterinary Public Health, Vetsuisse Faculty, University of Bern, Liebefeld, Bern, Switzerland
  • 2 Graduate School for Cellular and Biomedical Sciences, University of Bern, Bern, Bern, Switzerland
  • 3 Federal Food Safety and Veterinary Office (FSVO), Bern, Bern, Switzerland

The final, formatted version of the article will be published soon.

    While many countries have registries of livestock farms, it can be challenging to obtain information on their primary production type. For example, for Swiss farms registered as keeping cattle, a distinction can only be made between milk-producing and non-milk-producing farms. The Swiss cattle industry consists of beef and dairy farms, with a strong predominance of small to mediumsized farms. A better differentiation of cattle production types would be beneficial for the planning and evaluation of surveillance programmes for cattle diseases and for the benchmarking antibiotic consumption. The aim of this study was to outline cattle production types of interest and to allow the classification of Swiss cattle farms according to production type in order to optimise surveillance. We collaborated with experts to define the five primary cattle production types: calf fattening, dairy cattle, cattle fattening, rearing cattle and suckler cows. In collaboration with the cantonal Veterinary Offices, we collected production types from 618 reference farms across 14 cantons and defined a total of 24 features by combining information from three national databases. Using farm-level data on milk production, age and sex distribution, cattle breeds, calving, births, slaughter, animal movements and antibiotic use, we trained three different machine learning models capable of classifying the five production types. Among these models, the Random Forest model demonstrated the highest level of performance, achieving an accuracy of 0.914 (95% CI: 0.890, 0.938) and an F1-Score of 0.879 (95% CI: 0.841, 0.913). In conclusion, together with experts, we have outlined five primary production types on cattle farms in Switzerland and developed a model that allows a reproducible, year-to-year classification of cattle farms using national datasets. Our flexible methodology could be adapted to other countries and datasets, enabling veterinary authorities to conduct more efficient and targeted disease surveillance in the future.

    Keywords: Machine Learning1, surveillance2, Farm topology3, Movement Database4, Antibiotic Use Data5, Cattle6

    Received: 25 Oct 2024; Accepted: 17 Jan 2025.

    Copyright: © 2025 Schnidrig, Struchen, Schärrer, Heim, Hadorn, Schüpbach-Regula and Paternoster. This is an open-access article distributed under the terms of the Creative Commons Attribution License (CC BY). The use, distribution or reproduction in other forums is permitted, provided the original author(s) or licensor are credited and that the original publication in this journal is cited, in accordance with accepted academic practice. No use, distribution or reproduction is permitted which does not comply with these terms.

    * Correspondence: Guy-Alain Schnidrig, Institute of Veterinary Public Health, Department of Clinical Research and Veterinary Public Health, Vetsuisse Faculty, University of Bern, Liebefeld, CH - 3097, Bern, Switzerland

    Disclaimer: All claims expressed in this article are solely those of the authors and do not necessarily represent those of their affiliated organizations, or those of the publisher, the editors and the reviewers. Any product that may be evaluated in this article or claim that may be made by its manufacturer is not guaranteed or endorsed by the publisher.