Use of Extended Characteristics of Locomotion and Feeding Behavior for Automated Identification of Lame Dairy Cows

This study was carried out to detect differences in locomotion and feeding behavior in lame (group L; n = 41; gait score ≥ 2.5) and non-lame (group C; n = 12; gait score ≤ 2) multiparous Holstein cows in a cross-sectional study design. A model for automatic lameness detection was created, using data from accelerometers attached to the hind limbs and noseband sensors attached to the head. Each cow’s gait was videotaped and scored on a 5-point scale before and after a period of 3 consecutive days of behavioral data recording. The mean value of 3 independent experienced observers was taken as a definite gait score and considered to be the gold standard. For statistical analysis, data from the noseband sensor and one of two accelerometers per cow (randomly selected) of 2 out of 3 randomly selected days was used. For comparison between group L and group C, the T-test, the Aspin-Welch Test and the Wilcoxon Test were used. The sensitivity and specificity for lameness detection was determined with logistic regression and ROC-analysis. Group L compared to group C had significantly lower eating and ruminating time, fewer eating chews, ruminating chews and ruminating boluses, longer lying time and lying bout duration, lower standing time, fewer standing and walking bouts, fewer, slower and shorter strides and a lower walking speed. The model considering the number of standing bouts and walking speed was the best predictor of cows being lame with a sensitivity of 90.2% and specificity of 91.7%. Sensitivity and specificity of the lameness detection model were considered to be very high, even without the use of halter data. It was concluded that under the conditions of the study farm, accelerometer data were suitable for accurately distinguishing between lame and non-lame dairy cows, even in cases of slight lameness with a gait score of 2.5.


