Analysing behaviours can provide insight into the health and overall well-being of dairy cows. Automatic monitoring systems using e.g., accelerometers are becoming increasingly important to accurately quantify cows' behaviours as the herd size increases. The aim of this study is to automatically classify cows' behaviours by comparing leg- and neck-mounted accelerometers, and to study the effect of the sampling rate and the number of accelerometer axes logged on the classification performances. Lying, standing, and feeding behaviours of 16 different lactating dairy cows were logged for 6 h with 3D-accelerometers. The behaviours were simultaneously recorded using visual observation and video recordings as a reference. Different features were ...