Next Article in Journal
Lamb Wave Detection for Structural Health Monitoring Using a ϕ-OTDR System
Next Article in Special Issue
Correlation Study between the Organic Compounds and Ripening Stages of Oil Palm Fruitlets Based on the Raman Spectra
Previous Article in Journal
Detection of a New Large Free Core Nutation Phase Jump
Previous Article in Special Issue
Development of a Lightweight Crop Disease Image Identification Model Based on Attentional Feature Fusion
 
 
Font Type:
Arial Georgia Verdana
Font Size:
Aa Aa Aa
Line Spacing:
Column Width:
Background:
Article

High Precision Classification of Resting and Eating Behaviors of Cattle by Using a Collar-Fitted Triaxial Accelerometer Sensor

by
Kim Margarette Corpuz Nogoy
1,2,†,
Sun-il Chon
1,†,
Ji-hwan Park
1,
Saraswathi Sivamani
1,
Dong-Hoon Lee
3,*,‡ and
Seong Ho Choi
2,*,‡
1
ThinkforBL Consultancy Services, Seoul 06236, Korea
2
Department of Animal Science, Chungbuk National University, Cheongju City 28644, Korea
3
Department of Biosystems Engineering, Chungbuk National University, Cheongju City 28644, Korea
*
Authors to whom correspondence should be addressed.
These authors contributed equally to this work.
These authors contributed equally as corresponding authors.
Sensors 2022, 22(16), 5961; https://doi.org/10.3390/s22165961
Submission received: 6 July 2022 / Revised: 5 August 2022 / Accepted: 8 August 2022 / Published: 9 August 2022
(This article belongs to the Special Issue AI-Based Sensors and Sensing Systems for Smart Agriculture)

Abstract

:
Cattle are less active than humans. Hence, it was hypothesized in this study that transmitting acceleration signals at a 1 min sampling interval to reduce storage load has the potential to improve the performance of motion sensors without affecting the precision of behavior classification. The behavior classification performance in terms of precision, sensitivity, and the F1-score of the 1 min serial datasets segmented in 3, 4, and 5 min window sizes based on nine algorithms were determined. The collar-fitted triaxial accelerometer sensor was attached on the right side of the neck of the two fattening Korean steers (age: 20 months) and the steers were observed for 6 h on day one, 10 h on day two, and 7 h on day three. The acceleration signals and visual observations were time synchronized and analyzed based on the objectives. The resting behavior was most correctly classified using the combination of a 4 min window size and the long short-term memory (LSTM) algorithm which resulted in 89% high precision, 81% high sensitivity, and 85% high F1-score. High classification performance (79% precision, 88% sensitivity, and 83% F1-score) was also obtained in classifying the eating behavior using the same classification method (4 min window size and an LSTM algorithm). The most poorly classified behavior was the active behavior. This study showed that the collar-fitted triaxial sensor measuring 1 min serial signals could be used as a tool for detecting the resting and eating behaviors of cattle in high precision by segmenting the acceleration signals in a 4 min window size and by using the LSTM classification algorithm.

1. Introduction

Research works about cattle behaviors reported that eating and ruminating behaviors are altered when diagnosed with metabolic diseases [1,2,3] or mastitis [4]. It was also reported that deviation of cattle from their normal behavior in terms of feeding affects milk production and reproduction, particularly in dairy cattle [3]. In addition, when dairy cattle are affected with metabolic diseases such as ketosis, the standing behavior of the animals is reduced [5] and lying behavior is increased [6]. Other activities of cattle such as reduced sleeping increased inflammatory responses of the animal [7] and the walking behavior, and the overall activity of cattle affected by lameness decreased [8]. Clearly, understanding the behaviors of the animals can lead to the advanced detection of health conditions of the cattle whether they are healthy or ill with the disease.
With the birth of artificial intelligence, agriculture in livestock production has seen large development. One of the many innovations is the use of smart computing technologies such as accelerometer sensors that collect and identify behavioral data. These sensors have aided livestock farmers in monitoring the health, feeding, and production of dairy cows and beef cattle. The approach of these accelerometer sensors focuses on the well-being and the performance of the individual animal rather than the traditional herd-based monitoring, thus, providing the specific needs of the livestock animals more accurately. The monitoring systems can collect data 24 h/day over extended periods since these accelerometer sensors are typically attached directly to the animals. These on-body-based accelerometer sensors can not only reduce the physical tasks of the farmers, but also allow researchers and farmers to accurately recognize the health of the animals by reducing bias related to interpreting behaviors from the monitored movements of the animals. Commonly used sensors to quantify movements are inertial measurement units (IMU), gyroscopes, and triaxial accelerometers. The IMUs are used for devices that require the exact position such as robotic arms and exoskeletons [9], while gyroscopes are used for monitoring the orientation of a moving subject such as swimming accelerations of sea lions [10], and triaxial accelerometers are used to measure the linear acceleration dynamic of the subject such as monitoring ingestive movements of cattle [11]. In measuring the vector sum of acceleration due to gravity and the movement of the animals, accelerometer sensors could be the most suitable tool. Triaxial accelerometers were used to detect posture and overall behavior [12], drinking behavior [13], feed intake [14], and grazing-related activities [15] of the cattle. In general, these accelerometer sensors normally measure the behaviors of the animals using short window sizes at 3 s, 5 s, and 10 s [16,17], or medium window sizes of 20 s and 30 s [18], and semi-long window sizes of 32 s, 64 s, and 96 s [19]. Measurement of the acceleration signals at very short sampling intervals or fractions of a second and analysis at short window sizes, however, is impractical in terms of its large data load that shortens the battery life of the sensors. In this study, the aim was to focus on the classification of cattle behavior in three main categories. The first main behavior was the active behavior which includes standing and walking. Standing and walking are considered minor daily activities of cattle because the animals do not spend much time on them. The second main behavior was the eating behavior which includes the routine feeding and ruminating activities of the cattle. Feeding composed of chewing is a short-durational movement while ruminating composed of movements in the jaw and in the body is considered a long-duration activity. Finally, the resting behavior which includes lying and sleeping activities of the cattle is defined as durational activity. Based on the mid- to long-duration time characteristics of the movements of the three main behaviors of the cattle, it was hypothesized that the sampling interval of 1 min of the triaxial accelerometer will recognize the activities of the animals at high precision and accuracy.
In general, the ultimate objective of the study is to minimize the number of calculations and possibly reduce the power consumption of the sensors by using a triaxial accelerometer that measures acceleration signals at a 1 min interval. In specifics, this study aimed to determine the performance score of the collar-fitted triaxial accelerometer sensor with a 1 min sampling interval in classifying the active, eating, and resting cattle behaviors using nine classification algorithms and 3 min, 4 min, and 5 min window sizes (3 data/min, 4 data/min, and 5 data/min, respectively).

2. Materials and Methods

