{"status":"ok","message-type":"work","message-version":"1.0.0","message":{"indexed":{"date-parts":[[2026,6,4]],"date-time":"2026-06-04T21:39:48Z","timestamp":1780609188769,"version":"3.54.1"},"reference-count":36,"publisher":"MDPI AG","issue":"10","license":[{"start":{"date-parts":[[2021,10,15]],"date-time":"2021-10-15T00:00:00Z","timestamp":1634256000000},"content-version":"vor","delay-in-days":0,"URL":"https:\/\/creativecommons.org\/licenses\/by\/4.0\/"}],"funder":[{"DOI":"10.13039\/501100003500","name":"University of Padua","doi-asserted-by":"publisher","award":["DOR1904730"],"award-info":[{"award-number":["DOR1904730"]}],"id":[{"id":"10.13039\/501100003500","id-type":"DOI","asserted-by":"publisher"}]},{"name":"Unismart","award":["None"],"award-info":[{"award-number":["None"]}]}],"content-domain":{"domain":[],"crossmark-restriction":false},"short-container-title":["Animals"],"abstract":"<jats:p>The aim of the present study was to develop a model to identify posture and behavior from data collected by a triaxial accelerometer located on the left flank of dairy cows and evaluate its accuracy and precision. Twelve Italian Red-and-White lactating cows were equipped with an accelerometer and observed on average for 136 \u00b1 29 min per cow by two trained operators as a reference. The acceleration data were grouped in time windows of 8 s overlapping by 33.0%, for a total of 35,133 rows. For each row, 32 different features were extracted and used by machine learning algorithms for the classification of posture and behavior. To build up a predictive model, the dataset was split in training and testing datasets, characterized by 75.0 and 25.0% of the observations, respectively. Four algorithms were tested: Random Forest, K Nearest Neighbors, Extreme Boosting Algorithm (XGB), and Support Vector Machine. The XGB model showed the best accuracy (0.99) and Cohen\u2019s kappa (0.99) in predicting posture, whereas the Random Forest model had the highest overall accuracy in predicting behaviors (0.76), showing a balanced accuracy from 0.96 for resting to 0.77 for moving. Overall, very accurate detection of the posture and resting behavior were achieved.<\/jats:p>","DOI":"10.3390\/ani11102972","type":"journal-article","created":{"date-parts":[[2021,10,15]],"date-time":"2021-10-15T13:35:47Z","timestamp":1634304947000},"page":"2972","update-policy":"https:\/\/doi.org\/10.3390\/mdpi_crossmark_policy","source":"Crossref","is-referenced-by-count":52,"title":["Machine Learning to Detect Posture and Behavior in Dairy Cows: Information from an Accelerometer on the Animal\u2019s Left Flank"],"prefix":"10.3390","volume":"11","author":[{"given":"Paolo","family":"Balasso","sequence":"first","affiliation":[{"name":"Dipartimento di Medicina Animale, Produzioni e Salute, Universit\u00e0 degli Studi di Padova, 35020 Legnaro, Italy"}],"role":[{"vocabulary":"crossref","role":"author"}]},{"ORCID":"https:\/\/orcid.org\/0000-0003-2053-2664","authenticated-orcid":false,"given":"Giorgio","family":"Marchesini","sequence":"additional","affiliation":[{"name":"Dipartimento di Medicina Animale, Produzioni e Salute, Universit\u00e0 degli Studi di Padova, 35020 Legnaro, Italy"}],"role":[{"vocabulary":"crossref","role":"author"}]},{"given":"Nicola","family":"Ughelini","sequence":"additional","affiliation":[{"name":"Dipartimento di Medicina Animale, Produzioni e Salute, Universit\u00e0 degli Studi di Padova, 35020 Legnaro, Italy"}],"role":[{"vocabulary":"crossref","role":"author"}]},{"ORCID":"https:\/\/orcid.org\/0000-0003-0660-9637","authenticated-orcid":false,"given":"Lorenzo","family":"Serva","sequence":"additional","affiliation":[{"name":"Dipartimento di Medicina Animale, Produzioni e Salute, Universit\u00e0 degli Studi di Padova, 35020 Legnaro, Italy"}],"role":[{"vocabulary":"crossref","role":"author"}]},{"given":"Igino","family":"Andrighetto","sequence":"additional","affiliation":[{"name":"Dipartimento di Medicina Animale, Produzioni e Salute, Universit\u00e0 degli Studi di Padova, 35020 Legnaro, Italy"}],"role":[{"vocabulary":"crossref","role":"author"}]}],"member":"1968","published-online":{"date-parts":[[2021,10,15]]},"reference":[{"key":"ref_1","doi-asserted-by":"crossref","first-page":"2974","DOI":"10.3168\/jds.2013-7560","article-title":"Technical note: Evaluation of an ear-attached movement sensor to record cow feeding behavior and activity","volume":"97","author":"Bikker","year":"2014","journal-title":"J. Dairy Sci."},{"key":"ref_2","doi-asserted-by":"crossref","first-page":"11483","DOI":"10.3168\/jds.2019-16537","article-title":"Technical note: A novel approach to estimate dry matter intake of lactating dairy cows through multiple on-cow accelerometers","volume":"102","author":"Carpinelli","year":"2019","journal-title":"J. Dairy Sci."},{"key":"ref_3","doi-asserted-by":"crossref","first-page":"225","DOI":"10.1016\/j.livsci.2018.06.009","article-title":"Effects of axial and ceiling fans on environmental conditions, performance and rumination in beef cattle during the early fattening period","volume":"214","author":"Marchesini","year":"2018","journal-title":"Livest. Sci."},{"key":"ref_4","doi-asserted-by":"crossref","first-page":"31","DOI":"10.1016\/j.anifeedsci.2018.05.009","article-title":"Proposal and validation of new indexes to evaluate maize silage fermentative quality in lab-scale ensiling conditions through the use of a receiver operating characteristic analysis","volume":"242","author":"Andrighetto","year":"2018","journal-title":"Anim. Feed Sci. Tech."},{"key":"ref_5","doi-asserted-by":"crossref","first-page":"114421","DOI":"10.1016\/j.anifeedsci.2020.114421","article-title":"Effect of total mixed ration processing time on ration consistency and beef cattle performance during the early fattening period","volume":"262","author":"Marchesini","year":"2020","journal-title":"Anim. Feed Sci. Technol."},{"key":"ref_6","doi-asserted-by":"crossref","first-page":"417","DOI":"10.1007\/s00484-016-1222-z","article-title":"Monitoring cow activity and rumination time for an early detection of heat stress in dairy cow","volume":"61","author":"Abeni","year":"2017","journal-title":"Int. J. Biometeorol."},{"key":"ref_7","doi-asserted-by":"crossref","first-page":"7411","DOI":"10.3168\/jds.2016-10908","article-title":"Use of rumination and activity monitoring for the identification of dairy cows with health disorders: Part II. Mastitis","volume":"99","author":"Stangaferro","year":"2016","journal-title":"J. Dairy Sci."},{"key":"ref_8","doi-asserted-by":"crossref","first-page":"189","DOI":"10.20506\/rst.33.1.2273","article-title":"Precision livestock farming technologies for welfare management in intensive livestock systems","volume":"33","author":"Berckmans","year":"2014","journal-title":"Rev. Sci. Tech. OIE"},{"key":"ref_9","doi-asserted-by":"crossref","first-page":"339","DOI":"10.7120\/09627286.21.3.339","article-title":"Automated monitoring of behaviouralbased animal welfare indicators","volume":"21","author":"Rushen","year":"2012","journal-title":"Anim. Welf."},{"key":"ref_10","doi-asserted-by":"crossref","first-page":"41","DOI":"10.1016\/j.tvjl.2017.11.013","article-title":"Use of rumination and activity data as health status and performance indicators in beef cattle during the early fattening period","volume":"231","author":"Marchesini","year":"2018","journal-title":"Vet. J."},{"key":"ref_11","doi-asserted-by":"crossref","first-page":"105233","DOI":"10.1016\/j.compag.2020.105233","article-title":"Machine learning to detect behavioural anomalies in dairy cows under subacute ruminal acidosis","volume":"170","author":"Wagner","year":"2020","journal-title":"Comput. Electron. Agric."},{"key":"ref_12","doi-asserted-by":"crossref","first-page":"3722","DOI":"10.3168\/jds.2017-14025","article-title":"Invited Review: Learning From the future-A Vision for Dairy Farms and Cows in 2067","volume":"101","author":"Britt","year":"2018","journal-title":"J. Dairy Sci."},{"key":"ref_13","doi-asserted-by":"crossref","first-page":"7458","DOI":"10.3168\/jds.2015-10843","article-title":"A validation of technologies monitoring dairy cow feeding, ruminating, and lying behaviors","volume":"99","author":"Borchers","year":"2015","journal-title":"J. Dairy Sci."},{"key":"ref_14","doi-asserted-by":"crossref","first-page":"425","DOI":"10.1016\/j.rvsc.2017.10.005","article-title":"On the use of on-cow accelerometers for the classification of behaviours in dairy barns","volume":"125","author":"Benaissa","year":"2019","journal-title":"Res. Vet. Sci."},{"key":"ref_15","doi-asserted-by":"crossref","first-page":"10421","DOI":"10.3168\/jds.2018-14720","article-title":"Technical note: Evaluation of a triaxial accelerometer for monitoring selected behaviors in dairy calves","volume":"101","author":"Roland","year":"2018","journal-title":"J. Dairy Sci."},{"key":"ref_16","doi-asserted-by":"crossref","first-page":"6546","DOI":"10.3168\/jds.2012-5670","article-title":"Lying behavior of lactating dairy cows is influenced by lameness especially around feeding time","volume":"95","author":"Yunta","year":"2012","journal-title":"J. Dairy Sci."},{"key":"ref_17","doi-asserted-by":"crossref","first-page":"105179","DOI":"10.1016\/j.compag.2019.105179","article-title":"Development of a methodological framework for a robust prediction of the main behaviours of dairy cows using a combination of machine learning algorithms on accelerometer data","volume":"169","author":"Riaboff","year":"2020","journal-title":"Comput. Electron. Agric."},{"key":"ref_18","doi-asserted-by":"crossref","first-page":"32","DOI":"10.1016\/j.applanim.2009.03.005","article-title":"Cow behaviour pattern recognition using a three-dimensional accelerometer and support vector machines","volume":"119","author":"Martiskainen","year":"2009","journal-title":"Appl. Anim. Behav. Sci."},{"key":"ref_19","doi-asserted-by":"crossref","first-page":"91","DOI":"10.1016\/j.applanim.2016.05.026","article-title":"Using a three-axis accelerometer to identify and classify sheep behavior at pasture","volume":"181","author":"Alvarenga","year":"2016","journal-title":"Appl. Anim. Behav. Sci."},{"key":"ref_20","doi-asserted-by":"crossref","first-page":"1835","DOI":"10.1292\/jvms.19-0487","article-title":"Evaluation of ruminal motility in cattle by a bolus-type wireless sensor","volume":"81","author":"Arai","year":"2019","journal-title":"J. Vet. Med. Sci."},{"key":"ref_21","doi-asserted-by":"crossref","first-page":"170","DOI":"10.1016\/j.compag.2018.04.018","article-title":"Classification of sheep urination events using accelerometers to aid improved measurements of livestock contributions to nitrous oxide emissions","volume":"150","author":"Lush","year":"2018","journal-title":"Comput. Electron. Agric."},{"key":"ref_22","unstructured":"Reece, W.O. (2009). Functional Anatomy and Physiology of Domestic Animals, Blackwell Publishing."},{"key":"ref_23","doi-asserted-by":"crossref","first-page":"37","DOI":"10.1177\/001316446002000104","article-title":"A coefficient of agreement for nominal scales","volume":"20","author":"Cohen","year":"1960","journal-title":"Educ. Psychol. Meas."},{"key":"ref_24","doi-asserted-by":"crossref","unstructured":"Cortese, M., Br\u0161\u010di\u0107, M., Ughelini, N., Andrighetto, I., Contiero, B., and Marchesini, G. (2020). Effectiveness of Stocking Density Reduction on Mitigating Lameness in a Charolais Finishing Beef Cattle Farm. Animals, 10.","DOI":"10.3390\/ani10071147"},{"key":"ref_25","doi-asserted-by":"crossref","first-page":"15","DOI":"10.1186\/s40317-015-0045-8","article-title":"Codling, E.A. Classification of behaviour in housed dairy cows using an accelerometer- based activity monitoring system","volume":"3","author":"Barker","year":"2015","journal-title":"Anim. Biotelemet."},{"key":"ref_26","unstructured":"Dimitriadou, E., Hornik, K., Leisch, F., Meyer, D., and Weingessel, A. (2020, June 04). TU Wien. Rpackage Version 1.5\u201318. Misc Functions of the Department of Statistics (e1071). Available online: http:\/\/CRAN.R-project.org\/package=e1071."},{"key":"ref_27","first-page":"18","article-title":"Classification and regression by randomForest","volume":"2","author":"Liaw","year":"2002","journal-title":"R News."},{"key":"ref_28","unstructured":"Schliep, K., Hechenbichler, K., and Lizee, A. (2020, June 04). Package \u2018kknn\u2019. Available online: https:\/\/cran.r-project.org\/web\/packages\/kknn\/kknn.pdf."},{"key":"ref_29","doi-asserted-by":"crossref","unstructured":"Chen, T., and Guestrin, C. (2016, January 13\u201317). XGBoost: A Scalable Tree Boosting System. Proceedings of the 22nd SIGKDD Conference on Knowledge Discovery and Data Mining, San Francisco, CA, USA.","DOI":"10.1145\/2939672.2939785"},{"key":"ref_30","unstructured":"Hodnett, M., and Wiley, J.F. (2018). R Deep Learning Essentials: A Step-by-Step Guide to Building Deep Learning Models Using TensorFlow, Keras, and MXNet, Packt Publishing Ltd.. [2nd ed.]."},{"key":"ref_31","doi-asserted-by":"crossref","first-page":"404","DOI":"10.1093\/biomet\/26.4.404","article-title":"The use of confidence or fiducial limits illustrated in the case of the binomial","volume":"26","author":"Clopper","year":"1934","journal-title":"Biometrika"},{"key":"ref_32","doi-asserted-by":"crossref","first-page":"124","DOI":"10.1016\/j.compag.2017.01.021","article-title":"Development of a threshold-based classifier for real-time recognition of cow feeding and standing behavioural activities from accelerometer data","volume":"134","author":"Arcidiacono","year":"2017","journal-title":"Comput. Electron. Agric."},{"key":"ref_33","doi-asserted-by":"crossref","first-page":"4899","DOI":"10.2527\/jas.2012-5554","article-title":"Methodology for quantifying the behavioral activity of dairy cows in freestall barns","volume":"91","author":"Mattachini","year":"2013","journal-title":"J. Anim. Sci."},{"key":"ref_34","doi-asserted-by":"crossref","first-page":"3846","DOI":"10.3168\/jds.2019-17140","article-title":"Symposium review: The impact of management and facilities on cow culling rates","volume":"103","author":"Cook","year":"2020","journal-title":"J. Dairy Sci."},{"key":"ref_35","doi-asserted-by":"crossref","first-page":"8358","DOI":"10.3168\/jds.2017-12723","article-title":"Deviations in behavior and productivity data before diagnosis of health disorders in cows milked with an automated system","volume":"100","author":"King","year":"2017","journal-title":"J. Dairy Sci."},{"key":"ref_36","doi-asserted-by":"crossref","first-page":"61","DOI":"10.1016\/j.cvfa.2018.10.003","article-title":"Feeding behavior, feed space, and bunk design and management for adult dairy cattle","volume":"35","author":"DeVries","year":"2019","journal-title":"Vet. Clin. N. Am. Food Anim. Pract."}],"container-title":["Animals"],"original-title":[],"language":"en","link":[{"URL":"https:\/\/www.mdpi.com\/2076-2615\/11\/10\/2972\/pdf","content-type":"unspecified","content-version":"vor","intended-application":"similarity-checking"}],"deposited":{"date-parts":[[2025,10,11]],"date-time":"2025-10-11T07:15:31Z","timestamp":1760166931000},"score":1,"resource":{"primary":{"URL":"https:\/\/www.mdpi.com\/2076-2615\/11\/10\/2972"}},"subtitle":[],"short-title":[],"issued":{"date-parts":[[2021,10,15]]},"references-count":36,"journal-issue":{"issue":"10","published-online":{"date-parts":[[2021,10]]}},"alternative-id":["ani11102972"],"URL":"https:\/\/doi.org\/10.3390\/ani11102972","relation":{},"ISSN":["2076-2615"],"issn-type":[{"value":"2076-2615","type":"electronic"}],"subject":[],"published":{"date-parts":[[2021,10,15]]}}}