SUMMARY
Distinguishing specific behavioural modes from data collected by animal-borne tri-axial accelerometers can be a time-consuming and subjective process. Data synthesis can be further inhibited when the tri-axial acceleration data cannot be paired with the corresponding behavioural mode through direct observation. Here, we explored the use of a tame surrogate (domestic dog) to build a behavioural classification module, and then used that module to accurately identify and quantify behavioural modes within acceleration collected from other individuals/species. Tri-axial acceleration data were recorded from a domestic dog whilst it was commanded to walk, run, sit, stand and lie-down. Through video synchronisation, each tri-axial acceleration sample was annotated with its associated behavioural mode; the feature vectors were extracted and used to build the classification module through the application of support vector machines (SVMs). This behavioural classification module was then used to identify and quantify the same behavioural modes in acceleration collected from a range of other species (alligator, badger, cheetah, dingo, echidna, kangaroo and wombat). Evaluation of the module performance, using a binary classification system, showed there was a high capacity (>90%) for behaviour recognition between individuals of the same species. Furthermore, a positive correlation existed between SVM capacity and the similarity of the individual's spinal length-to-height above the ground ratio (SL:SH) to that of the surrogate. The study describes how to build a behavioural classification module and highlights the value of using a surrogate for studying cryptic, rare or endangered species.
INTRODUCTION
The recording of acceleration using animal-borne electronic devices is gaining popularity in animal research (e.g. Martiskainen et al., 2009; Nathan et al., 2012; Nielsen et al., 2010; Shepard et al., 2008; Wilson et al., 2006). The measure of acceleration includes both static (due to gravity) and dynamic (due to movement) components, which are recorded whilst the animal carries out routine behaviours (Sato et al., 2003). Researchers use miniaturised logging devices to measure acceleration across three axes (tri-axial acceleration) and by calculating overall dynamic body acceleration (ODBA) they can estimate the energy expenditure of the animal (Green et al., 2009; Halsey et al., 2011a; Gleiss et al., 2011). Although it has been recognised that integration of activity-specific metabolic rates with behavioural modes would better reveal the interaction between an animal and its environment (Halsey et al., 2011b), it has rarely been carried out because of the challenges associated with distinguishing different behavioural modes in the acceleration data.
To quantify behavioural modes from acceleration recordings, early studies used visual observation of the animal with the acceleration recording device attached (Halsey et al., 2009; Gómez Laich et al., 2008; Yoda et al., 2001). More recently, pattern recognition and machine learning algorithms have been used to classify the behavioural modes from acceleration collected from free-ranging animals (Gao et al., 2013; Martiskainen et al., 2009; Nathan et al., 2012; Sakamoto et al., 2009). The application of machine learning algorithms to acceleration data has the potential to automate the behavioural mode identification and quantification process from free-ranging animals. The draw-back, however, is that for the algorithms to accurately identify each behavioural mode in the free-ranging animal, a period of observation is required to train the machine learning algorithms using the acceleration feature vectors associated with each behavioural mode. Consequently, for individuals or species where it is not possible to observe the study animal whilst simultaneously recording the acceleration, it has not been possible to calibrate the acceleration data with the associated behaviour.
To date, little work has been undertaken to assess whether surrogate test individuals could be used to qualify and quantify the association between individual behavioural modes and tri-axial acceleration data-streams. We envisage that this technique has merit because researchers in this field may be required to utilise surrogate species for machine learning algorithm training, and that a framework by which these species are selected is required. The use of a surrogate to develop a behavioural classification module would be particularly useful for the assessment of behavioural modes from acceleration data collected on species that are rare, are highly cryptic, or live in environments that prohibit direct visual observation.
In light of this, our objective was to create a behavioural classification module and evaluate its accuracy, precision and sensitivity when identifying behavioural modes from acceleration feature vectors collected from different individuals and species. To build the classification module we used algorithms and software that can be downloaded free from the internet (e.g. Libsvm). In addition, we assessed the relationship between module performance and differences in morphology between the training and test individuals. In this way, we aimed to provide criteria by which researchers may select surrogate individuals/species for auto-recognition of behavioural modes in tri-axial acceleration studies.
MATERIALS AND METHODS
Equipment
To record animal movement patterns, tri-axial accelerometer data loggers were used (G6A, 40×28×16.3 mm, 16 MB memory, 7.3 g mass, 18 mg accelerometer resolution; CEFAS Technology Ltd, Lowestoft, UK). The accelerometer was positioned on the dorsal surface of the neck in the orientation: x, anterior–posterior; y, lateral axis; z, dorsal–ventral (hereafter described as surge, sway and heave) (Shepard et al., 2008), and configured to sample acceleration once per second (1 Hz).
Developing the behavioural mode classification module
This study was carried out under a University of Queensland Animal Ethics permit (SBS/300/12) and Natural England Badger Licence No. 20112793 held by the RSPCA, UK.
The animal used in this study for the development of the behavioural mode classification module training was a well-trained domestic dog (spaniel–poodle cross; Canis lupus familiaris Linnaeus 1758). The accelerometer was placed on the back of the dog's neck and secured on top of the fur using two strips (5×15 cm) of cloth tape (Tesa, Eastern Creek, NSW, Australia) applied in a cross formation. The tag was secured to prevent micro-movement. Animal behaviours were simultaneously monitored using a digital hand-held camcorder (JVC 3610). The dog performed the following behavioural modes on command: running, walking, standing, sitting and sternal recumbency (lying down on the front). Each behaviour was performed continuously for 60 s. Acceleration was recorded whilst the animal was simultaneously videoed at 25 frames s−1.
Behavioural mode annotation of the raw tri-axial acceleration data stream before designation of the feature vectors. The acceleration data were collected from a domestic dog, and annotated manually whilst simultaneously viewing the dog's behaviour by video. All acceleration samples within each section (red dashed lines) have been designated as representing that particular behavioural mode.
Behavioural mode annotation of the raw tri-axial acceleration data stream before designation of the feature vectors. The acceleration data were collected from a domestic dog, and annotated manually whilst simultaneously viewing the dog's behaviour by video. All acceleration samples within each section (red dashed lines) have been designated as representing that particular behavioural mode.
The acceleration data were downloaded using the G5 Host software (Version 6.4 CEFAS Technology Ltd), and exported as a comma separated value (CSV) file. Each acceleration sample was matched to the appropriate video frame through the time-stamp, and then by viewing the video, each of the acceleration samples was labelled with the appropriate behaviour (Fig. 1). Once the data streams had been annotated, the following equations were applied to extract the feature vectors relevant for each behavioural mode.
The fast Fourier transform was also used, which is a routine procedure used to convey respective frequency domain information of a time–domain waveform (Kay and Marple, 1981; Campbell et al. 2006).
Detailed descriptions of the supported vector machine (SVM) algorithms used in this study can be found elsewhere (Boser et al., 1992; Campbell and Ying, 2011; Abe, 2005). To evaluate the behavioural classification module, a web-based graphical user interface was developed (SAAR) (Gao et al., 2013). A number of these software packages are available on the internet; some require computer programming skills (Libsvm; see supplementary material Fig. S1) whilst others provide a user interface for viewing and assessing results (SAAR, Weka; see supplementary material Fig. S1).
Using the classification module to identify and quantify behavioural modes in test species
To test the extent by which the classification module could identify behavioural modes in the acceleration data collected from other individuals, a range of species were chosen to represent a variety of body forms and gaits. Each differed to a different extent from the surrogate individual upon which the behavioural classification module was built. These included: an Australian dingo, Canis lupus dingo (Meyer 1793); a Eurasian badger, Meles meles (Linnaeus 1758); a Bengal tiger, Panthera tigris tigris Pocock 1929; an African cheetah, Acinonyx jubatus (Schreber 1775); an American alligator Alligator mississippiensis Daudin 1802; a hairy-nosed wombat Lasiorhinus krefftii (Owen 1873); an Eastern grey kangaroo Macropus giganteus (Shaw 1790); and a short-beaked echidna Tachyglossus aculeatus (Shaw 1792) (Table 1). The accelerometer was attached to each individual in roughly the same locality as it was positioned on the surrogate animal (dorsal surface behind the head). It was ensured that the device x-, y- and z-plane orientations were identical to those used in the surrogate.
To enable tag attachment, each animal was first distracted with the appropriate food source. Then, whilst the animal was feeding, the accelerometer was taped onto its back at the appropriate location. By using long lengths of cloth tape, it was possible to attach and secure the tag with minimal disturbance to the animal. Once the tag was attached, each animal was released into a large open-air enclosure similar to its natural environment. The tri-axial accelerometry data were recorded at 1 Hz, and the animal was simultaneously videoed using a hand-held camcorder (25 frames s−1) for a 60 min period.
The process by which specific behavioural modes may be identified and quantified in tri-axial acceleration data