The flow of the methodology in evaluating the collar-fitted accelerometer sensor as shown in Figure 1 consists of data acquisition, data preprocessing, and data classification. The sub-steps of each major method were discussed further in the succeeding sections of the study.

2.1. Animal and Accelerometer Sensor Setup

The experiment was conducted in Soosan Dairy Farm, Cheongju City, North Chungcheong Province. The animals that were used in the study were Korean steers (Hanwoo) in their early fattening period (age: 20 months) and were fed ad libitum rice straw and supplemental concentrates (71% total digestible nutrients, 13% crude protein). Drinking water was also supplied ad libitum. To correctly identify the directions of the axes of the accelerometer during data analysis, the collar-fitted accelerometer sensor was attached to the right side of the neck of the animals. The sensors were attached more than 24 h before starting the experiment to allow the cattle to acclimatize to the sensors attached to them. The attachment of the accelerometer sensors was conducted in a manner that did not cause discomfort to the cattle while ensuring the accuracy of data acquisition. The acceleration signal data were collected for three days. While the accelerometer sensors were measuring the values, surveillance cameras were also installed for video recordings for the actual observations of the behaviors of each individual cattle during the three experimental days.

2.2. Collar-Fitted Accelerometer Sensor for Behavior Monitoring

The commercial JFsystems collar device (Gunsan, Korea) consisted of a proprietary 3D LSM9DS1 accelerometer sensor positioned on the right side of the neck of the cattle to effectively detect and measure the motion patterns in the 3-axis linear acceleration sensor. The measured acceleration signals amounting to the activity of the cattle were transmitted at a 10 Hz sampling rate at a linear acceleration scale of ±2 g. The accelerometer sensor was powered with four 1.5 V alkaline batteries (750 mAh; triple A-type) and was fitted in a collar-pendant box with a dimension of 137 × 77 × 20 mm. The orientation of the sensor and directions of the 3-axis accelerometers are shown in Figure 2. The x-axis detected the signals in the down and up direction, the y-axis detected the signals in the forward and backward directions, and the z-axis detected the signals in lateral or sideways directions.

2.3. Direct Visual Observations of Behaviors through Videos

The data of the three behaviors of the cattle recorded in surveillance video cameras were observed and analyzed with trained members of the research group. The movement of the cattle was labeled per minute and manually recorded and stored in a Microsoft Excel spreadsheet. The classification and the description of the behavior of the cows (Table 1) were studied and familiarized by the observers. To ensure the accuracy of the observations, two observers tracked the video of the single cow continuously for 15 min, and thereafter, observation sessions were carried out with another member of the research group to assess and agree on the observed label of behaviors. The observation is resumed after the agreement assessment session. A label referring to the behaviors of the cows was noted every minute. As 6 h for day 1, 10 h for day 2, and 7 h for day 3 of visual observations were available for each cow, there were 360, 600, and 420 observations obtained per day, respectively. A total of 1380 visual observations were collected per individual cattle (n = 2). The different observation times during the three experimental days were based on the activity and inactivity of the cattle. The observation time for each day started at 7 in the morning and ended at 5 in the afternoon. The observations that were recorded were in the periods where the animals showed active, eating, and resting behaviors.

2.4. Combination of the Visual Observation Data and Accelerometer Signals

The data from the accelerometer sensor were wirelessly transmitted to a base station through Wi-Fi and were manually downloaded from the computer attached to the base station in a Microsoft Excel spreadsheet. At the end of the data measurements, accelerometer signals and observations were time synchronized to ensure that the visual observations were associated with the correct sequences of accelerometer signals. In this way, a dataset was obtained in which the behavior observations for each cow and each observer were combined with the appropriate sequence of accelerometer data.

2.5. Data Preprocessing and Preparation

The collected cattle behavior data in the X, Y, and Z axes are different, thus, the sensor orientation is a necessary condition for determining the behaviors. To accurately and smoothly reflect the motion intensity of the cattle, a summation of the acceleration signals was calculated. The collected triaxial acceleration using a collar-fitted sensor was synthesized as the following equation.
Vectorial Sum of the Acceleration (VSA) = √ ((acceleration x)2 + (acceleration y)2 + (acceleration z)2)
Visual observation data of the behaviors of the animals were also relabeled into categorical numbers as follows: active was labeled as 0, eating as 1, and resting as 2. After cleaning the data of missing values, Python 3.2 [20] was used and designed to segment the VSA into long window sizes of 3 min, 4 min, and 5 min.

2.6. Classification Algorithm

In this study, eight commonly used classification algorithms were used for evaluating the accelerometer sensor and for comparing the three long window sizes (3 min, 4 min, and 5 min): the artificial neural network (ANN), decision tree (DT), gradient boosting (GB), k-nearest neighbor (KNN), logistic regression (LR), naïve Bayesian (NB), random forest (RF), support vector machine (SVM), and one customized classification algorithm: long short-term memory network (LSTM), a developed version of ANN for classifying time-serial-based data.
The ANN algorithm is a powerful predictive tool but needs a large amount of data to be trained to provide quality predictions. It is generally presented as a system of interconnected electronic neurons that are capable of machine learning mimicking the neural structure of the brain [21]. The algorithm process records one at a time and learns by comparing the classification of the record with the known actual classification of the record. The interconnected neuron processed the inputs which are multiplied by the synaptic weights where the product represents the strength of the neural connections. The DT algorithm is a fast, simple, and easily interpretable classification approach. As described by [22], the model is shaped like a tree with feature values in the internal nodes and class labels in the leaves of the tree, then the incoming new instances are classified by passing through the internal nodes and corresponding tests within the tree. The predicted class is the label of the final leaf reached by each instance. The GB algorithm attempts to turn a weak learner into a strong learner by gradually adapting how models are made. In order to create a strong predictive model, it combines many weak learning models together. The GB algorithm was used as it handles the noisy imbalanced data and possible outliers well [23]. The KNN algorithm is a classical non-parametric method classification algorithm that is easy to implement and suitable for multi-class classification problems used in several studies of dairy cows [18,24,25]. It is based on a neighborhood majority voting scheme and assigns the new incoming instance to the most common class amongst its K nearest. The LR algorithm is a traditional linear method utilized for predictions despite the great potential of machine learning methods because of its greater and superior fitting [26,27]. The LR classifier in the sci-kit-learn package was used to apply logistic regression to the dataset of this study. The NB algorithm is a statistical classifier based on the Bayes rule [28]. It is one of the most efficient and effective inductive learning algorithms for machine learning and data mining. This machine learning method can be used where no features before fitting the model are needed to be scaled. The RF algorithm provides a more robust classification performance by correcting overfitting to the training set [29]. The algorithm is an ensemble learning method combining multiple decision trees trained on the training set where the predictions of the individual tree models within the random forest are combined to form an overall classification decision. The SVM algorithm is a statistical machine learning method that can be applied to pattern classification and nonlinear regression tasks. The classification is performed through the non-linear mapping of input data to a higher dimensional variable space by dividing the data into two categories using linearity, and this linear separator is constructed by maximizing the distance from the training set and tuning of the SVM parameters [30]. Lastly, the architecture of the LSTM algorithm was proposed by replacing the nonlinear units in traditional recurrent neural networks with LSTM cells [31]. The common LSTM unit is composed of a cell, an input gate, an output gate, and a forget gate. The LSTM was customized based on ANN in this study to be suitable for time series data of the accelerometer signals collected using the sensors in dairy cows.

