Abstract
Increasingly
animal behaviour studies are enhanced through the use of accelerometry.
To allow translation of raw accelerometer data to animal behaviours
requires the development of classifiers. Here, we present the “rabc”
package to assist researchers with the interactive development of such
animal-behaviour classifiers based on datasets consisting out of
accelerometer data with their corresponding animal behaviours. Using an
accelerometer and a corresponding behavioural dataset collected on white
stork (Ciconia ciconia ), we illustrate the workflow of this
package, including raw data visualization, feature calculation, feature
selection, feature visualization, extreme gradient boost model training,
validation, and, finally, a demonstration of the behaviour
classification results.
Keywords: animal behaviour classification, accelerometer,
XGBoost, data visualization, interactive process
Introduction
Our understandings of animal movement patterns and behaviours continue
to rapidly advance with the use of ever smarter and smaller tracking
technologies (Ropert-Coudert & Wilson, 2005; Williams et al., 2019).
Increasingly, the tracking of animals is also combined with
accelerometer (ACC) data collection to study the free-roaming behaviours
of animals across a wide range of taxa (Brown, Kays, Wikelski, Wilson,
& Klimley, 2013; Shepard et al., 2008). Compared with direct human
observation, using ACC to study animal behaviours has the obvious
advantage that it reduces the influence of human presence and also
allows the recording of behaviours that would otherwise be hard to
observe, away from the human eye (Brown et al., 2013). However, these
obvious merits of ACC technology can only be achieved when a reliable
behaviour classification model is available that can convert raw ACC
data into meaningful behaviour types.
Many studies have already conducted behaviour classification from ACC
data (e.g., Nathan et al., 2012). In most cases, ACC data with
corresponding behavioural field observations are used to train behaviour
classification models (e.g., Kölzsch et al., 2016; Kröschel, Reineking,
Werwie, Wildi, & Storch, 2017). However, in some instances the thus
developed classifiers that translate ACC data into behaviour types yield
only low classification accuracy (Fehlmann et al., 2017). As a general
remedy, using fewer behaviour classes and aggregating behaviours usually
yields better classification performance (Ladds et al., 2017). However,
such grouping of behaviours is typically based on biological or
ecological considerations and not necessarily also considering the
capacity of ACC data to discriminate between behaviours. It is this
often iterative process of combining and splitting behaviours within the
behaviour set that the here presented rabc package also endeavours to
assist with. In this way, the rabc package allows the user to derive
optimal and validated behaviour classifiers suited to their specific
research system and questions.
To help biologists translate ACC data into behaviours this package uses
XGBoost, which is currently one of the most promising supervised machine
learning methods for this specific purpose (Hui et al., in prep). Unlike
the web-based tool ”AcceleRater” (Resheff, Rotics, Harel, Spiegel, &
Nathan, 2014), our rabc package does not focus on providing a ”one-stop
service” turning raw ACC data into behaviours. Rather, this package
focuses on (1) providing interactive visualization tools to its user to
assist in handling and interpreting the ACC input data, (2) decide on
appropriate behaviour categories for classification as highlighted in
the previous paragraph, and (3) reduce ACC data volume efficiently and
effectively (through the calculation and selection of a range of
features) without compromising behaviour classification performance. In
brief, this package endeavours to open the lid of the machine-learning
”black-box”, allowing the integration of the user’s expert knowledge on
their own research system in developing advanced
behaviour-classification models.
Rabc workflow
The general workflow of the rabc package to transform ACC data using
supervised machine learning methods into behaviours is outlined in Fig.
1. The data flow is composed of the following elements (where the
numbering refers to the paragraphs where these are being described in
detail): 2.1 ACC dataset preparation with behaviour labels; 2.2 ACC
visualization; 2.3 Feature calculation; 2.4 Feature selection; 2.5
Feature visualization; 2.6 Model training and valication; 2.7
Classification result check. The rabc package can be installed in
Rstudio by “devtools::install_github(“YuHuiDeakin/rabc”)”.