Training and Validating a Machine Learning Model for the Sensor-Based Monitoring of Lying Behavior in Dairy Cows on Pasture and in the Barn
Abstract
:Simple Summary
Abstract
1. Introduction
2. Materials and Methods
2.1. Data Collection and Labeling
2.1.1. Farm Management and Animals
2.1.2. Collection of Sensor and Ground Truth Data
2.2. General Process of Data Acquisition and Model Development
2.3. Feature Selection and Model Development
2.3.1. Feature Selection
2.3.2. Model Selection and Development
2.4. Postprocessing
2.5. Evaluation of the Model and Statistical Analysis
- Y = value of performance (sensitivity, specificity and accuracy);f = fixed effect for farm;d = fixed effect for day;l = fixed effect for location (pasture/barn);a = repeated effect for animal;e = random residual.
3. Results
3.1. Collected Data
3.2. Observer Reliability
3.3. Model
3.4. Performance of the Model
3.5. Lying Behavior in Different Husbandry Systems
4. Discussion
5. Conclusions and Future Work
Future Work
Author Contributions
Funding
Institutional Review Board Statement
Informed Consent Statement
Data Availability Statement
Acknowledgments
Conflicts of Interest
Abbreviations
PLF | Precision Livestock Farming; |
IoT | Internet of Things; |
DIM | Days in milk; |
BCS | Body condition score; |
3D | three-dimensional; |
GPS | General Positioning System; |
RTC | Real-time clock; |
TP | True positive; |
TN | True negative; |
FP | False positive; |
FN | False negative. |
References
- Lara, O.D.; Labrador, M.A. A Survey on Human Activity Recognition using Wearable Sensors. IEEE Commun. Surv. Tutor. 2013, 15, 1192–1209. [Google Scholar] [CrossRef]
- Guo, H.; Chen, L.; Peng, L.; Chen, G. Wearable sensor based multimodal human activity recognition exploiting the diversity of classifier ensemble. In Proceedings of the 2016 ACM International Joint Conference on Pervasive and Ubiquitous Computing, Heidelberg, Germany, 12–16 September 2016; pp. 1112–1123. [Google Scholar] [CrossRef]
- Jordao, A.; Nazare, A.C., Jr.; Sena, J.; Schwartz, W.R. Human Activity Recognition Based on Wearable Sensor Data: A Standardization of the State-of-the-Art. arXiv 2019, arXiv:1806.05226. [Google Scholar]
- Arcidiacono, C.; Porto, S.M.C.; Mancino, M.; Cascone, G. Development of a threshold-based classifier for real-time recognition of cow feeding and standing behavioural activities from accelerometer data. Comput. Electron. Agric. 2017, 134, 124–134. [Google Scholar] [CrossRef]
- Jukan, A.; Masip-Bruin, X.; Amla, N. Smart Computing and Sensing Technologies for Animal Welfare: A Systematic Review. ACM Comput. Surv. 2017, 50, 10:1–10:27. [Google Scholar] [CrossRef] [Green Version]
- Khan, A.; Hammerla, N.; Mellor, S.; Plötz, T. Optimising sampling rates for accelerometer-based human activity recognition. Pattern Recognit. Lett. 2016, 73, 33–40. [Google Scholar] [CrossRef]
- Mansbridge, N.; Mitsch, J.; Bollard, N.; Ellis, K.; Miguel-Pacheco, G.G.; Dottorini, T.; Kaler, J. Feature Selection and Comparison of Machine Learning Algorithms in Classification of Grazing and Rumination Behaviour in Sheep. Sensors 2018, 18, 3532. [Google Scholar] [CrossRef] [Green Version]
- Kamminga, J.W.; Le, D.V.; Meijers, J.P.; Bisby, H.; Meratnia, N.; Havinga, P.J. Robust Sensor-Orientation-Independent Feature Selection for Animal Activity Recognition on Collar Tags. Proc. ACM Interact. Mob. Wearable Ubiquitous Technol. 2018, 2, 15:1–15:27. [Google Scholar] [CrossRef] [Green Version]
- Krause, A.; Ihmig, M.; Rankin, E.; Leong, D.; Gupta, S.; Siewiorek, D.; Smailagic, A.; Deisher, M.; Sengupta, U. Trading off prediction accuracy and power consumption for context-aware wearable computing. In Proceedings of the Ninth IEEE International Symposium onWearable Computers, Osaka, Japan, 18–21 October 2005; pp. 20–26. [Google Scholar] [CrossRef]
- Von Keyserlingk, M.A.G.; Rushen, J.; de Passillé, A.M.; Weary, D.M. Invited review: The welfare of dairy cattle—Key concepts and the role of science. J. Dairy Sci. 2009, 92, 4101–4111. [Google Scholar] [CrossRef] [PubMed]
- Berckmans, D. Precision livestock farming technologies for welfare management in intensive livestock systems. Rev. Sci. Tech. Int. Off. Epizoot. 2014, 33, 189–196. [Google Scholar] [CrossRef]
- Jago, J.; Eastwood, C.; Kerrisk, K.; Yule, I. Precision dairy farming in Australasia: Adoption, risks and opportunities. Anim. Prod. Sci. 2013, 53, 907–916. [Google Scholar] [CrossRef]
- Hanson, D.; Mo, C. Monitoring Cattle Motion using 3-axis Acceleration and GPS Data. J. Res. Agric. Anim. Sci. 2014, 2, 8. [Google Scholar]
- Hostiou, N.; Fagon, J.; Chauvat, S.; Turlot, A.; Kling-Eveillard, F.; Boivin, X.; Allain, C. Impact of precision livestock farming on work and human-animal interactions on dairy farms. A review. Biotechnol. Agron. Soc. Environ. 2017, 21, 268–275. [Google Scholar] [CrossRef]
- Gáspárdy, A.; Efrat, G.; Bajcsy, A.C.; Fekete, S.G. Electronic monitoring of rumination activity as an indicator of health status and production traits in high-yielding dairy cows. Acta Vet. Hung. 2014, 62, 452–462. [Google Scholar] [CrossRef] [PubMed] [Green Version]
- King, M.T.M.; Dancy, K.M.; LeBlanc, S.J.; Pajor, E.A.; DeVries, T.J. Deviations in behavior and productivity data before diagnosis of health disorders in cows milked with an automated system. J. Dairy Sci. 2017, 100, 8358–8371. [Google Scholar] [CrossRef] [PubMed] [Green Version]
- King, M.T.M.; DeVries, T.J. Graduate Student Literature Review: Detecting health disorders using data from automatic milking systems and associated technologies. J. Dairy Sci. 2018, 101, 8605–8614. [Google Scholar] [CrossRef] [PubMed]
- Kaneene, J.B.; Scott Hurd, H. The national animal health monitoring system in Michigan. III. Cost estimates of selected dairy cattle diseases. Prev. Vet. Med. 1990, 8, 127–140. [Google Scholar] [CrossRef]
- Milner, P.; Page, K.L.; Hillerton, J.E. The Effects of Early Antibiotic Treatment Following Diagnosis of Mastitis Detected by a Change in the Electrical Conductivity of Milk. J. Dairy Sci. 1997, 80, 859–863. [Google Scholar] [CrossRef]
- Trevisi, E.; Zecconi, A.; Cogrossi, S.; Razzuoli, E.; Grossi, P.; Amadori, M. Strategies for reduced antibiotic usage in dairy cattle farms. Res. Vet. Sci. 2014, 96, 229–233. [Google Scholar] [CrossRef]
- Stangaferro, M.L.; Wijma, R.; Caixeta, L.S.; Al-Abri, M.A.; Giordano, J.O. Use of rumination and activity monitoring for the identification of dairy cows with health disorders: Part I. Metabolic and digestive disorders. J. Dairy Sci. 2016, 99, 7395–7410. [Google Scholar] [CrossRef] [Green Version]
- Stangaferro, M.L.; Wijma, R.; Caixeta, L.S.; Al-Abri, M.A.; Giordano, J.O. Use of rumination and activity monitoring for the identification of dairy cows with health disorders: Part II. Mastitis. J. Dairy Sci. 2016, 99, 7411–7421. [Google Scholar] [CrossRef] [Green Version]
- Stangaferro, M.L.; Wijma, R.; Caixeta, L.S.; Al-Abri, M.A.; Giordano, J.O. Use of rumination and activity monitoring for the identification of dairy cows with health disorders: Part III. Metritis. J. Dairy Sci. 2016, 99, 7422–7433. [Google Scholar] [CrossRef] [PubMed] [Green Version]
- Shalloo, L.; Cromie, A.; McHugh, N. Effect of fertility on the economics of pasture-based dairy systems. Animal 2014, 8, 222–231. [Google Scholar] [CrossRef] [PubMed] [Green Version]
- Dolecheck, K.A.; Heersche, G.; Bewley, J.M. Retention payoff–based cost per day open regression equations: Application in a user-friendly decision support tool for investment analysis of automated estrus detection technologies. J. Dairy Sci. 2016, 99, 10182–10193. [Google Scholar] [CrossRef] [PubMed]
- Kerbrat, S.; Disenhaus, C. A proposition for an updated behavioural characterisation of the oestrus period in dairy cows. Appl. Anim. Behav. Sci. 2004, 87, 223–238. [Google Scholar] [CrossRef]
- Mayo, L.M.; Silvia, W.J.; Ray, D.L.; Jones, B.W.; Stone, A.E.; Tsai, I.C.; Clark, J.D.; Bewley, J.M.; Heersche, G. Automated estrous detection using multiple commercial precision dairy monitoring technologies in synchronized dairy cows. J. Dairy Sci. 2019, 102, 2645–2656. [Google Scholar] [CrossRef]
- Allen, J.D.; Hall, L.W.; Collier, R.J.; Smith, J.F. Effect of core body temperature, time of day, and climate conditions on behavioral patterns of lactating dairy cows experiencing mild to moderate heat stress. J. Dairy Sci. 2015, 98, 118–127. [Google Scholar] [CrossRef] [PubMed] [Green Version]
- Herbut, P.; Angrecka, S. The effect of heat stress on time spent lying by cows in a housing system. Ann. Anim. Sci. 2018, 18, 825–833. [Google Scholar] [CrossRef] [Green Version]
- Webster, J.R.; Stewart, M.; Rogers, A.R.; Verkerk, G.A. Assessment of welfare from physiological and behavioural responses of New Zealand dairy cows exposed to cold and wet conditions. Anim. Welf. 2008, 17, 19–26. [Google Scholar]
- Fogsgaard, K.K.; Bennedsgaard, T.W.; Herskin, M.S. Behavioral changes in freestall-housed dairy cows with naturally occurring clinical mastitis. J. Dairy Sci. 2015, 98, 1730–1738. [Google Scholar] [CrossRef] [Green Version]
- Beer, G.; Alsaaod, M.; Starke, A.; Schuepbach-Regula, G.; Müller, H.; Kohler, P.; Steiner, A. Use of Extended Characteristics of Locomotion and Feeding Behavior for Automated Identification of Lame Dairy Cows. PLoS ONE 2016, 11, e0155796. [Google Scholar] [CrossRef] [Green Version]
- Weigele, H.C.; Gygax, L.; Steiner, A.; Wechsler, B.; Burla, J.B. Moderate lameness leads to marked behavioral changes in dairy cows. J. Dairy Sci. 2018, 101, 2370–2382. [Google Scholar] [CrossRef] [PubMed] [Green Version]
- Reith, S.; Hoy, S. Relationship between daily rumination time and estrus of dairy cows. J. Dairy Sci. 2012, 95, 6416–6420. [Google Scholar] [CrossRef] [PubMed]
- Soriani, N.; Panella, G.; Calamari, L. Rumination time during the summer season and its relationships with metabolic conditions and milk production. J. Dairy Sci. 2013, 96, 5082–5094. [Google Scholar] [CrossRef] [Green Version]
- Barker, Z.E.; Vázquez Diosdado, J.A.; Codling, E.A.; Bell, N.J.; Hodges, H.R.; Croft, D.P.; Amory, J.R. Use of novel sensors combining local positioning and acceleration to measure feeding behavior differences associated with lameness in dairy cattle. J. Dairy Sci. 2018, 101, 6310–6321. [Google Scholar] [CrossRef] [Green Version]
- Borchers, M.R.; Chang, Y.M.; Tsai, I.C.; Wadsworth, B.A.; Bewley, J.M. A validation of technologies monitoring dairy cow feeding, ruminating, and lying behaviors. J. Dairy Sci. 2016, 99, 7458–7466. [Google Scholar] [CrossRef] [PubMed]
- Bikker, J.P.; van Laar, H.; Rump, P.; Doorenbos, J.; van Meurs, K.; Griffioen, G.M.; Dijkstra, J. Technical note: Evaluation of an ear-attached movement sensor to record cow feeding behavior and activity. J. Dairy Sci. 2014, 97, 2974–2979. [Google Scholar] [CrossRef] [PubMed]
- Benaissa, S.; Tuyttens, F.A.M.; Plets, D.; de Pessemier, T.; Trogh, J.; Tanghe, E.; Martens, L.; Vandaele, L.; Van Nuffel, A.; Joseph, W.; et al. On the use of on-cow accelerometers for the classification of behaviours in dairy barns. Res. Vet. Sci. 2019, 125, 425–433. [Google Scholar] [CrossRef] [PubMed] [Green Version]
- Hernandez-Mendo, O.; von Keyserlingk, M.A.G.; Veira, D.M.; Weary, D.M. Effects of Pasture on Lameness in Dairy Cows. J. Dairy Sci. 2007, 90, 1209–1214. [Google Scholar] [CrossRef]
- Flury, R.; Gygax, L. Daily patterns of synchrony in lying and feeding of cows: Quasi-natural state and (anti-) synchrony factors. Behav. Process. 2016, 133, 56–61. [Google Scholar] [CrossRef]
- Cardoso, C.S.; Hötzel, M.J.; Weary, D.M.; Robbins, J.A.; von Keyserlingk, M.A.G. Imagining the ideal dairy farm. J. Dairy Sci. 2016, 99, 1663–1671. [Google Scholar] [CrossRef] [Green Version]
- Smid, A.M.C.; Weary, D.M.; von Keyserlingk, M.A.G. The Influence of Different Types of Outdoor Access on Dairy Cattle Behavior. Front. Vet. Sci. 2020, 7, 257. [Google Scholar] [CrossRef]
- Van den Pol-van Dasselaar, A.; Hennessy, D.; Isselstein, J. Grazing of Dairy Cows in Europe—An In-Depth Analysis Based on the Perception of Grassland Experts. Sustainability 2020, 12, 1098. [Google Scholar] [CrossRef] [Green Version]
- Stygar, A.H.; Gómez, Y.; Berteselli, G.V.; Dalla Costa, E.; Canali, E.; Niemi, J.K.; Llonch, P.; Pastell, M. A Systematic Review on Commercially Available and Validated Sensor Technologies for Welfare Assessment of Dairy Cattle. Front. Vet. Sci. 2021, 8, 177. [Google Scholar] [CrossRef] [PubMed]
- Ambriz-Vilchis, V.; Jessop, N.S.; Fawcett, R.H.; Shaw, D.J.; Macrae, A.I. Comparison of rumination activity measured using rumination collars against direct visual observations and analysis of video recordings of dairy cows in commercial farm environments. J. Dairy Sci. 2015, 98, 1750–1758. [Google Scholar] [CrossRef] [Green Version]
- Elischer, M.F.; Arceo, M.E.; Karcher, E.L.; Siegford, J.M. Validating the accuracy of activity and rumination monitor data from dairy cows housed in a pasture-based automatic milking system. J. Dairy Sci. 2013, 96, 6412–6422. [Google Scholar] [CrossRef] [PubMed]
- French, P.; O’Brien, B.; Shalloo, L. Development and adoption of new technologies to increase the efficiency and sustainability of pasture-based systems. Anim. Prod. Sci. 2015, 55, 931–935. [Google Scholar] [CrossRef]
- Edmonson, A.J.; Lean, I.J.; Weaver, L.D.; Farver, T.; Webster, G. A Body Condition Scoring Chart for Holstein Dairy Cows. J. Dairy Sci. 1989, 72, 68–78. [Google Scholar] [CrossRef]
- Metzner, M.; Heuwieser, W.; Klee, W. Die Beurteilung der Körperkondition (Body condition scoring) im Herdenmanagement. Prakt. Tierarzt 1993, 74, 991–998. [Google Scholar]
- Martiskainen, P.; Järvinen, M.; Skön, J.P.; Tiirikainen, J.; Kolehmainen, M.; Mononen, J. Cow behaviour pattern recognition using a three-dimensional accelerometer and support vector machines. Appl. Anim. Behav. Sci. 2009, 119, 32–38. [Google Scholar] [CrossRef]
- Reiter, S.; Sattlecker, G.; Lidauer, L.; Kickinger, F.; Öhlschuster, M.; Auer, W.; Schweinzer, V.; Klein-Jöbstl, D.; Drillich, M.; Iwersen, M. Evaluation of an ear-tag-based accelerometer for monitoring rumination in dairy cows. J. Dairy Sci. 2018, 101, 3398–3411. [Google Scholar] [CrossRef] [Green Version]
- Werner, J.; Leso, L.; Umstatter, C.; Niederhauser, J.; Kennedy, E.; Geoghegan, A.; Shalloo, L.; Schick, M.; O’Brien, B. Evaluation of the RumiWatchSystem for measuring grazing behaviour of cows-ScienceDirect. J. Neurosci. Methods 2018, 300, 138–146. [Google Scholar] [CrossRef]
- Bersch, S.D.; Azzi, D.; Khusainov, R.; Achumba, I.E.; Ries, J. Sensor Data Acquisition and Processing Parameters for Human Activity Classification. Sensors 2014, 14, 4239–4270. [Google Scholar] [CrossRef] [Green Version]
- Figo, D.; Diniz, P.C.; Ferreira, D.R.; Cardoso, J.M.P. Preprocessing techniques for context recognition from accelerometer data. Pers. Ubiquitous Comput. 2010, 14, 645–662. [Google Scholar] [CrossRef]
- Vázquez Diosdado, J.A.; Barker, Z.E.; Hodges, H.R.; Amory, J.R.; Croft, D.P.; Bell, N.J.; Codling, E.A. Classification of behaviour in housed dairy cows using an accelerometer-based activity monitoring system. Anim. Biotelem. 2015, 3, 15. [Google Scholar] [CrossRef] [Green Version]
- Rahman, A.; Smith, D.V.; Little, B.; Ingham, A.B.; Greenwood, P.L.; Bishop-Hurley, G.J. Cattle behaviour classification from collar, halter, and ear tag sensors. Inf. Process. Agric. 2018, 5, 124–133. [Google Scholar] [CrossRef]
- Tolkamp, B.J.; Kyriazakis, I. To split behaviour into bouts, log-transform the intervals. Anim. Behav. 1999, 57, 807–817. [Google Scholar] [CrossRef] [Green Version]
- Wood, S.N. Fast stable restricted maximum likelihood and marginal likelihood estimation of semiparametric generalized linear models. J. R. Stat. Soc. Ser. B Stat. Methodol. 2011, 73, 3–36. [Google Scholar] [CrossRef] [Green Version]
- Chambers, J.M.; Hastie, T. (Eds.) Statistical Models in S; Wadsworth & Brooks/Cole Computer Science Series; Wadsworth & Brooks/Cole Advanced Books & Software: Pacific Grove, CA, USA, 1992. [Google Scholar]
- Benjamini, Y.; Yekutieli, D. The control of the false discovery rate in multiple testing under dependency. Ann. Stat. 2001, 29, 1165–1188. [Google Scholar] [CrossRef]
- Fox, J.; Weisberg, S. An R Companion to Applied Regression; SAGE Publications: New York, NY, USA, 2018. [Google Scholar]
- Royston, P. Remark AS R94: A Remark on Algorithm AS 181: The W-test for Normality. J. R. Stat. Soc. Ser. C Appl. Stat. 1995, 44, 547–551. [Google Scholar] [CrossRef]
- Haladjian, J.; Haug, J.; Nüske, S.; Bruegge, B. A Wearable Sensor System for Lameness Detection in Dairy Cattle. Multimodal Technol. Interact. 2018, 2, 27. [Google Scholar] [CrossRef] [Green Version]
- Spink, A.; Cresswell, B.; Kölzsch, A.; Langevelde, F.V.; Neefjes, M.; Noldus, L.P.J.J.; Oeveren, H.V.; Prins, H.H.T.; Wal, T.V.D.; Weerd, N.D.; et al. Animal behaviour analysis with GPS and 3D accelerometers. In Proceedings of the 6th European Conference on Precision Livestock Farming, Leuven, Belgium, 10–12 September 2013; pp. 229–239. [Google Scholar]
- González, L.A.; Bishop-Hurley, G.J.; Handcock, R.N.; Crossman, C. Behavioral classification of data from collars containing motion sensors in grazing cattle. Comput. Electron. Agric. 2015, 110, 91–102. [Google Scholar] [CrossRef]
- Niazi, A.H.; Yazdansepas, D.; Gay, J.L.; Maier, F.W.; Ramaswamy, L.; Rasheed, K.; Buman, M. Statistical analysis of window sizes and sampling rates in human activity recognition. In Proceedings of the 10th International Conference on Health Informatics, Proceedings, Lisbon, Portugal, 17–18 July 2017; pp. 319–325. [Google Scholar] [CrossRef]
- Twomey, N.; Diethe, T.; Fafoutis, X.; Elsts, A.; McConville, R.; Flach, P.; Craddock, I. A Comprehensive Study of Activity Recognition Using Accelerometers. Informatics 2018, 5, 27. [Google Scholar] [CrossRef] [Green Version]
- Walton, E.; Casey, C.; Mitsch, J.; Vázquez-Diosdado, J.A.; Yan, J.; Dottorini, T.; Ellis, K.A.; Winterlich, A.; Kaler, J. Evaluation of sampling frequency, window size and sensor position for classification of sheep behaviour. R. Soc. Open Sci. 2018, 5, 171442. [Google Scholar] [CrossRef] [PubMed] [Green Version]
- Alsaaod, M.; Niederhauser, J.J.; Beer, G.; Zehner, N.; Schuepbach-Regula, G.; Steiner, A. Development and validation of a novel pedometer algorithm to quantify extended characteristics of the locomotor behavior of dairy cows. J. Dairy Sci. 2015, 98, 6236–6242. [Google Scholar] [CrossRef] [Green Version]
- Bouchon, M.; Bach, A.; Meunier, B.; Ternman, E.; Van Reenen, K.; Veissier, I.; Munksgaard, L. A Checklist to Validate Sensor Output for the Recording of Cattle Behaviour; PUBLISSO: Cologne, Germany, 2021. [Google Scholar] [CrossRef]
- Nielsen, P.P. Automatic registration of grazing behaviour in dairy cows using 3D activity loggers. Appl. Anim. Behav. Sci. 2013, 148, 179–184. [Google Scholar] [CrossRef]
- Dehghani, A.; Glatard, T.; Shihab, E. Subject Cross Validation in Human Activity Recognition. arXiv 2019, arXiv:1904.02666. [Google Scholar]
- Kok, A.; van Knegsel, A.T.M.; van Middelaar, C.E.; Hogeveen, H.; Kemp, B.; de Boer, I.J.M. Technical note: Validation of sensor-recorded lying bouts in lactating dairy cows using a 2-sensor approach. J. Dairy Sci. 2015, 98, 7911–7916. [Google Scholar] [CrossRef] [Green Version]
- Krohn, C.C.; Munksgaard, L. Behaviour of dairy cows kept in extensive (loose housing/pasture) or intensive (tie stall) environments II. Lying and lying-down behaviour. Appl. Anim. Behav. Sci. 1993, 37, 1–16. [Google Scholar] [CrossRef]
- Molfino, J.; Clark, C.E.F.; Kerrisk, K.L.; García, S.C. Evaluation of an activity and rumination monitor in dairy cattle grazing two types of forages. Anim. Prod. Sci. 2017, 57, 1557–1562. [Google Scholar] [CrossRef]
- Ledgerwood, D.N.; Winckler, C.; Tucker, C.B. Evaluation of data loggers, sampling intervals, and editing techniques for measuring the lying behavior of dairy cattle. J. Dairy Sci. 2010, 93, 5129–5139. [Google Scholar] [CrossRef]
- Black, R.A.; Krawczel, P.D. A Case Study of Behaviour and Performance of Confined or Pastured Cows during the Dry Period. Anim. Open Access J. 2016, 6, 41. [Google Scholar] [CrossRef] [Green Version]
- Legrand, A.L.; von Keyserlingk, M.a.G.; Weary, D.M. Preference and usage of pasture versus free-stall housing by lactating dairy cattle. J. Dairy Sci. 2009, 92, 3651–3658. [Google Scholar] [CrossRef] [Green Version]
- Schirmann, K.; Chapinal, N.; Weary, D.M.; Heuwieser, W.; von Keyserlingk, M.A.G. Short-term effects of regrouping on behavior of prepartum dairy cows. J. Dairy Sci. 2011, 94, 2312–2319. [Google Scholar] [CrossRef]
- Miguel-Pacheco, G.G.; Kaler, J.; Remnant, J.; Cheyne, L.; Abbott, C.; French, A.P.; Pridmore, T.P.; Huxley, J.N. Behavioural changes in dairy cows with lameness in an automatic milking system. Appl. Anim. Behav. Sci. 2014, 150, 1–8. [Google Scholar] [CrossRef]
- Prendiville, R.; Lewis, E.; Pierce, K.M.; Buckley, F. Comparative grazing behavior of lactating Holstein-Friesian, Jersey, and Jersey × Holstein-Friesian dairy cows and its association with intake capacity and production efficiency. J. Dairy Sci. 2010, 93, 764–774. [Google Scholar] [CrossRef] [PubMed] [Green Version]
- Herbut, P.; Angrecka, S. Relationship between THI level and dairy cows’ behaviour during summer period. Ital. J. Anim. Sci. 2018, 17, 226–233. [Google Scholar] [CrossRef] [Green Version]
- Winckler, C.; Tucker, C.B.; Weary, D.M. Effects of under- and overstocking freestalls on dairy cattle behaviour. Appl. Anim. Behav. Sci. 2015, 170, 14–19. [Google Scholar] [CrossRef]
- Atzori, L.; Iera, A.; Morabito, G. The Internet of Things: A survey. Comput. Netw. 2010, 54, 2787–2805. [Google Scholar] [CrossRef]
- Gubbi, J.; Buyya, R.; Marusic, S.; Palaniswami, M. Internet of Things (IoT): A vision, architectural elements, and future directions. Future Gener. Comput. Syst. 2013, 29, 1645–1660. [Google Scholar] [CrossRef] [Green Version]
- Rath, D.K.; Kumar, A. A Primer on Internet of Things Ecosystem and 5G Networks. In Proceedings of the 2018 International Conference on Information Technology, Hong Kong, China, 29–31 December 2018; pp. 233–238. [Google Scholar] [CrossRef]
- Kaur, N.; Sood, S.K.; Verma, P. Cloud resource management using 3Vs of Internet of Big data streams. Computing 2020, 102, 1463–1485. [Google Scholar] [CrossRef]
- Mineraud, J.; Mazhelis, O.; Su, X.; Tarkoma, S. A gap analysis of Internet-of-Things platforms. Comput. Commun. 2016, 89–90, 5–16. [Google Scholar] [CrossRef] [Green Version]
- Heintz, B.; Chandra, A.; Sitaraman, R.K. Optimizing Grouped Aggregation in Geo-Distributed Streaming Analytics. In Proceedings of the 24th International Symposium on High-Performance Parallel and Distributed Computing, Portland, OR, USA, 15–19 June 2015; pp. 133–144. [Google Scholar] [CrossRef]
- Chandra, A.; Heintz, B.; Sitaraman, R. Optimizing Geo-Distributed Streaming Analytics. In Encyclopedia of Big Data Technologies; Sakr, S., Zomaya, A., Eds.; Springer International Publishing: Cham, Swizterland, 2018; pp. 1–5. [Google Scholar]
Farm 1 | Farm 2 | |
---|---|---|
Grasses (%) | 64 | 30 |
- Lolium perenne | 47 | 24 |
- Poa pratensis | 9 | 5 |
- Festuca pratensis | 8 | 1 |
- Poa trivialis | <1 | <1 |
Legumes (%) | 36 | 70 |
- Trifolium repens | 36 | 70 |
Herbs (%) | 3 | 2 |
- Plantago major | 2 | 1 |
- Taraxacum sect. Ruderalis | <1 | <1 |
- Bellis perennis | <1 | <1 |
Behavior | Definition |
---|---|
Lying | The body of the animal is not supported by any limb. The sternum and/or the belly are/is in contact with the ground. The limbs are bent or stretched out. |
Lying down | The transition from standing/walking to lying. From bending one forelimb to completely lying. |
Standing up | The transition from lying to standing/walking. From stretching the shoulders to standing on four limbs/walking. |
Lying bout | Time between a lying down and a standing up event. |
Standing - In the cubicle; - In the alley; - At the feeding table; - In the feeder. | The body of the animal is supported by at least three limbs: - At least two feet are located in the cubicle; - At least three feet are located in the alley; - The head is above the feeding table; - All four feet are located within the area of the feeder. |
Walking | The animal moves forward or backwards at walking pace and makes two or more consecutive steps in one direction. |
Grazing | The animal bites off grass, chews and swallows it and moves forward with a lowered head. From the first grip of grass to the lifting of the head higher than the carpal joint. |
Feeding | The muzzle of the animal is located beneath the lower margin of the feeding fence and in the feed. |
Chewing | The animal moves its lower jaw in a grinding movement without having regurgitated before. |
Ruminating | The animal regurgitates food bolus, chews and swallows it. From regurgitating the first bolus to swallowing the last bolus. |
Drinking | The muzzle of the animal is located below the outer margin of the trough consuming water. |
Other | Social, comfort, exploration and fly repellent behavior. |
Idle time | The animal is not visible in the video image or covered by another animal. |
Classifier | Hyperparameters |
---|---|
Random Forest | Number of trees: 95 Criterion: Gini (calculates the probability of a specific feature classified incorrectly when selected randomly) Splitter: choose the best split at each node Maximum depth of tree: 25 Minimum number of samples required to split an internal node: 2 Minimum number of samples required to be a leaf node: 1 Maximum number of features used at each split: 6 |
Decision Tree | Criterion: Gini Maximum depth of the tree: 5 Minimum number of samples required to split an internal node: 2 Minimum number of samples required to be a leaf node: 1 |
Support Vector Machine | Kernel: Radial Basis Function—RBF Regularisation parameter: 10 Kernel Coefficient (gamma): Scale |
Naive Bayes | Type: Gaussian |
Amount of Instances | Instances (%) | |
---|---|---|
Grazing | 778,867 | 51.0 |
Lying | 491,522 | 32.2 |
Walking | 116,175 | 7.6 |
Standing | 139,707 | 9.2 |
Total | 1,526,271 | 100.0 |
Farm | 1 | 2 | 3 | ||
---|---|---|---|---|---|
Location | Pasture | Pasture | Barn | Barn | |
Total (h) | 106.0 | 132.7 | 51.4 | 186.2 | |
Round 1 | Day 1 (h) (no. of cows) | 14.4 (3) | 32.2 (11) | 23.3 (10) | 20.2 (4) |
Day 2 (h) (no. of cows) | 27.5 (5) | 44.8 (11) | 25.9 (10) | 41.2 (7) | |
Day 3 (h) (no. of cows) | - | 55.7 (10) | 2.2 (3) | 65.7 (8) | |
Day 4 (h) (no. of cows) | - | - | - | 59.1 (7) | |
Round 2 | Day 1 (h) (no. of cows) | 36.1 (6) | - | - | - |
Day 2 (h) (no. of cows) | 28.0 (6) | - | - | - |
Model 1 | Model 2 | |
---|---|---|
Classifier | Random Forest | Random Forest |
Window size | 5 s | 5 s |
Feature set | 24 features | 36 features |
This model is predicted to be sensor orientation sensitive | This model is known to be insensitive to sensor orientation |
Model 1 (%) | Model 2 (%) | ||
---|---|---|---|
Train-valid accuracy | Mean | 95.8 | 92.2 |
SD | 0.5 | 0.8 | |
Test accuracy | Mean | 88.7 | 92.0 |
SD | 5.6 | 2.8 |
Model 1 (%) | Model 2 (%) | ||
---|---|---|---|
Train-cross accuracy | Mean | 95.7 | 92.1 |
SD | 0.5 | 0.7 | |
Test accuracy | Mean | 73.9 | 91.1 |
SD | 20.8 | 4.3 |
Farm 1 | Farm 2 | Farm 3 | |
---|---|---|---|
lying time/d (h) | 12.3 (±0.8) | 12.2 (±0.6) | 15.6 (±1.3) |
lying time daytime (h) | 4.8 (±0.6) | 6.2 (±0.5) | 8.2 (±0.6) |
lying time nighttime (h) | 7.1 (±1.9) | 6.8 (±1.3) | 7.8 (±1.0) |
Our Model | 1 | 2 | 3 | 4 | ||
---|---|---|---|---|---|---|
Husbandry system | Pasture | Barn | Barn | Barn | Pasture | Pasture |
Definition lying behavior | 1 e | 2 | 1 e | 3 | 3 | |
Sensor(s) | Accelerometer + Magnetometer + Gyroscope | Accelerometer | Accelerometer | Accelerometer | Accelerometer + GPS | |
Sensor position | Lower neck | Top of the neck | Top of the neck | Top of the neck | Top of the neck | |
Training data | One farm | One farm | One farm | - | One farm | |
Evaluation data | Same farm + two others | Same farm | Same farm | One farm | Same farm | |
Sensitivity | 95.6% | 80% | 55.4–92.9% | 77% | 86.3% | |
Specificity | 80.1% | - | - | 99% | 94.8% | |
Precision | 80.5% | 83% | 85.4–96.6% | 93% | - | |
Accuracy | 93.1% | 81.4% | 84 % | - | - | 92.5% |
Publisher’s Note: MDPI stays neutral with regard to jurisdictional claims in published maps and institutional affiliations. |
© 2021 by the authors. Licensee MDPI, Basel, Switzerland. This article is an open access article distributed under the terms and conditions of the Creative Commons Attribution (CC BY) license (https://creativecommons.org/licenses/by/4.0/).
Share and Cite
Schmeling, L.; Elmamooz, G.; Hoang, P.T.; Kozar, A.; Nicklas, D.; Sünkel, M.; Thurner, S.; Rauch, E. Training and Validating a Machine Learning Model for the Sensor-Based Monitoring of Lying Behavior in Dairy Cows on Pasture and in the Barn. Animals 2021, 11, 2660. https://doi.org/10.3390/ani11092660
Schmeling L, Elmamooz G, Hoang PT, Kozar A, Nicklas D, Sünkel M, Thurner S, Rauch E. Training and Validating a Machine Learning Model for the Sensor-Based Monitoring of Lying Behavior in Dairy Cows on Pasture and in the Barn. Animals. 2021; 11(9):2660. https://doi.org/10.3390/ani11092660
Chicago/Turabian StyleSchmeling, Lara, Golnaz Elmamooz, Phan Thai Hoang, Anastasiia Kozar, Daniela Nicklas, Michael Sünkel, Stefan Thurner, and Elke Rauch. 2021. "Training and Validating a Machine Learning Model for the Sensor-Based Monitoring of Lying Behavior in Dairy Cows on Pasture and in the Barn" Animals 11, no. 9: 2660. https://doi.org/10.3390/ani11092660
APA StyleSchmeling, L., Elmamooz, G., Hoang, P. T., Kozar, A., Nicklas, D., Sünkel, M., Thurner, S., & Rauch, E. (2021). Training and Validating a Machine Learning Model for the Sensor-Based Monitoring of Lying Behavior in Dairy Cows on Pasture and in the Barn. Animals, 11(9), 2660. https://doi.org/10.3390/ani11092660