2.7. Performance Evaluation of the Classification

The precision, sensitivity (also called recall), F1-score, and the overall accuracy as defined by [32] were used to evaluate the classification algorithms and were calculated as follows:
Precision= TP/((TP + FP))
Sensitivity= TP/((TP + FN))
F1-score= (2 × Precision × Sensitivity)/(Precision + Sensitivity)
Accuracy = ((TP + FN))/((TP + TN + FN + FP))
where TP (true positive) is the number of positive samples correctly classified as positive samples, TN (true negative) is the number of negative samples correctly classified as negative samples, FP (false positive) is the number of negative samples incorrectly classified as positive samples, and FN (false negative) is the number of positive samples incorrectly classified as negative samples. In application, TP is the number of instances where the behavior was correctly classified using the reference observations, FN is the number of instances where the visually observed behavior was incorrectly classified, and FP is the number of instances where the behaviors were incorrectly classified according to the reference. The F1-score, in addition to precision and sensitivity, was included in this study to accurately reflect the effect of classification. The perfect effect of classification in terms of precision and sensitivity equates to 1 but the trend of these two performance parameters is often inversely related where precision increases and sensitivity decreases or vice-versa. The F1-score considers both the precision and sensitivity values by taking the weighted average of the two parameters. Hence, the closer the F1-score is to 1 is the ideal performance of the classification.

2.8. Statistical Analysis

To compare which of the nine (9) algorithms and three (3) window sizes showed the best classification for each behavior of the cattle, iterations of the classification algorithms were subjected to statistical analysis. For each performance variable, each of the nine algorithms per window size has ten (10) iterations of the classification, and the total number of observations was 27 (algorithms) × 10 (iterations) = 270 observations. The 270 observations for each performance variable and each behavior were subjected to the least square analysis of variance (ANOVA) using the general linear model procedure (PROC GLM) in SAS (SAS Institute, 2021). Statistically significant observations were declared at p < 0.05 and data were further subjected to Duncan’s multiple range test (DMRT) if differences were detected.

3. Results and Discussion

3.1. Relationship Analysis between the Acceleration Data and Behaviors of Cattle

The vectorial sum of the acceleration (VSA) data compared with the behaviors recorded in videos for three days is illustrated in Figure 3. The (1) active behavior characterized by standing and walking activities, (2) eating behavior characterized by feeding and ruminating activities, and (3) resting behavior characterized by lying and sleeping activities were all observed throughout the experimental period. The VSA graphs of the active and eating behaviors displayed large fluctuations showing the dynamic movements of the steers while the VSA of the resting behavior is observed as small fluctuations showing the minimal or short movements of the animals.
In Table 2, the least-square means of VSA for each behavior and the differences among the behaviors denoted by the superscripts are shown. The eating behavior showed the significantly highest mean VSA at 5.16 and the highest maximum VSA at 25.70 compared to active and resting behaviors. The notably high mean and maximum VSA values of the eating behavior were expected as the accelerometer sensor was fitted in a collar that was attached to the neck of the animals. The triaxial accelerometer detected a high activity in the neck of the cattle while the animals were eating. In a previous work [33], the feeding activity of the animals was easily distinguished from other behaviors using a neck-mounted sensor due to the high activity in the neck of the animals. This indicates that eating behavior in the present study can be highly classified compared to active and resting behaviors because of the high signals captured by the triaxial accelerometer. However, the eating behavior showed a wide range of VSA (0.40 to 25.70). The scattered VSA of the eating behavior can be associated with the erratic movement of the head of the animals as they chew and ruminate, and these dispersed signals could affect the classification of the behaviors.
The active behavior characterized by standing and walking movements showed the second highest mean VSA at 3.76 and the second highest maximum VSA at 20.90. The standing and walking movements of the animals are normally measured by leg pedometers [34] because all movements are found in the limbs of the animals. In this study, the VSA of the active behavior measured by the collar-fitted triaxial accelerometer was high. Standing is when the body of the cattle was off the ground and supported by at least three limbs, while walking was when the cattle were moving forward or backward making two or more steps in one direction. The high VSA of the active behavior in this study, therefore, signified that the collar-fitted triaxial accelerometer sensor used in this study was effective in detecting the acceleration signals coming from the orientation of all three axes of the sensor. The triaxial accelerometer was able to sense the motion of the animals according to the orientation of the sensor with respect to the surface of the earth.
The resting behavior characterized by the sleeping and lying activities of the animals showed the lowest mean VSA at 1.02 and the lowest maximum VSA at 4.00. Cattle are highly motivated to rest and the animals lie down for approximately 10–12 h per day [35]. When resting, the animals either lie down where their body is in the sternum position on the ground or sleep where they lie down without ruminating. Due to low movements in the lying and sleeping activities of the animals, resting was considered a durational behavior of the cattle. Thus, the low VSA signals detected by the triaxial accelerometer in the resting behavior were expected as there were little to no movements during the sleeping and lying activities of the animals.
It was found in this study that the individual behaviors of active, eating, and resting were significantly detected by the collar-fitted triaxial accelerometer sensor. The classification performance evaluation of the sensor in classifying these individual behaviors were tested and discussed in the following section of the manuscript.

3.2. Precision and Sensitivity Performance Evaluation