The binary classification matrix used to determine the capacity of the domestic dog behavioural classification module for defining running, walking, standing, sitting and sternal recumbency in acceleration recorded from other species

The surrogate trained behavioural classification module was then applied to the acceleration data collected from each species. The behavioural classification module examined the feature vectors associated with each tri-axial sample of acceleration within a 4 s sliding window with a 2 s overlap. Based on these feature vectors, the SVMA within the module assigned the sample to one of the five behavioural modes (running, walking, standing, sitting or sternal recumbency), depending upon which it most closely resembled. A step-wise procedure summary of the building and application of the behavioural module classification is shown in Table 2.
Assessing auto-recognition capacity
The performance of the behavioural classification module in identifying behavioural modes from other individuals was evaluated using commonly used evaluation measures for machine learning experiments (Powers, 2011). In brief, the classified samples were either true positive (behavioural mode identified correctly), true negative (correctly identified as another behavioural mode), false positive (behavioural mode incorrectly identified) or false negative (incorrectly identified as another behavioural mode). Evaluation was undertaken by visualising the data streams, now annotated with the classified behavioural mode, whilst simultaneously viewing the video recording of the animal in real-time – and recording the number and type of each classification. The scores for each behavioural mode then underwent binary classification to assess the accuracy, precision and sensitivity of the classification module for each behavioural mode (Table 3).
The length of the spine and its minimum height above the ground will influence the gait of a quadruped (Whittle, 2003). Here, we measured the length of the spine and the lowest point of the spine above the ground, hereafter termed the spinal length:height ratio (SL:SH) (Table 1). The influence of SL:SH upon the surrogate instructed SVMA behavioural recognition capacity (accuracy, precision and sensitivity/recall) was assessed using linear regression. A run test was used to ensure there was no departure from linearity.
RESULTS
All five of the behavioural modes (running, walking, standing, sitting and sternal recumbency) were identified in eight of the nine test subjects using the behavioural classification module built using acceleration data collected from the domestic dog. These were the dog, dingo, badger, tiger, cheetah, wombat, kangaroo and echidna (see supplementary material Fig. S1). Sitting, sternal recumbency and standing were all predicted by the classification module but because these were visually indiscernible in the alligator it was not rational to undertake the binary classification for this species. The classification module had the highest capacity for behavioural mode recognition (>95%) when operating upon acceleration data collected from the same species as the surrogate (Fig. 2). Behavioural classification capacity remained high (>90%) for a different species (cheetah) if the SL:SH was similar to that of the surrogate, but was reduced (80–90%) in species (tiger, badger, wombat) whose SL:SH was 1.5- to 2-fold greater than that of the surrogate. Behavioural classification capacity was poor for individuals whose SL:SH was greater than 3-fold (kangaroo, echidna) that of the surrogate. Overall, there was a significant negative linear relationship (run-test, P=0.1556; F1,22=39.45, P<0.01) for the difference in SL:SH between that of the surrogate and the study species and the performance of the behavioural classification module (Fig. 3).
DISCUSSION
This study describes a procedure whereby a behavioural classification module trained upon acceleration data collected from one individual can be used to identify and quantify behavioural modes in different individuals and even different species. A practical use for this technique would be to identify and quantify behavioural modes in free-ranging individuals that are difficult to visually observe or when no captive subjects of that species are available (e.g. Ethiopian wolf, Canis simensis) (Gottelli and Sillero-Zubiri, 1992).
The capacity of the domestic dog behavioural classification module to identify behavioural modes in acceleration collected from other individuals/species (black, accuracy; light grey, precision; dark grey, sensitivity/recall). Bars represent means ± s.e.m. for each of the behavioural modes (running, walking, standing, sitting and sternal recumbency).
The capacity of the domestic dog behavioural classification module to identify behavioural modes in acceleration collected from other individuals/species (black, accuracy; light grey, precision; dark grey, sensitivity/recall). Bars represent means ± s.e.m. for each of the behavioural modes (running, walking, standing, sitting and sternal recumbency).
The relationship between the species spine length to spine height above the ground ratio (SL:SH) and the binary classification score for module accuracy (solid line; y=−0.05x+1.13, r2=0.74), precision (dotted line; y=−0.07x+1.07, r2=0.74), and sensitivity/recall (dashed line; y=−0.08x+1.14, r2=0.61). Each species is shown at the appropriate location for its SL:SH.
The relationship between the species spine length to spine height above the ground ratio (SL:SH) and the binary classification score for module accuracy (solid line; y=−0.05x+1.13, r2=0.74), precision (dotted line; y=−0.07x+1.07, r2=0.74), and sensitivity/recall (dashed line; y=−0.08x+1.14, r2=0.61). Each species is shown at the appropriate location for its SL:SH.
The performance of the behavioural classification module was highly accurate for individuals of the same species and remained at over 80% for quadruped species that were considerably different in body size and were phylogenetically distant from the surrogate species. For each study species we measured SL:SH as the ratio between spine length and minimum spine height above the ground. These SL:SH metrics were proficient, but we recognise that more sophisticated measures of gait (Whittle, 2003; Halsey et al., 2008) may well produce performance improvement in the classification module. By chance, the dog had the lowest SL:SH of all species studied, and therefore as the SL:SH of the test subjects increased over that of the dog, the capacity of the SVM algorithm to distinguish each behavioural mode was reduced in a linear manner. This was expected because the speed–dynamic acceleration relationships change due to morphological differences between species (Bidder et al., 2012), which result in variable patterns in dynamic acceleration (Shepard et al., 2008). In practical terms, this leads us to conclude that optimum performance in inter-specific classification species will occur for species with a SL:SH ratio no greater than 2-fold the surrogate's SL:SH ratio.
To create the feature vectors from the acceleration data and apply the SVM algorithms we used a web-based program (Gao et al., 2013). Deterioration in software performance at high sampling rates limited the resolution of the acceleration data that could be processed in real time to 1 Hz. This rate of acceleration sampling is considered low (Ropert-Coudert and Wilson, 2004), and sampling rates greater than 8 Hz are generally used for recording acceleration (Martiskainen et al., 2009; Halsey et al., 2011b). Nevertheless, even at 1 Hz the behavioural classification module was proficient in identifying five different behavioural modes in species with a SL:SH similar to that of the surrogate species. To our knowledge this method is the only one to be effective at such low sampling frequencies; however, we acknowledge that at higher sampling frequencies the described methodologies in this paper should enable the automatic recognition of less predictable behaviours such as prey striking, digging or copulation.
Tri-axial acceleration data collected by animal-borne devices contain a wealth of biological information about the study species. However, the volume and complexities of the tri-axial data streams are perhaps limiting their re-use and exploitation by the non-specialist. We hope that the procedures documented in this study aid researchers to access and apply the appropriate mathematical algorithms, and as such, facilitate the development of this exciting area of animal biology.
Acknowledgements
We thank Lyn Beard for the well-trained dog ‘Tigger’. Experiments involving the other animals were possible thanks to staff at Australia Zoo and the RSPCA West Hatch Centre, UK.
FOOTNOTES
FUNDING
This work was supported by an Australian Research Council Linkage Grant to C.E.F. with Australia Zoo as industry partners; L.G. was funded by the China Scholarship Council, and O.R.B. by the European Union's KESS Scholarship and the RSPCA (Royal Society for the Prevention of Cruelty to Animals).
REFERENCES
COMPETING INTERESTS
No competing interests declared.