- Telemetry case report
- Open Access
Identification of behaviours from accelerometer data in a wild social primate
Animal Biotelemetry volume 5, Article number: 6 (2017)
The use of accelerometers in bio-logging devices has proved to be a powerful tool for the quantification of animal behaviour. While bio-logging techniques are being used on wide range of species, to date they have only been seldom used with non-human primates. This is likely due to three main factors: the long tradition of direct field observations, a difficulty of attaching bio-logging devices to wild primates and the challenge of deciphering acceleration signals in species’ with remarkable locomotor and behavioural diversity. Here, we overcome these aforementioned obstacles and provide methodology for identification of behaviours from accelerometer data of wild chacma baboons (Papio ursinus) in Cape Town, South Africa.
We apply machine learning techniques to process complex accelerometer data, collected by bespoke tracking collars to quantify a range of behaviours (focusing on locomotion and foraging behaviour). We successfully identify six broad state behaviours that represent 93.3% of the time budget of the baboons. Resting, walking, running and foraging were all identified with high recall and precision representing the first classification of multiple behavioural states from accelerometer data for a wild primate.
Our ‘end to end’ process—from collar design and build to the collection and quantification of acceleration data—provides advantages over gathering data by traditional observation, not least because it affords data collection without the presence of an observer which may affect an animal’s behaviour. Furthermore, our methodology and findings open new possibilities for the fine-scale study of movement and foraging ecology in wild primates, and in particular our baboon study population which is in conflict with people.
The development of animal-attached devices that provide data on animal movement, behaviour or physiology (without the need to directly observe the animal) has proved a powerful way to quantify animal behaviour [1, 2]. In particular, three-dimensional accelerometers have been used to reconstruct animal behaviour [1, 3]. The use of accelerometers has been used most widely in studies of marine mammals and birds [3, 4], but recent advances in bio-logging technologies have made devices smaller, cheaper and longer-lasting, drawing interest from researchers working with a wider diversity of species . Behaviours identified from acceleration data can range from simple active–inactive behaviour [6, 7] to the dynamics of prey capture  or even the classification of ‘internal state’ .
Bio-logging techniques are seldom used on non-human primates, probably due to the long tradition of direct observation by researchers in the field [10, 11, 12]. However, bio-logging can provide information on elusive or out of sight behaviours that are difficult to record [13, 14] and reduce potentially negative outcomes associated with observer presence , or habituation to observation [16, 17]. To date, only a handful of studies have used accelerometer data to infer behaviours in primates, but these analyses have been limited to broad levels of activity, rather than specific behavioural states (rhesus monkeys, Macaca mulatta , vervet monkeys, Chlorocebus pygerythrus  and owl monkeys, Aotus azarai ). To our knowledge, the only study that has used accelerometers to identify specific behaviour was undertaken by Sellers and Crompton  where they successfully identified locomotion events in captive red-ruffed lemur (Varecia variegata rubra). Therefore, unlike other terrestrial species [22–25] no acceleration ethogram (a catalogue of different acceleration footprints produced by different behaviour of an animal) exists for any non-human primate.
An acceleration ethogram would be particularly useful to collect fine-scale behavioural data with high temporal resolution. Among many applications, such methods could be used to document situations where primates are in conflict with people in species ranging from chimpanzees (Pan troglodytes)  to macaques (Macaca mulatta)  allowing us to quantify the occurrence of such events and their spatial–temporal dynamics. One of the most high-profile non-human primate–human conflict occurs with people and baboons in the Cape Peninsula, South Africa, with baboons raiding bins, properties or taking food directly from people themselves daily . We are particularly interested in using acceleration data to document baboons’ behaviour in this environment to understand baboons’ behavioural responses to anthropogenic change, but in order to complete this later goal (not developed in the present work), we first need to define a reliable method to assess behaviour through acceleration.
A key challenge that is common to all studies involving the use of accelerometer data lies in the analysis of the data. This is particularly pertinent for datasets that extend over weeks or even months, which are typically extremely large. To infer behaviour from acceleration data, researchers manually annotate the signal by expert interpretation , or ‘label’ behaviours in the acceleration signals, ideally using time-matched behavioural observation, to teach machine learning algorithms [29–31]. The broad approaches can be applied across taxa, although the specific selection of variables is likely to vary with and reflect characteristic movement modes, behavioural categories and habitat types of a particular species or population.
Here, we aim to describe a reliable ‘end to end’ process to quantify major behavioural states from tri-axial acceleration, applied here to baboons, but potentially transferable to other primates or contexts. We equipped n = 10 adult male baboons in the Cape Peninsula, South Africa, with three axial accelerometers and used video footage of the collared baboons ranging in their natural environment to generate a labelled dataset. We then used random forest models  to match behaviour and acceleration in the dataset with a focus on the identification of locomotion gaits and foraging behaviour . Finally we compared the model predictions to our observations to test its accuracy and validate our procedure.
The general workflow of the methods is summarised in Fig. 1. All data processing and analyses were conducted in R (R version 3.2.2, R Core Team (2015). R: A language and environment for statistical computing. R Foundation for Statistical Computing, Vienna, Austria. URL https://www.R-project.org/.), and all codes used are provided in Additional file 1 (Computation of acceleration variables for behavioural identification) [22, 30].
Study site and subjects
We studied the ‘Constantia’ baboon troop that ranges in a varied landscape at the edge of the City of Cape Town (S −34.0349, E 18.4156) (for more details see ) for 30 days from mid-May to mid-June 2015. The troop comprised 13 adult males, 25 adult females, 4 subadult males and approximately 30 juveniles of both sexes.
Acceleration data (Fig. 1a)
Ten adult males were fitted with SHOAL group in-house constructed collars (F2HKv2 collars, see Additional file 2, Baboon collar development). Each collar contained a tri-axial accelerometer (‘Daily Diary’ sensor ) recording acceleration in each axis at 40 Hz which allows for the study of behaviours of most terrestrial animals whose fastest movements range between 0.5 s to 1 s. Baboons were cage-trapped in accordance with the local ‘baboon management team’-approved protocol before being sedated by a certified veterinary surgeon and fitted with the collar. Collars weighed less than 3% of the body mass of the baboons and were approved for use by Swansea University Ethics Committee (Swansea University IP-1314-5). Of the 10 collars fitted to the baboons, one baboon dispersed before we were able to collect video data (see below) and so our sample is based on n = 9 individuals.
Video data (Fig. 1b)
Baboons were habituated to close (≤10 m) human observation and could thus be followed on foot by one or two observers without affecting their behaviour. Collar equipped individuals were video recorded using an AEE SD100 camera (PNJ SARL, Paris, France) for 15.3 h in total with a mean ± standard deviation of 1.7 ± 0.96 h per individual.
Video processing (Fig. 1c)
Footage was time-stamped to allow synchronisation with the accelerometer, and the signal was annotated using Framework4 . We labelled behaviours at time steps of one second, relevant for most behaviours (mean duration of one behavioural bout (±SD) = 33 s ± 62 s, median = 12 s) [22, 34], leading to a sample size of 33,619 s. This created a dataset with n = 18 labelled behaviours (Tables 1, 2) for a total of 9.3 h. All rare behaviours with less than 100 s of observations (representing in total 7.3% of their time budget) were discarded from further analysis, bringing the labelled sample down to 33,387 s, i.e. 9.2 h (on average 1.2 ± 1.3 h (SD) per behaviour and on average 1.0 ± 0.6 h (SD) per individual, Table 2).
Analyses of acceleration data (Fig. 1d)
There are essentially two main types of variables that can be derived from tri-axial acceleration data that are relevant to the identification of behaviour. These are static acceleration, which is dependent on gravity and describes the posture of the animal, and dynamic body acceleration, which reflects the body movement of the animal. These variables can be measured in each of the three-dimensional axes (with X for ‘surge’, Y for ‘sway’ and Z for ‘heave’; Fig. 2). Data from the three axes can also be combined to give a general index of body motion.
In order to match our behavioural sampling frequency (1 Hz) and identify behaviours at this frequency, we computed mean values over one second for a total of 25 variables that describe both static (Fig. 1b) and dynamic (Fig. 1c) acceleration data across our individuals. The list that follows summarises each of these variables, which are numbered 1–25 in round parentheses: (1–3) tri-axial static acceleration ; (4–5) pitch and roll ; (6) vectorial dynamic body acceleration (VeDBA); (7) smoothed vectorial dynamic body acceleration (VeDBAs) [35, 36]; (8–10) tri-axial partial dynamic body acceleration (PDBA) ; (11–13) the tri-axial PDBA-to-VeDBA ratio. In addition to these descriptive statistics, we processed the dynamic part of the acceleration further by computing its (14–16) tri-axial power spectrum density (PSD); (17–19) maximum frequencies associated with the tri-axial PSDs; (20–22) the second maximum frequencies associated with the tri-axial PSDs; (23–25) the associated frequency for each axis. We provide a full description for each of these variables (1–25), in turn, below.
(1–3) The static (st) component of acceleration for each axes stX, stY and stZ is directly influenced by the orientation of the logger with respect to gravity and therefore indicative of the posture of the animal [1, 37]. The tri-axial static acceleration was calculated from the raw acceleration with a running mean of 3 s . From the resulting 3D-static acceleration, the angles (4) pitch and (5) roll were calculated, converting the 3D orientation towards gravity (measured in g), to two angles (in degrees) using the plane and upright position as Ref. . Pitch was calculated as the arcsine of stX and roll as the arcsine of stY .
Tri-axial dynamic body acceleration (DBA), which represents overall body movement [1, 35], was calculated as the difference between raw and static acceleration from each axis. We note that centripetal acceleration can also affect the acceleration signal (e.g. when an animal ‘pulls g’ by cornering); however, this is unlikely to be a main factor affecting the acceleration signal in baboons. (6) The vectorial dynamic body acceleration (VeDBA) was computed using the dynamic components of the signal to assess the ‘activity level’ of the individual, bringing the three axes (x, y, z) together as given by Eq. 1.
To allow for a general estimation of activity, reducing the impact of short high-amplitude burst of activity, we (7) smoothed the VeDBA using a running mean of 3 s, that is, ‘smoothed VeDBA’. (8–10) Partial dynamic body acceleration  was also calculated in each different axis in order to describe the amplitude of the movement, calculated as the absolute dynamic acceleration values for each axis (11–13). The PDBA-to-VeDBA ratio provided an estimation of contribution of each axis to the VeDBA, calculated by the ratio of PDBA to the VeDBA in each of the three axes.
To characterise the oscillations in the dynamic body acceleration for each axis, we computed (14–16) power spectrum densities (PSDs) and their associated frequencies using Fourier analysis [21, 39]. Fast Fourier analysis decomposes the signal into frequencies and amplitude. It can therefore be used to indicate at which frequency the signal varies the most, providing an overview of large body movements and ignoring signal associated with small body movements. For each second, we defined (17–19) maximum PSD and (20–22) second maximum PSD together with their (23–25) associated frequencies, at an interval of 3 s (1 s after and 1 s before, this in order to sample enough oscillations to define a frequency even for slow cyclic behaviour such as walking).
Acceleration variables were time-matched with our video-based behavioural data to obtain a labelled dataset. Of this dataset, 60% was used as a training dataset (20,111 s, 5.6 h) and 40% as a validation dataset which we later used to test the success of our model predictions (13,276 s, 3.7 h, Fig. 1e).
Model fitting via random forest models (Fig. 1h; Fig. S1)
To be able to assign behaviours according to the 25 descriptive variables (see above), we used random forests. Random forests are based on classification trees and, in summary, build many trees using a random subset of the data each time, and a random subspace of variables for each classification step. Thanks to the great number of iterations (here 500) and two ‘layers of randomness’ , this model has the advantage of being more powerful than the classical classification trees, limiting the risk of overfitting and of being more able to cope with unbalanced dataset .
The first step of the random forest is to sample the initial training set randomly with replacement (such that one observation can be drawn many times), resulting in several bootstrapping sets with the same number of observations as the initial training set (Additional file 3: Fig. S1). Due to replacement, not all observations are represented in every bootstrapping set.
From one of these artificial sets of data, the model builds one classification tree which aims to classify the full set of observations into different classes (here, behaviours) by building a set of hierarchical decision rules based on the given variables (Additional file 3: Fig. S1 ). At each node (a set of observations, represented by a circular graph when two branches split in Additional file 3: Fig. S1), the model will aim to split this set of observations into two smaller and ‘purer’ subsets, i.e. each subset contains a fewer number of different classes (here, behaviours). A subset is considered as pure when it only contains one kind of behavioural classes. This purity, or its absence, is quantified with the Gini impurity index (Eq. 2) which will tend to zero when only one class is represented in a subset.
where n is the number of behavioural classes and p i is the proportion of each class in the set of observations. At each step of the classification, the model uses a random selection of the total variables available and tests each of them with different thresholds to define a rule that will minimise the Gini index in the two descendent subsets (Additional file 3: Fig. S1). This process continues until no more rules can be found to split the dataset into purer subsets. The local importance of a variable is calculated by the index of the parent set of observations minus the Gini indexes of the two descendent subsets. We classified the variables according their overall importance and performed Kruskal–Wallis tests to compare the mean of the most discriminating variables according to the different behaviours.
When using random forests, the model will simply grow many trees, each built from a different random portion of the training set (60% of our initial dataset). Because the advantages of random forests come from the high number of iterations, we built 500 trees. We tested post hoc the minimum number of trees required to obtain the best classification and found that the best results were reached above 300 trees (Additional file 4: Fig. S2).
Model validation (Fig. 1g, i)
Once we built our model, we used it to predict the behaviour of our validation dataset. All analyses were conducted in R environment (version 3.2.2) with the package random forest . Each time unit is therefore classified according the 500 trees, each assigning one behavioural class to the time unit, ending in 500 predictions (Additional file 3: Fig. S1). Then, the most frequent predictions across all trees were selected as the final prediction (Additional file 3: Fig. S1). We then compared the predicted behaviour with the observed behaviour and built a confusion matrix to assess the recall and the precision of the model  (Fig. 1h) as described in Eqs. 3 and 4:
where TP is true positive, TN true negative, FP false positive and FN false negative for each behaviour.
Acceleration ethogram (model fitting)
Of the variables calculated from our acceleration data, static acceleration on all axes, X, Y and Z (which provides information on the ‘posture’ of the baboon) were the most important for distinguishing behaviours, stX, stY, stZ being ranked 1st, 6th and 13th and pitch and roll being ranked 2nd and 12th in our model (Fig. 3a). The static acceleration for the X axis (stX) were different between resting (sitting, median [1st and 3rd quartile]: 0.62 g [0.50 g–0.73 g], Additional file 5: Table S1) and behaviours in standing postures such as locomotion and foraging (median [1st and 3rd quartile]: 0.01 g [−0.29 g–0.23 g], Additional file 5: Table S1, Kruskal–Wallis Chi-squared = 20,264.87, df = 7, p value <0.001, Fig. 3b).
Power spectrum densities (PSDs) were the next most important class of variables, with four out of six of these measures ranked in the top ten. The PSD2 on the X axis and PSD1 on the Z axis was, as expected, the highest for running behaviour (PSD1Z median [1st and 3rd quartile]: 0.5870 [0.2614–0.6792]; PSD2X median [1st and 3rd quartile]: 0.0405 [0.0220–0.0586], Additional file 5: Table S1), indicating high-amplitude movements happening on a regular frequency. Walking behaviour was represented by intermediate values for these variables (PSD1Z median [1st and 3rd quartile]: 0.0157 [0.0092–0.0268]; PSD2X median [1st and 3rd quartile]: 0.0025 [0.0043–0.0075], Additional file 5: Table S1) while foraging behaviour, with low-amplitude movements was represented with lower values (PSD1Z median [1st and 3rd quartile]: 0.0008 [0.0004–0.0016]; PSD2X median [1st and 3rd quartile]: 0.0007 [0.0004–0.0016], Additional file 5: Table S1). Overall we found significant differences between the three behaviours on these variables (Kruskal–Wallis Chi-squared 22,773.87, df = 7, p value <0.001, Fig. 3). In contrast, the ratio and frequency measures did not contribute much to the model’s ability to classify behaviours (Fig. 3).
Model accuracy (validation procedure)
The random forest model reached an average precision of 88.3% (±8.5%) and a mean recall of 70.7% (±29.3%) across all behaviours (Fig. 3c; Table 3). The recognition (or extraction) of foraging, resting, running and walking shows a high precision and recall (>85%), while lying and grooming (both when focal is actor and receiver) have high precision (>85%) but lower recall (>60% for lying and grooming [receiver] and >20% for grooming [actor]); the missing instances being principally classified in other low-amplitude behaviours (Fig. 3c; Table 3). The extraction of standing behaviours was poor (recall: 38.9%, precision: 67.9%), and instances of standing that were misclassified tended to be labelled as foraging and resting.
We have successfully used acceleration data to identify six behaviours performed by adult male chacma baboons. These behaviours represented 93.3% of the time budget recorded from video observations and the first ethogram from acceleration data for a wild non-human primate. Behaviours relevant to raiding behaviours (foraging, running, walking and resting), which are important with respect to the study population , were successfully identified with good precision and recall (>85%). We discuss the variables calculated from our accelerometer that contributed to identification of these behaviours in turn.
Static acceleration and the smoothed vectorial dynamic body acceleration (VeDBA) were among the most important variables and were found to be different between active and inactive behaviours. Differentiating between active and inactive behaviours is commonly done with variables such as VeDBA or VeDBAs [1, 7, 18, 24]. Interestingly, static acceleration metrics are not always included as discriminators in machine learning algorithms  and so our findings suggest that this could be an important factor for other primate researchers to include in their models.
The performance of our model varied when it came to the different inactive behaviours, while resting was extracted with a high recall and precision, standing behaviour was less accurately described. A standing posture is adopted within a range of other behaviours (during locomotion, or foraging, for example), and this may explain the difficulty in identifying resting or vigilance when standing, particularly when other activities are executed slowly. Differentiating non-active behaviours has proved difficult in other species too; for example, in vultures static acceleration was not useful for differentiating between different types of passive flights behaviour, such as gliding, thermal soaring or slope soaring . This problem is therefore not unique to the baboons and suggests there is an inherent problem in using acceleration data to classify behaviours which involve subtle movements and especially when these movements are adopted with similar postures . Nevertheless, the identification of a broad inactivity category is likely sufficient for most researchers and questions. For instance, the identification of inactivity could enable us to identify habitats that can be used as refuges. More generally, in the case of our baboon research in the Cape Peninsula, identifying inactivity before and after a raiding event, or short inactive pauses while travelling, could indicate periods of vigilance and can overall be used to explore how and when baboons adopt ‘sit and wait’ raiding (foraging) strategies . Similarly, identification of inactivity can provide interesting insights into energy expenditure and recovery time in other systems [24, 19, 42].
Locomotion (walking and running) were the best identified behaviours by our model (92% of the misclassifications occurring in running were composed of walking—either running segments classified as walking or walking segments classified as running). This efficiency in the recognition of locomotion has been observed in other species and reflects a regular signal in the heave channel [1, 3, 23] and/or frequency of the general acceleration [1, 21, 43]. This result is also consistent with the importance of the 1st maximum power spectrum density peak in the Z channel (PSD1Z) describing the amplitude of the sinusoidal pattern during locomotion on the Z axis (Fig. 2). Because locomotion is generating the patterns, we frequently describe by the use of GPS data and mathematical models of animal movement [44–46], accurately describing locomotion phases versus sedentary phases via acceleration can allow the user to correct GPS errors and investigate movements which are happening between fixes. Combining GPS and acceleration data will therefore increase the reliability of both data streams that are at the basis of burgeoning field of movement ecology . In the context of our larger programme of research on baboons, locomotion’s precision and recall will enable us to explore the dynamics of forays into urban areas by raiding baboons , such as the speed of the approach or the sinuosity of trajectories .
Our model was extremely successful at extracting foraging, despite the fact that a wide diversity of ‘types’ of foraging behaviours are exhibited by baboons . Indeed, our model successfully extracted most foraging events (recall = 93.5%) which is particularly important for the study of a short lived behaviour such as raiding behaviour . Foraging in baboons is almost never performed in isolation of other behaviours, as it can take place while being stationary (sitting, or standing, i.e. stationary foraging ) or while walking (i.e. travel foraging ). Interestingly, the 2nd maximum power spectrum density peak in the X axis (PSD2X), the fourth most important variable, was important for quantifying a sinusoidal pattern in the secondary amplitude. As such, PSD2X was important for identifying behaviours of smaller amplitude that co-occur during other activities of higher amplitude such as chewing (foraging); which can occur while walking, for example (Fig. 2). We therefore suggest that this variable can be of interest for accelerometer users looking at the foraging ecology of primates or species sharing a similar foraging behaviour. Indeed, researchers have had success identifying foraging in other terrestrial species [23, 43, 49, 50], in birds using location clues, for example, from GPS or pressure sensors [8, 39, 51] and in sea mammals using, for example, mandible accelerometers [52, 53]. This suggests that ‘complex’ foraging behaviours in fact lend themselves to identification from acceleration (and other bio-logger) signals, and offers a useful avenue for further research.
While the main focus of our study was locomotion and foraging behaviours, we also identified grooming from our collar data. The maintenance of social affiliation by baboons is mostly mediated through grooming, especially for females [12, 11, 54]. As such, grooming has been studied in various contexts across primates , and it constitutes one of the most used metrics to build social networks [54, 55]. Grooming behaviour is traditionally identified by direct observation only and is therefore limited by the number of observers available to witness it and their ability to recognise individuals’ identity, and thus recording only one or a few interactions at a time. We were able to identify grooming with >60% of recall and precision when the focal individual was receiver and >20% when the focal individual was the actor. Further work would be needed to confirm this extraction since our model included grooming events from two baboons with few independent events, which could have led to overfitting in the model. Because adult males rarely if ever groom one another, by collaring females that spend a high proportion of their time grooming each other , it is likely that grooming behaviour (active and passive) could be resolved with greater confidence (since the dyad would be stationary and grooming one another). To identify even a fraction of grooming events remotely using tracking collars could transform our ability to explore the spatial–temporal dynamics of social relationships in baboons (and other grooming species) . In the future, grooming data identified through acceleration would afford researchers opportunity to comprehensively investigate questions relating to ‘biological market theory’ [56, 58], or enhance our understanding of decision processes in movements and leadership [59, 60], for example.
Overall our study shows that the use of accelerometers can document foraging strategies and social behaviour in wild primates. Such methodology provides advantages in gathering data with limited direct observation [15, 16] and offers an alternative to habituation of wild primates . We hope that researchers interested in primate behavioural ecology will be inspired by the ‘end to end’ process that we have described here. This paper offers a full protocol—from collar design and construction to the identification of behaviours from accelerometers—for any researcher working with a medium- to large-sized primate. We hope that researchers in the fields of both primatology and biotelemetry make the most of these exciting new opportunities.
Vectorial dynamic body acceleration
Smoothed vectorial dynamic body acceleration
Partial dynamic body acceleration
Power spectrum density
- stX, stY, stZ:
Static acceleration on X, Y and Z axes
Dynamic body acceleration
Shepard E, Wilson R, Quintana F, Gómez Laich A, Liebsch N, Albareda D, et al. Identification of animal movement patterns using tri-axial accelerometry. Endanger. Species Res. 2008;10:47–60.
Cooke SJ. Biotelemetry and biologging in endangered species research and animal conservation: relevance to regional, national, and IUCN Red List threat assessments. Endanger. Species Res. 2008;4:165–85.
Yoda K, Sato K, Niizuma Y, Kurita M, Bost CA, Le Maho Y, Naito Y. Precise monitoring of porpoising behaviour of Adélie penguins determined using acceleration data loggers. J. Exp. Biol. 1999;202:3121–6.
Kooyman G, Cherel Y, Lemaho Y, Croxall J, Thorson P, Ridoux V. Diving behavior and energetics during foraging cycles in king penguins. Ecol. Monogr. 1992;62:143–63.
Boyd I, Kato A, Ropert-Coudert Y. Bio-logging science: sensing beyond the boundaries. Mem. Natl. Inst. Polar Res. Spec. Issue. 2004;58:1–14.
Whitney NM, Papastamatiou YP, Holland KN, Lowe CG. Use of an acceleration data logger to measure diel activity patterns in captive whitetip reef sharks, Triaenodon obesus. Aquat. Living Resour. 2007;20:299–305.
Gervasi V, Brunberg S, Swenson JE. An individual-based method to measure animal activity levels: a test on brown bears. Wildl. Soc. Bull. 2006;34:1314–9.
Watanabe YY, Takahashi A. Linking animal-borne video to accelerometers reveals prey capture variability. PNAS. 2013;110:2199–204.
Wilson RP, Grundy E, Massy R, Soltis J, Tysse B, Holton M, et al. Wild state secrets: ultra-sensitive measurement of micro-movement can reveal internal processes in animals. Front. Ecol. Environ. 2014;12:582–7.
Altmann J. Observational study of behavior: sampling methods. Behaviour. 1974;49:227–67.
Dunbar RIM. Time: a hidden constraint on the behavioural ecology of baboons. Behav. Ecol. Sociobiol. 1992;31:35–49.
Strum SC. The development of primate raiding: implications for management and conservation. Int. J. Primatol. 2010;31:133–56.
Campbell-Smith G, Simanjorang HVP, Leader-Williams N, Linkie M. Local attitudes and perceptions toward crop-raiding by orangutans (Pongo abelii) and other nonhuman primates in Northern Sumatra, Indonesia. Am. J. Primatol. 2010;72:866–76.
Naughton Treves L. Predicting patterns of crop damage by wildlife around Kibale National Park, Uganda. Conserv. Biol. 1998;12:156–68.
Nowak K, le Roux A, Richards SA, Scheijen CPJ, Hill RA. Human observers impact habituated samango monkeys’ perceived landscape of fear. Behav. Ecol. 2014;25:1199–204.
Boyer-Ontl KM, Pruetz JD. Giving the forest eyes: the benefits of using camera traps to study unhabituated chimpanzees (Pan troglodytes verus) in Southeastern Senegal. Int. J. Primatol. 2014;35:881–94.
Strier KB. Long-Term Field Studies: positive Impacts and Unintended Consequences. Am. J. Primatol. 2010;72:772–8.
Papailiou A, Sullivan E, Cameron JL. Behaviors in rhesus monkeys (Macaca mulatta) associated with activity counts measured by accelerometer. Am. J. Primatol. 2008;70:185–90.
McFarland R, Hetem RS, Fuller A, Mitchell D, Henzi SP, Barrett L. Assessing the reliability of biologger techniques to measure activity in a free-ranging primate. Anim. Behav. 2013;85:861–6.
Fernandez-Duque E, Erkert HG. Cathemerality and lunar periodicity of activity rhythms in owl monkeys of the Argentinian Chaco. Folia Primatol. 2006;77:123–38.
Sellers WI, Crompton RH. Automatic monitoring of primate locomotor behaviour using accelerometers. Folia Primatol. 2004;75:279–93.
Lagarde F, Guillon M, Dubroca L, Bonnet X, Ben Kaddour K, Slimani T, et al. Slowness and acceleration: a new method to quantify the activity budget of chelonians. Anim. Behav. 2008;75:319–29.
Moreau M, Siebert S, Buerkert A, Schlecht E. Use of a tri-axial accelerometer for automated recording and classification of goats’ grazing behaviour. Appl. Anim. Behav. Sci. 2009;119:158–70.
Ringgenberg N, Bergeron R, Devillers N. Validation of accelerometers to automatically record sow postures and stepping behaviour. Appl. Anim. Behav. Sci. 2010;128:37–44.
Williams HJ, Shepard ELC, Duriez O, Lambertucci SA. Can accelerometry be used to distinguish between flight types in soaring birds? Anim. Biotelem. 2015;3:1–11.
Krief S, Cibot M, Bortolamiol S, Seguya A, Krief J-M, Masi S. Wild Chimpanzees on the Edge: nocturnal Activities in Croplands. PLoS ONE. 2014;9:e109925.
Beisner BA, Heagerty A, Seil SK, Balasubramaniam KN, Atwill ER, Gupta BK, et al. Human–wildlife conflict: proximate predictors of aggression between humans and rhesus macaques in India. Am. J. Phys. Anthropol. 2015;156:286–94.
Hoffman TS, O’Riain MJ. The spatial ecology of chacma baboons (Papio ursinus) in a human-modified environment. Int. J. Primatol. 2010;32:308–28.
Guilford T, Meade J, Willis J, Phillips RA, Boyle D, Roberts S, et al. Migration and stopover in a small pelagic seabird, the Manx shearwater Puffinus puffinus: insights from machine learning. Proc. R. Soc. B. 2009;276:1215–23.
Resheff YS, Rotics S, Harel R, Spiegel O, Nathan R. AcceleRater: a web application for supervised learning of behavioral modes from acceleration measurements. Mov. Ecol. 2014;2:27.
Walker JS, Jones MW, Laramee RS, Holton MD, Shepard EL, Williams HJ, et al. Prying into the intimate secrets of animal lives; software beyond hardware for comprehensive annotation in “Daily Diary” tags. Mov. Ecol. 2015;3:29.
Breiman L, Friedman J, Stone CJ, Olshen RA. Classification and regression trees. Chapman & Hall/CRC; 1984.
Fehlmann G, O'Riain MJ, Kerr-Smith C, King AJ, et al. Adaptive space use by baboons (Papio ursinus) in response to management interventions in a human-changed landscape . Anim. Conserv. 2017;20(1):101–9
Bom RA, Bouten W, Piersma T, Oosterbeek K, van Gils JA. Optimizing acceleration-based ethograms: the use of variable-time versus fixed-time segmentation. Mov Ecol. 2014;2:1–8.
Wilson RP, White CR, Quintana F, Halsey LG, Liebsch N, Martin GR, et al. Moving towards acceleration for estimates of activity-specific metabolic rate in free-living animals: the case of the cormorant. J. Anim. Ecol. 2006;75:1081–90.
Qasem L, Cardew A, Wilson A, Griffiths I, Halsey LG, Shepard ELC, et al. Tri-Axial Dynamic Acceleration as a Proxy for Animal Energy Expenditure; Should We Be Summing Values or Calculating the Vector? PLoS ONE. 2012;7:e31187.
Fourati H, Manamanni N, Afilal L, Handrich Y. Posture and body acceleration tracking by inertial and magnetic sensing: application in behavioral analysis of free-ranging animals. Biomed. Signal Process. Control. 2011;6:94–104.
Shepard ELC, Wilson RP, Halsey LG, Quintana F, Gomez Laich A, Gleiss AC, et al. Derivation of body motion via appropriate smoothing of acceleration data. Aquat. Biol. 2009;4:235–41.
Shamoun-Baranes J, Bom R, van Loon EE, Ens BJ, Oosterbeek K, Bouten W. From Sensor Data to Animal Behaviour: an Oystercatcher Example. PLoS ONE. 2012;7:e37997.
Breiman L. Random Forests. Mach. Learn. 2001;45:5–32
Liaw A, Wiener M. Classification and regression by randomForest. R news. 2002;2:18–22.
Shepard ELC, Wilson RP, Rees WG, Grundy E, Lambertucci SA, Vosper SB. Energy Landscapes Shape Animal Movement Ecology. Am. Nat. 2013;182:298–312.
Watanabe S, Izawa M, Kato A, Ropert-Coudert Y, Naito Y. A new technique for monitoring the detailed behaviour of terrestrial animals: a case study with the domestic cat. Appl. Anim. Behav. Sci. 2005;94:117–31.
Börger L, Dalziel BD, Fryxell JM. Are there general mechanisms of animal home range behaviour? A review and prospects for future research. Ecol. Lett. 2008;11:637–50.
Sims DW, Righton D, Pitchford JW. Minimizing errors in identifying Lévy flight behaviour of organisms. J. Anim. Ecol. 2007;76:222–9.
Sueur C. A Non-Lévy Random Walk in Chacma Baboons: what Does It Mean? PLoS ONE. 2011;6:e16131.
Whiten A, Byrne RW, Barton RA, Waterman PG, Henzi SP, Hawkes K, et al. Dietary and Foraging Strategies of Baboons [and Discussion]. Phil. Trans. R. Soc. Lond. B. 1991;334:187–97.
King AJ, Cowlishaw G. All together now: behavioural synchrony in baboons. Anim. Behav. 2009;78:1381–7.
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–8.
Lush L, Ellwood S, Markham A, Ward AI, Wheeler P. Use of tri-axial accelerometers to assess terrestrial mammal behaviour in the wild. J Zool. 2016;298(4):257–65
Sakamoto KQ, Sato K, Ishizuka M, Watanuki Y, Takahashi A, Daunt F, Wanless S, et al. Can Ethograms Be Automatically Generated Using Body Acceleration Data from Free-Ranging Birds? PLoS One 2009;4(4):e5379
Naito Y, Bornemann H, Takahashi A, McIntyre T, Plötz J, et al. Fine-scale feeding behavior of Weddell seals revealed by a mandible accelerometer. Polar Biol. 2010;4(2):309–16
Viviant M, Trites AW, Rosen DAS, Monestiez P, Guinet C, et al. Prey capture attempts can be detected in Steller sea lions and other marine predators using accelerometers. Polar Biol. 2010;33(5):713–19
Lehmann J, Korstjens AH, Dunbar RIM. Group size, grooming and social cohesion in primates. Anim. Behav. 2007;74:1617–29.
King AJ, Sueur C, Huchard E, Cowlishaw G. A rule-of-thumb based on social affiliation explains collective movements in desert baboons. Anim. Behav. 2011;82:1337–45.
Barrett L, Henzi SP, Weingrill T, Lycett JE, Hill RA. Market forces predict grooming reciprocity in female baboons. Proc. R. Soc. Lond. B Biol. Sci. 1999;266:665–70.
Pinter-Wollman N, Hobson EA, Smith JE, Edelman AJ, Shizuka D, de Silva S, et al. The dynamics of animal social networks: analytical, conceptual, and theoretical advances. Behav. Ecol. 2013;25:242–55.
Noë R, Hammerstein P. Biological markets: supply and demand determine the effect of partner choice in cooperation, mutualism and mating. Behav. Ecol. Sociobiol. 1994;35:1–11.
Strandburg-Peshkin A, Farine DR, Couzin ID, Crofoot MC. Shared decision-making drives collective movement in wild baboons. Science. 2015;348:1358–61.
King AJ, Douglas CMS, Huchard E, Isaac NJB, Cowlishaw G. Dominance and affiliation mediate despotism in a social primate. Curr. Biol. 2008;18:1833–8.
AJK and GF conceived the study. GF led the fieldwork and performed analyses with support from AJK, ELCS and JO’S. GF collected data, PWH and MDH provided technical support, and JO’R supported fieldwork. All authors discussed and interpreted the data. GF and AJK wrote the paper with input from all co-authors. All authors read and approved the final manuscript.
We thank the Baboon Technical Team for authorisation to conduct our research on Cape Peninsula baboons. We are grateful to the members of SLAM (Swansea Lab for Animal Movement) and SHOAL (Sociality, Heterogeneity, Organisation And Leadership) group for discussion on collar design and interpretation of data, and Carlo Catoni (TechnoSmArt), Gwenda Kesans (Ride and Drive Equestrian), Nicolas Chatelain and the Institut Pluridisciplinaire Hubert Curien, Departement d’Ecologie, Physiologie et Ethologie for their assistance in the design and manufacture of the collars. We thank Rory Wilson for the provision of the Daily Diaries. For their cooperation and assistance in the field, we thank vets Hamish Currie and Dorothy Breed, Ines Fürtbauer, Julie Escoffier, Hugo Pontalier and Human Wildlife Solutions and their rangers who provided logistical assistance.
The authors declare no competing interests.
Availability of data and materials
R scripts and collar details are available in supplementary materials. Raw data are available by email upon request to the corresponding author.
Consent for publication
All authors agree consent to publish this work to Animal Biotelemetry.
The present work was approved by Swansea University Ethics Committee (Swansea University IP-1314-5) and Cape Town’s Baboon Technical Team.
This work was supported by research grants from the Association for the Study of Animal Behaviour (ASAB) and Swansea University’s College of Science, in addition to National Research Foundation (NRF) incentive funding provided to M.J’O and travel grants from the Society for Experimental Biology. GF was supported by a Swansea University Ph.D. Scholarship. AJK was supported by a Natural Environment Research Council Fellowship (NE/H016600/3) during development of this study.
Additional file 3. Random forest workflow. The model building workflow is represented in orange and used a training set of N observations, X variables, and three classes, C. (a) The first step is to define K bootstrap sets then the model builds K trees from these sets. (b) For each tree, the model uses a random selection of variables and finds the best rule to split the initial set (or node) into two purer descendent subsets. The process goes on until no more rules can be found to split the nodes into purer subsets. The validation process is indicated in blue. (d) Each tree assigns one class to the observation, and (e) the most frequent ‘vote’ is attributed as the final prediction.
Additional file 5. Acceleration metrics for the five most important variables. Medians and 1st and 3rd quartiles are given for each behaviour. Behaviours which do not overlap between their 1st and 3rd quartiles are highlighted in dark grey, and behaviours for which a behaviour median value does not fall into any other interquartile range are indicated in light grey.
About this article
Cite this article
Fehlmann, G., O’Riain, M.J., Hopkins, P.W. et al. Identification of behaviours from accelerometer data in a wild social primate. Anim Biotelemetry 5, 6 (2017). https://doi.org/10.1186/s40317-017-0121-3
- Movement analysis