To accurately identify the individual behaviors of cattle, nine classification algorithms were used to analyze the VSA signals measured by the collar-fitted triaxial accelerometer sensor. The performance evaluation such as the precision and sensitivity of the individual behavior using the algorithms are shown in Table 3.
The precision performance was evaluated to measure the correctly predicted positive classification over the total predicted positive observations for the individual behavior. The highest precision performance was observed in resting behavior at 89% (4 min) based on the LSTM algorithm. The second highest precision performance was observed in the eating behavior at 84% followed by the active behavior at 67% both based on a 5 min window size using the LSTM algorithm.
The sensitivity performance was evaluated to measure the correctly positive classification over all the observations per individual behavior. The highest sensitivity performance was observed in the resting behavior at 89% in window sizes of 3 min and 5 min based on the NB algorithm. The second highest sensitivity performance was observed in the eating behavior at 88% in the 4 min window size based on the LSTM algorithm. The third highest sensitivity was observed in the active behavior at 77% in the 5 min window size based on the LR algorithm.
Among the three main behaviors of the Hanwoo steers, the resting behavior was most correctly classified in terms of precision and sensitivity performances (both at 89%) followed by eating (P: 84%, S: 88%) and then by active behavior (P: 67%, S: 77%). The high precision and sensitivity classifications of the resting and eating behaviors signified that the acceleration signals measured by the collar-fitted triaxial accelerometer sensor could not be easily misclassified as active behavior. Related works in terms of precision and sensitivity can be seen in Table 4. In comparison with other works, the precision and sensitivity scores of the resting behavior-related activities such as lying were at 83% and 80%, respectively [18]. In a recently published work, the precision and sensitivity scores of eating behavior-related activities were at 82% and 43%, respectively [14]. In older work, precision and sensitivity of feeding behaviors were 93% and 97%, respectively [36]. Lastly, the precision and sensitivity of the active-related activities such as walking were 65% and 76%, respectively [18]. Except with the work of Vasquez Diosdao on feeding behavior [36], the findings of the present study were higher if not similar to the results of the cited references. The high precision and sensitivity of the resting behavior could be due to the unscattered VSA signals measured by the triaxial accelerometer sensor. As described in the previous section of the study, the resting behavior of the cattle is composed of little to no movements of the cattle. The minimal motions in the neck of the cattle while resting could have reliably discriminated the resting behavior from the eating and active behaviors. In addition, this signified that the 1 min sampling interval of the triaxial accelerometer is reliably effective in capturing signals of behaviors that have small motions such as sleeping or lying, or collectively the resting behavior.
With eating behavior, chewing, swallowing, and under-jaw movements of the cattle could have contributed to the precise and sensitive classification of the behavior. The movements on the neck of the cattle might have contributed to the reliable discrimination of the eating behavior from resting and active behaviors. It is worthy to note that the lower precision and sensitivity scores of the eating behavior in the present study compared with the feeding behavior of cattle in the works of Vasquez Diosdao [36] could be due to the wide definition of the eating behavior in this study. The eating behavior in this study as defined in the earlier section of this study was a combination of the ruminating and feeding activities of the animals. The feeding activity includes the up and down movements of the head of the animals as well as the chewing, masticating, and other lower jaw movements while ruminating activity includes the swallowing and regurgitating activities while the animals are standing or lying. This means that the posture of the animals while ruminating could have affected the correct classificiation of the eating behavior. The lying rumination and standing rumination of the eating behavior of the Hanwoo steers could have produced proximate signals with resting and active behaviors, respectively, that caused confusion during the classification. Accelerometer sensors are tilt-sensing devices. This indicates that the triaxial accelerometer sensors used in this study were sensitive to the motions of the animals with respect to the surface of the earth. For instance, the triaxial accelerometer would measure the signals of the animals lying and the animals ruminating while lying in proximate values. Nonetheless, the results of this study indicated that eating behavior was reasonably classified using the signals measured by the triaxial accelerometer with a 1 min sampling interval.
The active behavior was poorly classified which could be due to the position of the accelerometer in the body of the animals. It was expected that the VSA signals collected for the active behavior would be from the y-axis which is associated with the forward and backward movement of the sensors. The motion of the animals with respect to the surface of the earth should give zero signals from the x-, y-, and z-axes when the cattle are standing, and zero signals from x- and z-axes and n signals from the y-axis when the cattle is walking. However, the active behavior had the second highest mean and maximum VSA as discussed in the earlier parts of the study. This indicated that the accelerometer had captured signals from all three axes giving dispersed signals, therefore, affecting the correct classification of the behaviors. The standing and walking movements of the active behavior might have been misclassified as feeding activity of the eating behavior where the body of the animals was also off the ground. The misclassification of the active behavior should be improved as low precision can lead to livestock farmers not acting on alerts of the sensor tools [37] while low sensitivity (true positives) could fail to alert the livestock farmers that there are abnormal behaviors that need attention (false negative).
Overall, high precision and sensitivity indicated that the classifiers showed minimal problems in correctly predicting positive cases and that not many negative cases were incorrectly classified as positive. The findings of the study signified that the collar-fitted triaxial accelerometer sensor measuring signals at a 1 min sampling interval could be used to classify resting and eating behaviors of cattle at high precision and sensitivity.

3.3. The F1-Score Performance Evaluation

To correctly classify the individual behaviors of the animals and appropriately present the results to livestock farmers, the F1-score performance was evaluated as presented in Table 3. Predicting false negatives in the behaviors of the animals could result in misdetection of the actual diseases of animals and having a misclassified actual positive in classifying behaviors poses a more serious disadvantage than predicting true observations. Hence, the F1-score was presented in this study. Eating and resting behaviors were classified with a fairly high F1-score while the active behavior was classified with a satisfactorily high F1-score. In specifics, resting behavior was the most correctly classified behavior with an F1-score of 85% in a 4 min window size followed by the eating behavior with an F1-score of 84% in a 5 min window size both based on the LSTM algorithm. The correct classification of the resting and eating behaviors of the animals in this study indicated a reasonably reliable detection of the health and welfare condition of animals. Studies reported that cattle were restless when affected with clinical mastitis [40] and cattle showed prolonged resting when affected with lameness [8,41]. Therefore, correct classification of the resting behavior in this study could reduce the misdetection of livestock farmers of probable lameness and mastitis in cattle. Other works reported that decreased feeding and ruminating activities occur in cattle affected with reduced reproduction [3] and metabolic disease [1,3]. Hence, correct classification of the eating behavior in this study could increase the detection of metabolic diseases and abnormal reproduction in cattle. The lowest F1-score was observed in the active behavior at 70% in a 5 min window size using the GB algorithm. The misclassification of the active behavior was most likely discriminated due to the positioning of the accelerometer sensor which measured mainly the movements of the neck and the head of the animals.
In comparison with related works as shown in Table 4, the F1-score for resting, eating, and active behaviors in this study was similar to the works of Smith [18]. As discussed in the above section, the F1-score for resting, eating, and active behaviors in the study was 85, 84, and 70, respectively. Similarly, works of Smith showed the F1-score of resting at 85%, eating at 86%, and active at 70%. In the cited reference, the authors used a one-vs-all framework where a set of binary classifiers were trained to discriminate each one of the behavior classes against all the combined remaining behaviors. In this study, the approach was to classify the behavior using a single classifier trained to discriminate between multiple behaviors. It was realized in this result that if the classification approach was developed in the manner of the one-vs-all scheme, the F1-score of the triaxial accelerometer sensor measuring a 1 min sampling interval could be improved further. In comparison with a newer work [39], the F1-score of eating behavior and active behavior in the present study was found to be lower. The F1-score for eating and active behaviors of the cited reference was 91% and 87%, respectively [39]. One of the main differences in the present study and cited reference was feature extraction for classification. In the present study, a small set of statistical features were used (first to fourth orders) while the cited work used fourteen statistical features. This could have contributed to the variance of the results. Nonetheless, it can be summarized that acceleration signals sampled at 1 min intervals resulted in reasonably reliable F1-score classifications of the resting and eating behaviors of the Hanwoo steers.
Among the nine algorithms, the highest F1-score (84% to 85%) was based on the LSTM algorithm for classifying resting and eating behaviors. The behaviors of cattle are generally detected and classified using time-series sensor tools. In this study, the triaxial accelerometer sensor produced time-series data for the classification of the behavior of the Hanwoo steers. In humans, it was reported that the most fitting classification model for sequential or time serial data in action and emotion recognition was the LSTM-recurrent neural network (RNN) algorithm [42]. In cattle, classification of behavior using time series activity data based on the developed LSTM-RNN model showed the best performance [43]. Similarly, the best F1-scores in classifying the resting and eating behaviors in this study were observed using the LSTM. This could be because after labeling the acceleration time series data according to actual behavior, the data were directly encoded into the classifier without further extraction of features before classification in LSTM. The LSTM was also developed to deal with the vanishing and exploding gradient problems [31] that normally occur in time-series data by learning the long-term dependence. In terms of the active behavior, the best F1-score using the GB algorithm (70%) could be explained by the capability of the algorithm to handle noisy imbalanced data such as the signals produced by the standing and walking movements. Noteworthy, the RF algorithm showed the second best F1-score in active behavior which could be due to the capability of ensemble methods of RF in generating high-performance classifiers by training the collected individual classifiers. Although the generated F1-score using RF was unsatisfactorily low (67%) for classifying the standing behavior, the RF was the second superior among the other algorithms as it has statistical, computation, and representation advantages over individual classifiers [44].