Introduction
Lameness in dairy cows is an expression of pain [1,2] due to pathologies involving the locomotor apparatus. It causes high economic losses mainly due to decrease of milk yield and reduced fertility [3,4]. The prevalence of lameness in different countries is reported as ranging from 5.1% in Sweden to 54.8% in the North-East of the United States [5][6][7][8][9][10].
Because of the high prevalence of lameness, its devastating impact on animal welfare and economics, and due to the poor recognition of lame cows by farmers [11][12][13], various studies focused on automatic lameness detection. The accuracy of weighing platforms [14,15], accelerometers [16][17][18], combinations of weighing platforms and accelerometers [19][20][21] or automated video analysis [22,23] were investigated in these studies. However, all the systems presented in these studies are either only applicable on specific farms with corresponding equipment, need additional external data input (e.g. daily milk yield, concentrate intake), are very labor intensive, or lack accuracy [24].
Rutten et al. [24] reported that until now, automated lameness detection systems were only able to detect severe lameness, which farmers can easily detect by direct observation. A remarkable amount of economic loss (32%) is caused by foot disorders not associated with any lameness [4], and the prognosis of foot lesions was found to be negatively correlated with the duration of the disease process [13,33]. Therefore, Rutten et al. [24] suggested that automated lameness detection systems would ideally be designed to detect the disease early, allowing disorders of the locomotor system to be treated sooner.
Automated measurement systems have to be valid, reliable and specific on an extended set of behavioral variables as a prerequisite for high accuracy of lameness detection [34,35]. Rumi-Watch noseband sensors [36,37] and the RumiWatch three-dimensional (3D)-accelerometers [35] with the novel algorithm fulfill these criteria. The accelerometers allow for a differentiation of walking versus standing behavior with a high accuracy and further provide an accurate measurement of stride variables (i.e. stride distance and duration) [35]. These are unique features that-to the best of our knowledge-are not offered by any other accelerometer currently available on the market. Therefore, the goal of this study was to evaluate the suitability of the combination of the 3D-accelerometer and the noseband sensor (RumiWatch, ITIN + HOCH GmbH, Fütterungstechnik, Liestal, Switzerland, http://www.rumiwatch.ch/) as an automated lameness monitoring system for dairy cows kept in a cubicle barn. It was hypothesized that the high accuracy of the newly developed RumiWatch algorithms in detecting behavioral variables can be used to develop a lameness detection model with high sensitivity and specificity.

Ethical Standard
Cows were kept in a cubicle barn. The feeding and walking alleys were covered with plain asphalt and the cubicles (130 cm x 250 cm) with chalk dusted hard rubber mats (2 cm thick). Cows were fed a total mixed ratio ad libitum twice daily (containing grass-and corn-silage, hay, beet pulp, concentrate and minerals), and water was freely available in self-filling troughs. Cows were milked 3 times a day, in a 60-place rotary milking parlor. The mean milk yield per cow (305-days) was 10,492 kg ± 3,602 kg (mean ± SD; fat: 4.35% ± 0.76%; protein: 3.54% ± 0.39%). The cows' claws were routinely trimmed approximately 3 times a year by a professional claw-trimmer.

Experimental Procedure
Experimental procedures were conducted similarly for all cows as described in Fig 1. The cows always entered the study in groups of 4 cows. These groups are herein after referred to as "study groups". Fifteen study groups successively entered the study over a time period of 11 months.
Selection day. At selection day (day -5), study animals were purposely selected by the first author from one of two high-yielding groups according to following selection criteria: At the time of selection, 1 cow per study group was not lame (numerical rating system (NRS) according to Flower and Weary [38] 2) and 3 were lame (NRS ! 2.5), whereas only cows that showed lameness located in one or both hind feet, were included in the study. The selection criteria for study animals were: daily milk yield > 25kg in the previous week, not pregnant for longer than 6 months and parity 2 to 5. Cows were not included if suspected of any systemic disease during clinical examination, if any anti-inflammatory drugs had been administered within 28 days prior to selection, or if they were within the withdrawal period for any antibiotics. Corresponding data were retrieved from the herd management program (HERDE 5.8, dsp-Argrosoft GmbH, Ketzin/Havel, Germany, http://www.dsp-agrosoft.de/). Each cow's gait was video recorded with a digital camera (Nikon Coolpix L830, Nikon Corporation, Tokyo, Japan, http://www.nikon.com/), and a clinical examination, including estimation of body condition score (BCS), body weight (BW) and measurement of withers height (WH), was performed in the catching feeding fence.
Adaptation period. At day -4, each cow included in the study was equipped with 2 3Daccelerometers to each hind limb, attached proximal to the fetlock joint and one halter including a noseband sensor (accelerometer and halter = RumiWatch units = RWU) as described by Alsaaod et al. [35] and Ruuska et al. [37], respectively. Thus, cows were familiarized with the RWU for at least 3 days. At day -3 and day -1, video recordings of each cow's gait were made. Recording period. The recording period lasted for 3 days from day 1 to day 3. RWU were checked daily for proper function and were replaced, if necessary. Each replacement of RWU took place in the milking parlor in order not to move the animals additionally. The farm staff was instructed not to unnecessarily manipulate study cows (e.g. claw trimming during recording period, barn group changing). In order to detect heat, the paper based heat table used by the farm staff was checked. In addition, the first author at least once a day directly observed whether cows showed any signs of heat or systemic disease. Once daily, cows were gait scored to detect any extraordinary variation of lameness during the recording period.
Post-recording period. At day 4, video recordings of the cow's gait were performed, as well as a second clinical examination, including BCS, BW and WH. RWU were detached and data were saved. The following day (day 5), a thorough examination of the feet was performed in the claw trimming chute.

Data Collection
Clinical examination. All organ systems were clinically examined according to Dirksen [39] at day -5 and day 4. The cows were not considered healthy in presence of: urine ketone ! ++ Ketostix, (Bayer AG, Leverkusen, Germany), rectal temperature (RT) > 39.5°C, lesions proximal to the feet causing lameness, lameness located in the front limbs, swollen and painful udder, purulent vaginal discharge, gastrointestinal disorders, cardiac murmurs, severe infection of respiratory tract or nervous disorders. If any cow was considered not to be healthy during any of the research periods, it was excluded from the experiment.
BW was estimated using a measuring tape according to Yan et al. [40]. To estimate body condition, Edmondson's BCS [41] was determined. WH was measured at the level of the forelimb, using a meter ruler with a horizontal rod (including a spirit level). For BCS, BW and WH, the means of the 2 measurements were taken for further analysis. As BCS is recorded on a quarter point scale, the mean value was rounded up to the next quarter.
Lameness scoring. Cows were videotaped walking up and down an asphalt covered passageway (2 m x 30 m) in front of the camera. A handler walked immediately behind the cows, encouraging them to walk, if necessary. All video recordings were made 2 to 4 hours after milking at day -5, day -3, day -1 and day 4. The NRS of each cow was determined using video recordings of day -1 and day 4. Each cow's gait was independently rated by 3 experienced (at least one year of experience) observers (GB; MA; AdS), resulting in 6 lameness scores per cow. Video recordings were rated in random order, in order to blind observers. Recordings with scores deviating for more than 1 point among the 3 observers were independently rated once again. The mean of the 6 scores was calculated, rounded to the nearest 0.5 point and used for further analysis for the particular animal. Cows with an NRS 2 were classified as non-lame (group C) and cows with an NRS ! 2.5 as lame (group L). Group L was subdivided into three subgroups, which were defined as follows: mildly lame (group LI; NRS = 2.5-3), moderately lame (group LII; NRS = 3.5) and severely lame (group LIII; NRS ! 4).
Feeding and locomotion behavior. After the recording period was completed (day 4), raw data were transferred via USB cable from RWU to a personal computer using a specialized software (RumiWatch Manager 2, Version 2.1.0.0, ITIN + HOCH GmbH, Liestal, Switzerland, http://www.rumiwatch.ch/). Raw data were then converted into 1-hour-summaries (S1 Table) using the novel converter developed by Alsaaod et al. [35] for 3D-accelerometers and Zehner et al. [36] for noseband sensors, respectively, and then converted into 24-hour-summaries (S2 Table) using R-script (R-script "Summary Zeitperioden Zusammenfassung", Innoclever, Liestal, Switzerland, http://www.innoclever.ch/). R-script calculated the sum of all variables within one day, except for the variables, "chews per minute", "chews per bolus", "stride duration" and "stride distance", the means of which were weighted by "ruminating time", "bolus" and "strides", respectively. Weighted means were calculated using following formula: ðx n Þ whereas n = recorded day hour, a = variable of which the mean is to be weighted (e.g. stride distance) and x = variable which a is weighted by ("ruminating time", "bolus" or "strides").
Days during which cows showed symptoms of heat, were inseminated or obviously ill were discarded. If more than one day had to be discarded, we excluded the animal from the study. For statistical analysis, 24-hour-summaries of 2 days (if data of only 2 days was available) or 2 randomly selected days (if data of 3 days was available) and one randomly selected accelerometer, were merged in an Excel spreadsheet. Means and weighted means, respectively, of the two days were taken, resulting in averaged 24-hour-summaries (S3 Table). The variable "calculated walking speed" (walking speed calc ; m/s) was calculated by dividing "stride distance" (cm) by "stride duration" (ms) and multiplying by 10. The variable "lying bout duration" (min) was calculated by dividing the variable "lying time" (min) by the variable "lying bouts". Table 1 lists all RWU variables and the definitions used in this study; a "standing bout" is defined as a period, a cow is in upright position but not walking.

Analysis and Statistics
All statistics were performed by analyzing the averaged 24-hour-summaries of the two randomly selected days using NCSS8 (NCSS, LLC, Kaysville, Utah, USA, http://www.ncss.com/). Initially, a total of 15 study groups containing 15 healthy and 45 lame German Holstein cows entered the study. However, 7 cows had to be excluded, due to heat (n = 1), lameness treatment (n = 1), obvious illness (mastitis (n = 1), hock infection causing a not feet dependent lameness (n = 1)) and loss of RWU-data (n = 3). Therefore, averaged 24-hour-summaries of 12 healthy and 41 lame cows were included in the statistical analysis.
For comparison between group C and group L, the equal-variance T-test and the Aspin-Welch unequal-variance test for normally distributed variables with equal and unequal variance, respectively, were used. For not normally distributed variables the Wilcoxon rank sum test was used. To compare between different locomotion scores (group C, LI, LII, and LIII), the ANOVA and the Kruskal-Wallis test for normally and not normally distributed data, respectively, were used. ANOVA P-values were corrected for multiple testing using Bonferroni correction. The Kruskal-Wallis multiple-comparison Z-value test (Dunn's test) was used to determine statistically significant differences between groups, where the Z-value after Bonferroni correction was used. For all tests a P-value < 0.05 was considered as statistically significant.
All variables that were significantly different in the T-test, Aspin-Welch-test and Wilcoxon test, respectively, between lame and non-lame cows were analyzed for their ability to predict lameness using univariable logistic regression models. To determine sensitivity and specificity of the model prediction at a given cutoff, a receiver operating characteristic (ROC)-analysis was performed. Statistically significant variables were then included in a multivariable logistic regression model. Only variables not correlated with each other (Spearman correlation coefficient > -0.5 and < 0.5) were combined in the same model. Variables were eliminated from the model by stepwise backward selection. In addition, the ROC analyses before and after removing a variable were compared to determine how much the variable added to the sensitivity and specificity.

Cows
Cows from groups L and C did not differ (P > 0.05) in parity, BCS and BW. However, group L cows were older (P < 0.05), had more days in milk (DIM; P < 0.05), a lower daily milk yield (DMY; P < 0.01), a higher WH (P < 0.01) and a lower RT (P < 0.05) than cows from group C. Group L (n = 41) had a mean NRS of 3.35 ± 0.95 (mean ± SD), ranging from 2.5 to 4.5, while Group C (n = 12) had a NRS of 1.75 ± 0.34 (mean ± SD), ranging from 1 to 2. In group L, 19 cows were assigned to group LI (NRS = 2.5-3), 11 cows to group LII (NRS = 3.5) and 11 cows to group LIII (NRS ! 4). Detailed information is provided in Table 2.

Locomotion Behavior
Data of locomotion behavior of both groups are given in Table 3. Cows from group L spent more time lying down (784.38 ± 130.56 min/day vs. 679.65 ± 74.13 min/day; P < 0.01) and less time standing (618.13 ± 128.68 min/day vs. 718.97± 73.64 min/day; P < 0.01), than group C cows. Lying bout duration was longer in group L than in group C (90.06 ± 31.40 min/bout vs. 71.72 ± 18.30 min/bout; P < 0.05). Walking time was not significantly different, although group L cows tended to spend less time walking, than group C cows (37.85 ± 7.06 min vs. 41.74 ± 5.99 min; P < 0.1). We observed no difference in the number of lying bouts between group L and group C. However, the number of walking bouts (89.79 ± 16.97 vs. 111.17 ± 16.28 bouts per day; P < 0.001) and consequently the number of standing bouts (97.91 ± 17.73 vs. 119.63 ± 17.17 bouts per day; P < 0.001) was lower in group L than in group C. Likewise, the number of strides was lower in group L than group C (950.82 ± 176.15 vs. 1,075.17 ± 151.51; P < 0.05).
Cows from group L had longer lasting (P < 0.001) and shorter (P < 0.0001) strides than group C cows. Mean stride duration and stride distance was 1.97 ± 0.15 s and 1.06 ± 0.16 m, respectively, for group L cows, compared to 1.83 ± 0.84 s and 1.31 ± 0.14 m for group C cows, respectively. Consequently, the walking speed calc was lower in group L than in group C (0.54 ± 0.1 m/s vs. 0.72 ± 0.09 m/s; P < 0.0001).
Comparison of group C cows with groups LI-LIII, revealed differences for "stride distance" (P < 0.001) and "walking speed calc " (P < 0.0001), whereas the three lameness groups LI-LIII did not differ among each other (Fig 2A). Standing and walking bouts were different (P < 0.0001),  although not between group C and group LI, but between group C and groups LII and LIII ( Fig 2B).

Logistic Regression
Results of univariable logistic regression models are shown in Table 4. The multivariable logistic regression models with the best model fit are shown in Table 5. ROC-curves of the univariable models of "walking speed calc " and "standing bouts", the multivariable model of "walking speed calc " and "standing bouts" and the multivariable model of "walking speed calc ", "standing bouts" and "eating time" are depicted in Fig 3. Even though most univariable models show a significant association between the respective RWU-variable and lameness, they have sensitivity or specificity of less than 80%. The univariable models of "stride distance" and "walking speed calc ", however did account for 35% and 41% of the variation in the likelihood of a cow being lame (R² = 0.35; R² = 0.41), with an area under the ROC-curve (AUC) of 0.88 each, a sensitivity of 90.2% and 92.7%, respectively, and a specificity of 83.3%, each. The univariable models of the variables "standing bouts" and "walking bouts", had an AUC of 0.81 and 0.82, respectively, and an R-squared of 0.22 each, and high specificity (91.7%) in detecting lame cows, but a rather low sensitivity (65.9% and 73.2%, respectively).
When we combined different variables within one model we were able to achieve an additional increase in prediction quality. The model considering the variables "standing bouts" and Table 4. Results of univariable logistic regression and receiver operating characteristics analysis of a cow being lame (numerical rating system according to Flower and Weary [38], NRS ! 2.5) using different RumiWatch noseband sensor and accelerometer (RumiWatch, ITIN+HOCH GmbH, Fütterungstechnik, Liestal, Switzerland) variables as predictors on the cutoff value with highest sensitivity + specificity.  "walking speed calc " was the best predictor for cows being lame, when accelerometer variables only were used. It explains 61% of the variation in the likelihood of a cow being lame (R² = 0.61), with an AUC of 0.96, a sensitivity of 90.2% and a specificity of 91.7%. Adding additional variables only slightly improved the prediction. The model with highest accuracy in lameness prediction in our study animals is the model considering the data of "walking speed calc ", "standing bouts" and "eating time". It explains 62% of the variation in the likelihood of a cow being lame (R² = 0.62), with an AUC of 0.96, a sensitivity of 92.7% and a specificity of 91.7%.

Discussion
The results of this study show that lame cows differ in a broad set of behavioral variables from, non-lame cows. Cows from group L were identified with high sensitivity (90.2%) and specificity (91.7%) using data of 3D-accelerometers only. Additional use of the noseband sensor improved the model quality by a 2.5%-increase in sensitivity. The model taking data of the walking speed calc , the number of standing bouts and the eating time had the highest sensitivity and specificity.
In order to minimize the seasonal effects (environmental temperature, humidity, light), management (day time of milking, walking distance to milking parlor) and feeding upon the lame and non-lame cows, we selected all cows from one study group out of the same pen group and included 1 non-lame and 3 lame cows in each study group. As group L includes cows with different degrees of lameness, group L cows were expected and proven during this study to have higher variance for most measured variables (Table 3) than group C cows. Therefore, a higher sample size for lame than for non-lame cows was chosen [44].
Data analysis was performed with averaged 24 hour summaries of two days. As our goal was to evaluate the suitability of RWU for early lameness detection, we regarded 48 hours as a short enough time period. The use of longer time periods would delay the lameness detection as a day where a particular cow would have been detected as lame would have had less weight in Table 5. Using different RumiWatch noseband sensor and accelerometer (RumiWatch, ITIN+HOCH GmbH, Fütterungstechnik, Liestal, Switzerland) variable combinations as predictors of a cow being lame (numerical rating system according to Flower and Weary [38], NRS ! 2.5) in multivariable logistic regression and receiver operating characteristics analysis on different cutoff-values with corresponding sensitivity and specificity. Odds ratio, 95% confidence interval and P Wald of the variables within the model. Automated Lameness Detection in Dairy Cows the mean of multiple days. The use of only 24 hour summaries, on the other hand, would have been more prone to day to day variation and outlier days.

Model
We randomly selected one of the two 3D-accelerometers for data analysis in order to be close to real life practice conditions. The threshold of the NRS for group L was set at 2.5. This is purposely lower than in other studies (NRS ! 3 [25,45] or NRS > 3 [15,19]). Cows with impaired locomotion do not always show all traits of a particular locomotion score [46,47]. The score developed by Flower and Weary [38] allows the use of half-integer scores if a cow exceeds the traits of a particular score, but does not meet all of the following score. As our goal was to define a set of variables allowing for the detection of even slight lameness through early detection, we regarded a cow with an NRS of 2.5 as lame, because it met some of the NRS 3 criteria. In order to decrease prevalence of several claw lesions a previous study recommended claw treatment of cows with a locomotion score > 1 [48], using a similar scoring system [49]. We sought for an early detection of lameness, because foot lesions have a better prognosis, the earlier they are treated [13,33].
Comparing group L with group C revealed no differences concerning parity, BCS and BW. Differences between lame and non-lame cows in this study were evident for age, DIM, DMY, WH and RT. Because the main selection criterion was the presence or absence of lameness, these differences can be explained through selection bias for these variables. Differences were expected for DMY [50], are in the physiological range for RT, are small and therefore most likely not biologically relevant for age and WH and were inevitable due to farm management for DIM.
It is widely recognized that some foot pathologies are not associated with increasing locomotion score or lameness [4,5,10,[51][52][53]. Our results of the feet examination support these findings. Group C cows showed various foot disorders, primarily interdigital dermatitis and heel horn erosion which are usually not associated with lameness [4,54]. Therefore, automatic detection of foot disorders using accelerometers might be more difficult than automatic detection of lameness. However, since our goal was to automatically detect lameness (i.e. NRS ! 2.5) and not to automatically detect foot disorders, this hypothesis needs further proof in subsequent studies.
Lameness was significantly associated with a wide range of feeding and locomotoion variables. Lame cows spent less time feeding and were also found to eat faster [31,32], thus reducing time standing in order to minimize pain [32]. Our results support this hypothesis, as eating time and number of eating chews, as well as standing time, were significantly lower in lame cows. As a consequence, lame cows spent more time lying down also confirming results of previous studies [25,26,30].
The number of lying bouts did not differ between lame and non-lame cows, a result also found in other studies [21,25]. The fact that lame cows are less willing to rise, seems only to be reflected in lying time and lying bout duration. The number of standing bouts in our study is highly correlated (r = 0.98; P < 0.0001) with the number of walking bouts, as a new standing bout is counted, for every non-walking upright position after a walking bout (Table 1). To our knowledge, no other study investigated the effect of lameness on the number of walking bouts. In order to minimize the time in upright position, lame cows mainly have walking bouts with a specific purpose, for example to get to the next feeding place. This explains the difference in the number of walking and standing bouts between group C and group L. Regarding the large differences in the number of standing and walking bouts and the high specificity in the univariable logistic regression models, we conclude that these variables can be useful for automatically detecting lame cows, especially when they are combined with other accelerometer derived variables.
The difference in number of strides was significant, yet very small, not allowing for sufficient discrimination between lame and non-lame cows. Chapinal et al. [20] reported a similar situation regarding the number of steps in one study and no difference in number of steps at all in another study [19]. However, a direct comparison between the variable "strides" in our study and the variable "steps" in their studies is difficult because "stride" is narrowly defined as a forward or backward movement of the limb within a walking phase only [35]. The minor difference in our study might well exist, because every cow has to walk the same distance to the feeding fence and milking parlor (most strides are associated with milking [20]), requiring a minimal number of strides for each cow, regardless of the lameness status. Additionally, lame cows did take shorter strides requiring more strides to travel the same distance, similar to healthy cows on slippery floors [55]. Likewise, the walking time did not differ between lame cows and non-lame cows, because lame cows take longer to walk a given distance (e.g. milking parlor). Stride duration and walking speed calc were lower in group L, supporting this hypothesis. Our results of walking time are in accordance with Hassal et al. [56], who also reported no difference in walking time in cows held on pasture. In other studies, a significant difference in walking time was found between non-lame and lame cows [26,57]. However, one study [26] investigated estrus behavior in lame and healthy cows on pasture and in the other study [57], cows during estrus or diseased cows were not excluded. Therefore, a comparison is difficult.
Similar to our study, earlier research also showed that lame cows and cows with claw pathologies, respectively, had shorter strides [27,28,58], longer lasting strides [27] and a lower walking speed [19,[28][29][30]58]. Interestingly, the calculated walking speed in our study was a better predictor of a cow being lame, accounting for 41% of the variation (R 2 = 0.41) and an AUC of 0.88, than the walking speed assessed by video recordings in the study of Chapinal et al. [19], accounting for 22% of variation (R 2 = 0.22) and an AUC of 0.73, despite the less strict lameness definition in their study (NRS > 3 vs. ! 2.5). This may be explained by the fact that Chapinal et al. [19] measured the walking speed in an artificial setting (walking down an alley, while encouraged to walk by a person) while in our study, walking speed was calculated from variables that were collected throughout the whole recording period. Assessing mean daily walking speed using accelerometers is a practical and non-invasive method (i.e. no need to walk behind the cow to encourage walking). Our results suggest that walking speed measured by Rumi-Watch 3D-accelerometers is a promising variable for automated lameness detection.
Logistic regression results indicate that RumiWatch 3D-accelerometers alone provide a sufficient accuracy in predicting lameness in cows. To our knowledge this is the first lameness detection model with a sensitivity and a specificity over 90% using accelerometers only. The very high correlation of accelerometer variables with visual observation [35] did contribute to the high accuracy in lameness detection. In this study, we included cows with different degrees of lameness, and the model also performed well in the detection of cows with mild or moderate lameness. Because the additional use of the noseband sensor is more expensive, the data do not substantially improve the models, and eating time was not significant within the multivariable logistic regression model (Table 5), we do not a priori recommend the use of the predictive model including the variable eating time.
Animal behavior depends on management conditions. Therefore, our threshold values cannot be regarded as global standard values of the respective variables. Stride distance is known to differ on different floor types [28,59]. The number of strides and the lying time [20] and most likely the number of walking and standing bouts, the walking time and lying bout duration, depends on milking frequency, the milking system (i.e. automated milking system vs. milking parlor) and distance to the milking parlor. Moreover, we only included multiparous German Holstein cows in this study. Primiparous cows are more active than multiparous cows [60,61]. Often primiparous cows are not full-grown, possibly affecting stride distance [28,59]. Also the interactions with estrus and disease, presumably affecting sensitivity and specificity, respectively, were not investigated. Furthermore, the study was conducted in a cross-sectional study design, where behavioral parameters of non-lame cows were compared to those of cows with varying degrees of lameness. The results therefore merely capture the ability of the halters and accelerometers to distinguish between non-lame and lame cows at a given time. Due to the study design, one cannot make assumptions on how well the system performs in detecting changes in individual cows during the transition from non-lame to lame. Still, the results of this pilot study are very promising and show the potential of the RumiWatch system for lameness detection, warranting longitudinal studies on this topic, allowing identifying transition from a non-lame to a lame status.

Conclusions
The results of this study show that the RumiWatch 3D-accelerometers with the novel algorithm for detection of extended locomotion characteristics and noseband sensors are able to detect differences in behavior in lame and non-lame cows. Models accounting for two 3Daccelerometer variables only (walking speed calc , standing bouts) automatically identified lame cows (NRS ! 2.5) with great accuracy. We, therefore, conclude that the RumiWatch-system may be suitable for lameness detection, even of slight lameness. Management factors influence the behavior of dairy cows. Thus, a multicenter longitudinal study is needed to validate the results of our study in various farms under different management conditions and to capture transitions between different states of locomotion.
Supporting Information S1 Table. One-hour summaries.