Behavioral features recognition and oestrus detection based on fast approximate clustering algorithm in dairy cows

Behavioral features recognition was an important effect to detect oestrus and sickness in dairy herds and there is a need for heat detection aid. The detection method was based on the measure of the individual behavioural activity, standing time, and temperature of dairy using vibrational sensor and temperature sensor in this paper. The data of behavioural activity index, standing time, lying time and walking time were sent to computer by lower power consumption wireless communication system. The fast approximate K-means algorithm (FAKM) was proposed to deal the data of the sensor for behavioral features recognition. As a result of technical progress in monitoring cows using computers, automatic oestrus detection has become possible.


Introduction
Behavioural activity is used as an indication of animal comfort, and is one of the most commonly used and sensitive indicators of animal welfare [1]. Breeding results are declining as can be illustrated by a decrease in conception rates after artificial insemination and by an increase in calving intervals. Part of these problems seem to be related to the failure to detect oestrus or to the misdiagnosis of oestrus. So fast and accurate detection of oestrus is essential for reproduction and for maintaining milk production [2].
Nowadays, the most widely used method of estrus detection is visual observation. This method can be achieved with between two and five 20-30 min observation sessions per day and has high detection rates [3]. Automatic detection is another method which using measurements of behavioural activity and other traits in several studies [4]. Cows express a number of behavioural changes during estrus, including an increase in chin resting, anogenital licking and sniffing, aggressive interactions, and mounting other cows. However, the primary behavioural sign is standing to be mounted by another cow or a bull. The period between the first and last time the cow stands to be mounted is known as standing estrus [5]. Many estrus detection methods use standing to be mounted as the only criterion to determine whether a cow is in estrus.
Oestrous were recently confirmed on large number of animals using electronic devices that allow continuous monitoring of behavioural activity. Automatic recording of behavioural activity can be achieved by a variety of methods, for example, mercury tilt switches, a range of pedometers, piezoelectric acceleration sensors, automated video analysis, laser-based techniques, automatic online position controlling, sensor-controlled platforms, or transponder-induced magnetic fields. Such techniques permit automatic and objective data recording [6]. Conditions for identification of oestrus and successful artificial insemination have become more difficult in recent years due to reduced expression and decreased duration of oestrus [7]. Lars [6] used statistical tests where a mean of recent activity was compared to hindcast mean values. Mülle [8] used linear Kalman filters to estimate the time series parameters which detected by sensor. Further, Firk [4] detected oestrus by Fuzzy logic methods. Patterson [9] adopted generalised likelihood ratio (GLR) test to observed distributions of activity data and further Maeve [10] improved GLR by fuzzy logic classification of the alerts utilising the period between oestruses. Connell combined measurements of milk progesterone level and activity to detect oestruses, both with satisfactory results, but at a penalty in expense of measurements.
Accelerometer-based behavioural activity recording is a widely used method due to its ease of application and its capability to detect both the quantity and the intensity of activity. In the present study we tested Activity Detecting System (ActDecSys) for the measurement of behavioural activity levels. The ActDecSys is an omni-directional accelerometer developed for long-term activity monitoring. In addition, the recording by the AMS is independent of environmental conditions (e.g. darkness).
The first aim of this study was to detect individual behavioural activity, standing time, and temperature of dairy using vibrational sensor and temperature sensor, and to collect data of behavioural activity index、standing time、lying time and walking time were send to computer by low lower power consumption wireless communication system. The second aim was to deal the data of the sensor for behavioral features recognition base on fast approximate K-means algorithm(FAKM).

The ActDecSys system
The ActDecSys system (as seen in in Figure 1) is an electronic device that detects cows that stand to be mounted by a herd leg and provides a continuous monitoring of activity (as seen in in Figure 2). This ActDecSys system, which contains CPU、behavioural activity detect-sensor、lower power consumption wireless communication system, is a compact omnidirectional, vibrating sensor. The acceleration signal is sampled at 32 Hz. An activity count represents the average level of activity within the selected interval which can be set from 10 s to 60 min. The duration of recording varies between 1.5 and 681.3 days (e.g. 45 days at a sample-interval of 1 min) and the start time is arbitrary in advance. The activity counts are stored in CPU memory until readout. For the configuration and downloading of data, the ActDecSys device has to be placed under the range of wireless communication system which is connected with a PC via a cable to a RS232 Comm port. For the purpose of protecting the device against moisture, the joints were sealed with silicone glue, although the casing for the AMS is designed to be waterproof.

. Data
Data was collected over a period of 6 months (April 2013 to September 2013) in three production herds on the experimental farm LUBao in Tai'an. During the study, the average temperature was 27.5℃ with a minimum of 13.3℃ and a maximum of 37.8℃. The average relative humidity was 69%, which was equivalent to an average maximum temperature humidity index(THI) of 80. 8 The dataset consists of measurements of cow number 、detect time interval、steps index and lying/standing behaviour recorded by the commercially available activity sensor.

. Fast Approximate Clustering Algorithm
In this equation, the numerator in the jth term is equal to the sum of the affinities on edges leaving the subset j V and the denominator is equal to the total degree of the subset j V . Minimizing the sum of such terms thus aims at finding a partition in which edges with large affinities tend to stay within the individual subsets j V and in which the sizes of the j V are balanced.
The optimization problem in (1) is intractable and spectral clustering is based on a standard relaxation procedure that transforms the problem into a tractable eigenvector problem. In particular, the relaxation for cut N is based on rewriting (1) as a normalized quadratic form involving indicator vectors. These indicator vectors are then replaced with real-valued vectors, resulting in a generalized eigenvector problem that can be summarized conveniently in terms of the (normalized) graph Laplacian L of A defined as follows: N is based on the eigenvectors of this normalized graph Laplacian. The classical Ncut algorithm focuses on the simplest case of a binary partition, and defines multiway partitions via a recursive invocation of the procedure for binary partitions. In the case of a binary partition, it suffices to compute the second eigenvector of the Laplacian (i.e., the eigenvector with the second smallest eigenvalue). The components of this vector are thresholded to define the class memberships of the data points. Although spectral clustering algorithms that work directly with multiway partitions exist, in the current paper we will focus on the classical recursive cut N algorithm. We assume that the number of clusters is given a priori and we run the recursion until the desired number of clusters is reached. See Algorithm 1 for a specific example of a spectral bipartitioning algorithm where a Gaussian kernel is used to define the pairwise affinities.

Result
The detection data are listed in Table 2 which is the oestrus cow. Figure 3 and Figure 4 are examples of detection results for two dairy cows using two separate detectors, on activity and lying-balance, respectively. The activity measure of the ActDecSys and obtained sensitivity up to 95.9% with an error ratio of 12.0%, according to data from 42 days for 10 dairy cows.    Measurements from ActDecSys that measure both activity and lying behaviour were used to investigate whether combined measurements of activity and lying behaviour could improve reliability of the oestrus detection. With caution due to limited number of dairy cows in the study, the results have shown that very good detection ratios and in particular low false detection ratios can be obtained using the parameter adaptation and change detection techniques on the combined lying-balance and step-count measurements.

Conclusion
The results of the combined detector showed clearly improved performance, enhancing the number of successful alerts and significantly reducing the number of false positives. The automated measurement of oestrus detection can reduce labor requirements for the research assessment of cow behavior and can be a powerful management tool for monitoring and improve understanding of comfort and welfare of dairy cows under the intensive conditions of modern farms.