3.4. Classification Performance Evaluation According to Window Sizes

To address the problems of redundancy or repeating iterations and wasting of power consumption and computation costs, the behaviors of the cattle were classified using long window sizes (3 min, 4 min, and 5 min) in this study since the animals are less active. In human activities recognition, segmenting the data into smaller sizes was reported to improve classification accuracy but caused redundancy in analysis and a waste of resources [45]. Performance evaluation as affected by window sizes for active, eating, and resting behaviors are shown in Table 5. The highest precision score was observed in a 5 min window size in all behaviors. The highest sensitivity score was observed in the 4 min and 4 min window sizes in eating behavior. Window sizes did not affect the sensitivity performance in active and resting behaviors. The highest F1-score was also observed in a 5 min window size in the active and resting behaviors. Window sizes did not affect the F1-score of the eating behavior. Increasing the window sizes increases the information and instances for the classifying algorithms which improved the classification of behaviors correctly. For data in fractions of seconds, wide window sizes lead to a high percentage of unused sequences [46]. In the present study, the sampling interval was at 1 min, hence, increasing the window size increased the performance scores of the triaxial accelerometer sensor. Altogether, precision, sensitivity, and F1-score performances showed an increasing trend with increasing window sizes in all behaviors. The present study suggests that if acceleration signals were measured at a sampling interval of 1 min using a triaxial accelerometer sensor, classification of the three main behaviors active, eating, and resting in cattle generally improved at increasing window sizes.

3.5. Assessment of the Overall Classification Performance

The overall behavior classification performance of the accelerometer sensor based on nine algorithms and three window sizes were shown in Table 6. The overall precision, sensitivity, and F1-score were obtained by using the LSTM algorithm in window sizes of 4 min and 5 min. More specifically, the precision, sensitivity, and the F1-score of the overall classification of the behaviors of the cattle were 76–78%, 66%, and 67–71%, respectively. One of the reasons for the low classification performances in the present study could be the size of the datasets for machine learning obtained from a small number of animals (n = 2).

4. Conclusions

This study evaluated the collar-fitted triaxial accelerometer sensor designed to identify behaviors of cattle. The collar-fitted accelerometer sensor measuring 1 min serial signals was found effective for detecting the resting and eating behaviors of cattle, but needed improvement for detecting the active behavior of the animal. Based on the analysis of the minute acceleration signals and the visual observations, classifying the resting behavior resulted to 89% high precision, 81% high sensitivity, and 85% high F1-score through the combined scheme of a 4 min window size and an LSTM algorithm. Using the same combined scheme of 4 min window size and LSTM classification algorithm, the eating behavior was correctly identified at 79% high precision, 88% high sensitivity, and 83% high F1-score. However, the active behavior of the cattle was poorly classified with performance scores of 67% precision (using a 5 min window size and an LSTM algorithm), 77% sensitivity (using a 5 min window size and an LR algorithm), and 70% F1-score (using a 5 min window size and a GB algorithm). The high scores in classifying the active behavior were only attained using the 5 min window size suggesting that correct classification of the active behavior requires more data to establish a correct analysis. In addition, considering the marginally poor overall precision (78%), sensitivity (66%), and the F1-score (71%), further work is suggested to refine the 1 min acceleration signals by increasing the diversity of the inputs of classifiers or extracting more statistical features. Overall, the findings in this study may serve as critical references for engineering and animal science researchers involved in advancing smart agriculture in livestock animals.

Author Contributions

Conceptualization, J.-h.P., D.-H.L. and S.H.C.; methodology, K.M.C.N., S.-i.C., J.-h.P., S.S., D.-H.L. and S.H.C.; software, S.-i.C. and S.S.; validation, J.-h.P., D.-H.L. and S.H.C.; formal analysis, K.M.C.N.; writing—original draft preparation, K.M.C.N. and S.-i.C.; writing—review and editing, J.-h.P., D.-H.L. and S.H.C. All authors have read and agreed to the published version of the manuscript.

Funding

This research was funded by Chungbuk National University (2022).

Institutional Review Board Statement

All experimental procedures were conducted in accordance with the approved Chungbuk National Institutional Animal Care and Use Committee CBNUA-1430-20-02.

Informed Consent Statement

Not applicable.

Data Availability Statement

Upon a reasonable request, the data results of this study can be available from the corresponding authors.

Conflicts of Interest

The authors have no potential conflict of interest relevant to this article to report.

Abbreviations

ANNartificial neural network
DTdecision tree
GBgradient boosting
KNNk-nearest neighbor
LRlogistic regression
LSTMlong short-term memory
NBnaïve Bayesian
RFrandom forest
SVMsupport vector machine

References

  1. Schirmann, K.; Weary, D.M.; Heuwieser, W.; Chapinal, N.; Cerri, R.L.A.; von Keyserlingk, M.A.G. Short communication: Rumination and feeding behaviors differ between healthy and sick dairy cows during the transition period. J. Dairy Sci. 2016, 99, 9917–9924. [Google Scholar] [CrossRef]
  2. 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] [PubMed] [Green Version]
  3. Wiltbank, M.C.; Grummer, R.R.; Shaver, R.D.; Santos, J.; Sartori, R.; Carvalho, P.D.; Souza, A.H.; Toledoa, M.Z. Nutrition and reproductive efficiency: Transition period management, energy status, and amino acid supplementation alter reproduction in lactating dairy cows. In Proceedings of the 2015 Florida Ruminant Nutrition Symposium, 2–4 February 2015; University of Florida IFAS Extension: Gainesville, FL, USA, 2015; pp. 39–54. [Google Scholar]
  4. 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]
  5. Itle, A.J.; Huzzey, J.M.; Weary, D.M.; von Keyserlingk, M.A. Clinical ketosis and standing behavior in transition cows. J. Dairy Sci. 2015, 98, 128–134. [Google Scholar] [CrossRef] [PubMed] [Green Version]
  6. Sepulveda-Varas, P.; Weary, D.M.; von Keyserlingk, M.A. Lying behavior and postpartum health status in grazing dairy cows. J. Dairy Sci. 2014, 97, 6334–6343. [Google Scholar] [CrossRef] [Green Version]
  7. Proudfoot, K.L.; Kull, J.A.; Krawczel, P.D.; Bewley, J.M.; O’Hara, B.F.; Donohue, K.D.; Pighetti, G.M. Effects of acute lying and sleep deprivation on metabolic and inflammatory responses of lactating dairy cows. J. Dairy Sci. 2021, 104, 4764–4774. [Google Scholar] [CrossRef]
  8. 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] [PubMed] [Green Version]
  9. Glowinski, S.; Krzyzynski, T.; Bryndal, A.; Maciejewski, I. A kinematic model of a humanoid lower limb exoskeleton with hydraulic actuators. Sensors 2020, 20, 6116. [Google Scholar] [CrossRef]
  10. Ware, C.; Trites, A.W.; Rosen, D.A.; Potvin, J. Averaged propulsive body acceleration (APBA) can be calculated from biologging tags that incorporate gyroscopes and accelerometers to estimate swimming speed, hydrodynamic drag and energy expenditure for Steller sea lions. PLoS ONE 2016, 11, e0157326. [Google Scholar] [CrossRef] [Green Version]
  11. Pavlovic, D.; Davison, C.; Hamilton, A.; Marko, O.; Atkinson, R.; Michie, C.; Crnojevic, V.; Andonovic, I.; Bellekens, X.; Tachtatzis, C. Classification of Cattle Behaviours Using Neck-Mounted Accelerometer-Equipped Collars and Convolutional Neural Networks. Sensors 2021, 21, 4050. [Google Scholar] [CrossRef]
  12. Balasso, P.; Marchesini, G.; Ughelini, N.; Serva, L.; Andrighetto, I. Machine learning to detect posture and behavior in dairy cows: Information from an accelerometer on the animal’s left flank. Animals 2021, 11, 2972. [Google Scholar] [CrossRef] [PubMed]
  13. Williams, L.R.; Bishop-Hurley, G.J.; Anderson, A.E.; Swain, D.L. Application of accelerometers to record drinking behaviour of beef cattle. Anim. Prod. Sci. 2017, 59, 122–132. [Google Scholar] [CrossRef]
  14. Ding, L.; Lv, Y.; Jiang, R.; Zhao, W.; Li, Q.; Yang, B.; Yu, L.; Ma, W.; Gao, R.; Yu, Q. Predicting the Feed Intake of Cattle Based on Jaw Movement Using a Triaxial Accelerometer. Agriculture 2022, 12, 899. [Google Scholar] [CrossRef]
  15. Watanabe, R.N.; Bernardes, P.A.; Romanzini, E.P.; Braga, L.G.; Brito, T.R.; Teobaldo, R.W.; Reis, R.A.; Munari, D.P. Strategy to Predict High and Low Frequency Behaviors Using Triaxial Accelerometers in Grazing of Beef Cattle. Animals 2021, 11, 3438. [Google Scholar] [CrossRef] [PubMed]
  16. Barwick, J.; Lamb, D.W.; Dobos, R.; Welch, M.; Trotter, M. Categorising sheep activity using a tri-axial accelerometer. Comput. Electron. Agric. 2018, 145, 289–297. [Google Scholar] [CrossRef]
  17. Riaboff, L.; Aubin, S.; Bédère, N.; Couvreur, S.; Madouasse, A.; Goumand, E.; Chauvin, A.; Plantier, G. Considering pre-processing of accelerometer signal recorded with sensor fixed on dairy cows is a way to improve the classification of behaviours. In Precision Livestock Farming’19; Teagasc, Animal & Grassland Research and Innovation Centre: Cork, Ireland, 2019; p. 121. [Google Scholar]
  18. Smith, D.; Rahman, A.; Bishop-Hurley, G.J.; Hills, J.; Shahriar, S.; Henry, D.; Rawnsley, R. Behavior classification of cows fitted with motion collars: Decomposing multi-class classification into a set of binary problems. Comput. Electron. Agric. 2016, 131, 40–50. [Google Scholar] [CrossRef]
  19. Klefot, J.M.; Murphy, J.L.; Donohue, K.D.; O’Hara, B.F.; Lhamon, M.E.; Bewley, J.M. Development of a noninvasive system for monitoring dairy cattle sleep. J. Dairy Sci. 2015, 99, 8477–8485. [Google Scholar] [CrossRef] [PubMed]
  20. VanRossum, G.; Drake, F.L. The Python Language Reference; Python Software Foundation: Amsterdam, The Netherlands, 2010. [Google Scholar]
  21. Haykin, S. Neural networks: A Comprehensive Foundation; Prentice Hall PTR: Upper Saddle River, NJ, USA, 1999; pp. 1–42. [Google Scholar]
  22. Shahinfar, S.; Page, D.; Guenther, J.; Cabrera, V.; Fricke, P.; Weigel, K. Prediction of insemination outcomes in Holstein dairy cattle using alternative machine learning algorithms. J. Dairy Sci. 2014, 97, 731–742. [Google Scholar] [CrossRef] [PubMed] [Green Version]
  23. Friedman, J.H. Greedy Function Approximation: A gradient boosting machine. Ann. Stat. 2001, 29, 1189–1232. [Google Scholar] [CrossRef]
  24. Shen, W.; Cheng, F.; Zhang, Y.; Wei, X.; Fu, Q.; Zhang, Y. Automatic recognition of ingestive-related behaviors of dairy cows based on triaxial acceleration. Inf. Processing Agric. 2020, 7, 427–443. [Google Scholar] [CrossRef]
  25. Tian, F.; Wang, J.; Xiong, B.; Jiang, L.; Song, Z.; Li, F. Real-Time Behavioral Recognition in Dairy Cows Based on Geomagnetism and Acceleration Information. IEEE Access 2021, 9, 109497–109509. [Google Scholar] [CrossRef]
  26. Hempstalk, K.; McParland, S.; Berry, D.P. Machine learning algorithms for the prediction of conception success to a given insemination in lactating dairy cows. J. Dairy Sci. 2015, 98, 5262–5273. [Google Scholar] [CrossRef] [PubMed] [Green Version]
  27. Van Hertem, T.; Viazzi, S.; Steensels, M.; Maltz, E.; Antler, A.; Alchanatis, V.; Schlageter-Tello, A.A.; Lokhorst, K.; Romanini, E.C.B.; Bahr, C.; et al. Automatic lameness detection based on consecutive 3D-video recordings. Biosyst. Eng. 2014, 119, 108–116. [Google Scholar] [CrossRef]
  28. Domingos, P.; Pazzani, M. On the optimality of the simple Bayesian classifier under zero-one loss. Mach. Learn. 1997, 29, 103–130. [Google Scholar] [CrossRef]
  29. Hastie, T.; Tibshirani, R.; Friedman, J.H.; Friedman, J.H. The Elements of Statistical Learning: Data Mining, Inference, and Prediction; Springer: Berlin/Heidelberg, Germany, 2009. [Google Scholar]
  30. Smola, A.J.; Scholkopf, B. A tutorial on support vector regression. Stat. Comput. 2004, 14, 199–222. [Google Scholar] [CrossRef] [Green Version]
  31. Hochreiter, S.; Schmidhuber, J. Long short-term memory. Neural Comput. 1997, 9, 1735–1780. [Google Scholar] [CrossRef]
  32. Chawla, N.V. Data Mining for Imbalanced Datasets: An Overview. In Data Mining and Knowledge Discovery Handbook; Springer: Berlin/Heidelberg, Germany, 2005; pp. 853–867. [Google Scholar]
  33. 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]
  34. Nielsen, L.R.; Pedersen, A.R.; Herskin, M.S.; Munksgaard, L. Quantifying walking and standing behaviour of dairy cows using a moving average based on output from an accelerometer. Appl. Anim. Behav. Sci. 2010, 127, 12–19. [Google Scholar] [CrossRef]
  35. Munksgaard, L.; Jensen, M.B.; Pedersen, L.J.; Hansen, S.W.; Matthews, L. Quantifying behavioural priorities—Effects of time constraints on behaviour of dairy cows, Bos taurus. Appl. Anim. Behav. Sci. 2005, 92, 3–14. [Google Scholar] [CrossRef]
  36. 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. Biotelemetry 2015, 3, 1–14. [Google Scholar] [CrossRef] [Green Version]
  37. Eckelkamp, E.A. On-Farm Utilization of Precision Dairy Monitoring: Usefulness, Accuracy, and Affordability. Theses and Dissertations-Animal and Food Sciences, 2018. [Google Scholar] [CrossRef]
  38. Cabezas, J.; Yubero, R.; Visitación, B.; Navarro-García, J.; Algar, M.J.; Cano, E.L.; Ortega, F. Analysis of Accelerometer and GPS Data for Cattle Behaviour Identification and Anomalous Events Detection. Entropy 2022, 24, 336. [Google Scholar] [CrossRef] [PubMed]
  39. Rahman, A.; Smith, D.; Little, B.; Ingham, A.; Greenwood, P.; Bishop-Hurley, G. Cattle behaviour classification from collar, halter, and ear tag sensors. Inf. Processing Agric. 2018, 5, 124–133. [Google Scholar] [CrossRef]
  40. Medrano-Galarza, C.; Gibbons, J.; Wagner, S.; de Passille, A.M.; Rushen, J. Behavioral changes in dairy cows with mastitis. J. Dairy Sci. 2012, 95, 6994–7002. [Google Scholar] [CrossRef] [Green Version]
  41. Blackie, N.; Amory, J.; Bleach, E.; Scaife, J. The effect of lameness on lying behaviour of zero grazed Holstein dairy cattle. Appl. Anim. Behav. Sci. 2011, 134, 85–91. [Google Scholar] [CrossRef]
  42. Du, Y.; Wang, W.; Wang, L. Hierarchical recurrent neural network for skeleton based action recognition. In Proceedings of the IEEE Conference on Computer Vision and Pattern Recognition (CVPR), Boston, MA, USA, 7–12 June 2015; pp. 1110–1118. [Google Scholar]
  43. Peng, Y.; Kondo, N.; Fujiura, T.; Suzuki, T.; Wulandari; Yoshioka, H.; Itoyama, E. Classification of multiple cattle behavior patterns using a recurrent neural network with long short-term memory and inertial measurement units. Comput. Electron. Agric. 2019, 157, 247–253. [Google Scholar] [CrossRef]
  44. Dietterich, T.G. Ensemble Learning, The Handbook of Brain Theory and Neural Networks, MA Arbib; MIT Press: Cambridge, MA, USA, 2002. [Google Scholar]
  45. 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]
  46. Andriamandroso, A.L.H.; Lebeau, F.; Beckers, Y.; Froidmont, E.; Dufrasne, I.; Heinesch, B.; Dumortier, P.; Blanchy, G.; Blaise, Y.; Bindelle, J. Development of an open-source algorithm based on inertial measurement units (IMU) of a smartphone to detect cattle grass intake and ruminating behaviors. Comput. Electron. Agric. 2017, 139, 126–137. [Google Scholar] [CrossRef]
Figure 1. The process of evaluating the collar-fitted accelerometer sensor begins from the experiment in the field until the analysis of data and determination of the performance score of the classification algorithms used to identify behaviors of the cattle.
Figure 1. The process of evaluating the collar-fitted accelerometer sensor begins from the experiment in the field until the analysis of data and determination of the performance score of the classification algorithms used to identify behaviors of the cattle.
Sensors 22 05961 g001
Figure 2. Orientation of the sensor in the Korean steer. The left figure showed the directions of the detectable accelerations on top view. The figure on the right shows the directions of the detectable accelerations when the sensor is positioned on the right neck side of the cattle. The x-axis measured the vertical movements of the head of the cattle, the y-axis measured the horizontal movements of the head of the cattle, and the z-axis measured the lateral, sideways, or rotational movements of the head of the cattle.
Figure 2. Orientation of the sensor in the Korean steer. The left figure showed the directions of the detectable accelerations on top view. The figure on the right shows the directions of the detectable accelerations when the sensor is positioned on the right neck side of the cattle. The x-axis measured the vertical movements of the head of the cattle, the y-axis measured the horizontal movements of the head of the cattle, and the z-axis measured the lateral, sideways, or rotational movements of the head of the cattle.
Sensors 22 05961 g002
Figure 3. The three major cattle behaviors studied were (A) active behavior (standing and walking motions), (B) eating behavior (feeding, ruminating, and drinking motions), and (C) resting behavior (sleeping and lying motions). Below each behavior were the graphs of the vectorial sum acceleration per minute of the three major cattle behaviors.
Figure 3. The three major cattle behaviors studied were (A) active behavior (standing and walking motions), (B) eating behavior (feeding, ruminating, and drinking motions), and (C) resting behavior (sleeping and lying motions). Below each behavior were the graphs of the vectorial sum acceleration per minute of the three major cattle behaviors.
Sensors 22 05961 g003
Table 1. Classification and description of the different behavior categories for actual observation.
Table 1. Classification and description of the different behavior categories for actual observation.
BehaviorDefinition
ActiveWalking: The cow is moving from one location to another and walking straight forward with a normal gait. Standing: The cow is in an upright position on all four legs with its head in an upright position and without swinging its head from side to side, not walking, eating, or ruminating
EatingRuminating: The cow can be standing or lying and masticating regurgitated feed, swallowing masticated feed, or regurgitating feed with its head in an upright position. Feeding: The cow places its head above the feeding table and searches, masticates, or sorts the feed (silage), and can also be drinking
RestingSleeping: The cow is resting on the ground (not in an upright position) and not feeding or ruminating, settling down in a lying position and closing its eyes. Lying: The cow is resting on the ground (not in an upright position) and not feeding or ruminating but can still be moving its head
Table 2. The least-square means of the vectorial sum of the acceleration (VSA) for active, eating, and resting behaviors of the Korean steers.
Table 2. The least-square means of the vectorial sum of the acceleration (VSA) for active, eating, and resting behaviors of the Korean steers.
ItemsActiveEatingResting
Minimum0.400.400.40
Maximum20.9025.704.00
Mean3.76 b5.16 a1.02 c
SEM0.100.130.15
a–c Means within the same row with different superscripts are statistically different (p < 0.05); SEM, standard error of means.
Table 3. Classification performance of the collar-fitted accelerometer sensor based on nine algorithms framed at different minute window sizes for specific the active, eating, and resting behaviors of the cattle.
Table 3. Classification performance of the collar-fitted accelerometer sensor based on nine algorithms framed at different minute window sizes for specific the active, eating, and resting behaviors of the cattle.
BehaviorClassification AlgorithmPrecisionSensitivityF1
3 m4 m5 m3 m4 m5 m3 m4 m5 m
ActiveANN626363626464606262
DT545556555656575556
GB596264596264646670
KNN565961666567606164
LR505151757677596060
LSTM526167644957585261
NB545658414243464748
RF576063646671606367
SVM576062616668545860
EatingANN606461434545464948
DT434444424447434446
GB525760525760414343
KNN485256404446424750
LR282827191918222222
LSTM587984628884598384
NB444952192427253235
RF495363394144424549
SVM566063474747464849
RestingANN586162666768616264
DT505356495152495254
GB606265606265626566
KNN605961475457515558
LR303233414142353637
LSTM738979368186488582
NB444647898889585961
RF576164566065566064
SVM303232414243353637
The highest performing scores as determined by the precision, sensitivity, and F1 were shown in bold format. In addition, data presented in bold and underlined format indicate the best performance scores per specific behavior. ANN, artificial neural network; DT, decision tree; GB, gradient boosting; KNN, k-nearest neighbor; LR, logistic regression; LSTM, long short-term memory; NB, naïve Bayesian; RF, random forest; SVM, support vector machine.
Table 4. Related works about classification performance using triaxial accelerometer in detecting cattle behaviors. Behavior.
Table 4. Related works about classification performance using triaxial accelerometer in detecting cattle behaviors. Behavior.
AlgorithmPrecisionSensitivityF1-ScoreReferences
Active (none)----2022 [14]
Eating (chewing)XGB82.0043.0056.00
Resting (none)----
Active (steady standing)RF-58.00-2022 [38]
Eating (ruminating)-89.30-
Resting (laying)-61.10-
Active (standing)SCV--87.402018 [39]
Eating (ruminating)SCV--91.30
Resting (none)----
Active (walking)SVM65.0076.0070.002016 [18]
Eating (ruminating)RFE84.0088.0086.00
Resting (as is)RFE83.0088.0085.00
Active (standing)DT55.0088.00-2015 [36]
Eating (feeding) 93.1098.78
Resting (lying)98.6377.42
Active (standing and walking)SVM70.0074.66-2009 [33]
Eating (ruminating and feeding)83.5075.00-
Resting (lying)83.0080.00-
XGB, extreme gradient boosting; RF, random forest; SCV, stratified cross-validation; SVM, support vector machine; RFE, random forest ensemble; DT, decision tree.
Table 5. The least square means of the classification performance of collar-fitted triaxial accelerometer sensor for the active, eating, and resting behaviors of cattle at different window sizes.
Table 5. The least square means of the classification performance of collar-fitted triaxial accelerometer sensor for the active, eating, and resting behaviors of cattle at different window sizes.
BehaviorPrecisionSensitivityF1
3 m4 m5 m3 m4 m5 m3 m4 m5 m
Active56 b58 a60 a61636557 bc59 ab60 a
Eating48 b51 ab53 a36 ab38 a40 a394243
Resting49 ab51 ab52 a56596051 ab53 ab55 a
Means with different superscripts a–c within a row per performance group differ (p < 0.05).
Table 6. Classification performance of collar-fitted accelerometer sensor based on nine algorithms framed at different minute window sizes for specific behavior of cattle.
Table 6. Classification performance of collar-fitted accelerometer sensor based on nine algorithms framed at different minute window sizes for specific behavior of cattle.
Classification AlgorithmPrecisionSensitivityF1-Score
3 m4 m5 m3 m4 m5 m3 m4 m5 m
ANN616363616263596061
DT525354515354515354
GB596264596264606264
KNN565860575961555760
LR424242545555454646
LSTM597876316662407167
NB515355474850444648
RF565964576064565963
SVM505354575960505254
The highest performing scores as determined by the precision, sensitivity, and F1-score were shown in bold format. In addition, data presented in bold and underlined format indicate the best performance scores per specific behavior. ANN, artificial neural network; DT, decision tree; GB, gradient boosting; KNN, k-nearest neighbor; LR, logistic regression; LSTM, long short-term memory; NB, naïve Bayesian; RF, random forest; SVM, support vector machine.
Publisher’s Note: MDPI stays neutral with regard to jurisdictional claims in published maps and institutional affiliations.

Share and Cite

MDPI and ACS Style

Nogoy, K.M.C.; Chon, S.-i.; Park, J.-h.; Sivamani, S.; Lee, D.-H.; Choi, S.H. High Precision Classification of Resting and Eating Behaviors of Cattle by Using a Collar-Fitted Triaxial Accelerometer Sensor. Sensors 2022, 22, 5961. https://doi.org/10.3390/s22165961

AMA Style

Nogoy KMC, Chon S-i, Park J-h, Sivamani S, Lee D-H, Choi SH. High Precision Classification of Resting and Eating Behaviors of Cattle by Using a Collar-Fitted Triaxial Accelerometer Sensor. Sensors. 2022; 22(16):5961. https://doi.org/10.3390/s22165961

Chicago/Turabian Style

Nogoy, Kim Margarette Corpuz, Sun-il Chon, Ji-hwan Park, Saraswathi Sivamani, Dong-Hoon Lee, and Seong Ho Choi. 2022. "High Precision Classification of Resting and Eating Behaviors of Cattle by Using a Collar-Fitted Triaxial Accelerometer Sensor" Sensors 22, no. 16: 5961. https://doi.org/10.3390/s22165961

Note that from the first issue of 2016, this journal uses article numbers instead of page numbers. See further details here.

Article Metrics

Back to TopTop