Laura Benoit
email: laura.benoit07@gmail.com

Nadège C Bonnot

Lucie Debeffe

David Grémillet

A J Mark Hewison

Pascal Marchand

Laura Puch

Arnaud Bonnet

Bruno Cargnelutti

Nicolas Cebe

Bruno Lourtet

Aurélie Coulon

Nicolas Morellet

Using accelerometers to infer behaviour of cryptic species in the wild

Keywords: behaviour, bio-logging, circadian, classification, roe deer, random forest

Accelerometery is revolutionising the field of behavioural ecology through its capacity to detect the fine-scale movements of animals resulting from their behaviour. Because it is often difficult to infer the behaviour of wildlife on a continuous basis, particularly for cryptic species, accelerometers potentially provide powerful tools for remote monitoring of their behavioural responses to the environment.

The goal of this study was to provide a detailed, calibrated methodology, including practical guidelines, to infer the behaviour of free-ranging animals from acceleration data. This approach can be employed to reliably infer the time budget of species that are difficult to observe in certain environments or at certain times of the day. To this end, we trained several behavioural classification algorithms with accelerometer data obtained on captive roe deer, then validated these algorithms with data obtained on free-ranging roe deer, and finally predicted the time-budgets of a substantial sample of unobserved free-ranging roe deer in a human-dominated landscape.

The best classification algorithm was the Random Forest which predicted five behavioural classes with a high overall level of accuracy (≈ 90%). Except for grooming (34-38%), we were able to predict the behaviour of free-ranging roe deer over the course of a day with high accuracy, in particular, foraging head down, running, walking and immobile (68-94%). Applied to free-ranging individuals, the classification allowed us to estimate, for example, that roe deer spent about twice as much time foraging head-down, walking or running during dawn and dusk than during daylight or night-time.

By integrating step by step calibration and validation of accelerometer data prior to application in the wild, our approach is transferable to other free-ranging animals for predicting key behaviours in cryptic species.

Introduction

Behaviour is increasingly recognised as a fundamental component of life history (Wolf et al. 2007) and a key mechanism that enables wild populations to cope with global change [START_REF] Caro | The behaviour-conservation interface[END_REF]. However, obtaining behavioural data for a large number of individuals in the wild is a major challenge, particularly for elusive species. Direct observation is often constrained by visibility [START_REF] Löttker | New Possibilities of Observing Animal Behaviour from a Distance Using Activity Sensors in Gps-Collars: An Attempt to Calibrate Remotely Collected Activity Data with Direct Behavioural Observations in Red Deer Cervus elaphus[END_REF][START_REF] Brown | Observing the unwatchable through acceleration logging of animal behavior[END_REF], which may vary over the day (e.g. lower during night-time), with meteorological conditions (e.g. lower during rainy/foggy days), among habitats (e.g. forest vs open habitat), or individuals (e.g. lower for shy individuals). Moreover, the presence of an observer may modify the behaviour of the focal animal and may thus bias studies relying on direct observation [START_REF] Schneirla | The relationship between observation and experimentation in the field study of behavior[END_REF][START_REF] Tuyttens | Observer bias in animal behaviour research: can we believe what we score, if we score what we believe[END_REF]. The development of positioning devices [START_REF] Kooyman | Genesis and evolution of bio-logging devices[END_REF]) such as VHF, Argos or GPS-tracking has revolutionized the field of behavioural ecology [START_REF] Cagnacci | Animal ecology meets GPSbased radiotelemetry: a perfect storm of opportunities and challenges[END_REF][START_REF] Gurarie | What is the animal doing? Tools for exploring behavioural structure in animal movements[END_REF], providing detailed information on the movement (e.g. speed or velocity: [START_REF] Ponganis | Swimming velocities in otariids[END_REF][START_REF] Malagnino | Do reproductive constraints or experience drive age-dependent space use in two large herbivores[END_REF]) and spatial behaviour (e.g. daily space use: Seigle-Ferrand et al. 2020, migration: Dujon et al. 2017;dispersal: Cozzi et al. 2020) of wild animals. However, these devices provide incomplete information, in the sense that we know where the animal is but not what it is doing. More recently, with further technological progress, animalborne sensors [START_REF] Cooke | Biotelemetry: a mechanistic approach to ecology[END_REF][START_REF] Whitford | An overview of behavioral, physiological, and environmental sensors used in animal biotelemetry and biologging studies[END_REF]) can now collect information on body movements (accelerometer: Yoda et al. 1999;[START_REF] Brown | Observing the unwatchable through acceleration logging of animal behavior[END_REF], internal temperature (stomach temperature biologgers: [START_REF] Wilson | Reliability of stomach temperature changes in determining feeding characteristics of seabirds[END_REF][START_REF] Weimerskirch | Prey distribution and patchiness: Factors in foraging success and efficiency of wandering albatrosses[END_REF], heart rate (cardiac biologger: [START_REF] Grémillet | Yearround recording of behavioural and physiological parameters reveal the survival strategy of a poorly insulated diving endotherm during the Arctic winter[END_REF][START_REF] Ditmer | American black bears perceive the risks of crossing roads[END_REF]) and stress hormones (blood sampler: [START_REF] Ponganis | Postdive blood lactate concentrations in emperor penguins, Aptenodytes forsteri[END_REF][START_REF] Takei | Development of an animal-borne blood sample collection device and its deployment for the determination of cardiovascular and stress hormones in phocid seals[END_REF].

Accelerometer biologgers are promising and powerful tools to access detailed information on behaviour. Acceleration is measured along two or three axes, with sampling frequencies usually varying from 8 to 100 hertz (i.e. 8 to 100 measurements per second: [START_REF] Brown | Observing the unwatchable through acceleration logging of animal behavior[END_REF], providing detailed and continuous information on fine-scale body movements and posture [START_REF] Sato | Factors affecting stroking patterns and body angle in diving Weddell seals under natural conditions[END_REF][START_REF] Shepard | Identification of animal movement patterns using tri-axial accelerometry[END_REF]. First developed for domestic and aquatic animals (Yoda et al. 1999;[START_REF] Watanabe | A new technique for monitoring the detailed behaviour of terrestrial animals: A case study with the domestic cat[END_REF], accelerometers have since been adapted for wild terrestrial species [START_REF] Brown | Observing the unwatchable through acceleration logging of animal behavior[END_REF], generating an incredible amount of information regarding animal state [START_REF] Wilson | Wild state secrets: ultra-sensitive measurement of micro-movement can reveal internal processes in animals[END_REF], behaviour [START_REF] Graf | The Use of Acceleration to Code for Animal Behaviours; A Case Study in Free-Ranging Eurasian Beavers Castor fiber[END_REF], associated energy expenditure [START_REF] Wilson | Moving towards acceleration for estimates of activity-specific metabolic rate in freeliving animals: the case of the cormorant: Activity-specific metabolic rate in free-living animals[END_REF][START_REF] Mosser | Towards an energetic landscape: broad-scale accelerometry in woodland caribou[END_REF], and fitness components [START_REF] Grémillet | Energetic fitness: Field metabolic rates assessed via 3D accelerometry complement conventional fitness metrics[END_REF]Marchand et al. 2021a).

To accurately infer behaviour from accelerometer data, supervised machine learning methods are frequently employed [START_REF] Sakamoto | Can Ethograms Be Automatically Generated Using Body Acceleration Data from Free-Ranging Birds[END_REF][START_REF] Nathan | Using tri-axial acceleration data to identify behavioral modes of free-ranging animals: general concepts and tools illustrated for griffon vultures[END_REF][START_REF] Tatler | High accuracy at low frequency: detailed behavioural classification from accelerometer data[END_REF]. These approaches use classification algorithms to learn the relationship between the acceleration data and observed behaviours (calibration), so that when algorithm performance is high (validation), it can successfully predict behaviour with novel acceleration data (application). A key requirement is, thus, a behaviour labelled-accelerometer dataset where the labels are derived from films or direct observations of wild animals [START_REF] Kröschel | Remote monitoring of vigilance behavior in large herbivores using acceleration data[END_REF], animals equipped with video cameras [START_REF] Volpov | Identification of Prey Captures in Australian Fur Seals (Arctocephalus pusillus doriferus) Using Head-Mounted Accelerometers: Field Validation with Animal-Borne Video Cameras[END_REF], captive animals [START_REF] Graf | The Use of Acceleration to Code for Animal Behaviours; A Case Study in Free-Ranging Eurasian Beavers Castor fiber[END_REF][START_REF] Rast | Machine learning goes wild: Using data from captive individuals to infer wildlife behaviours[END_REF] or surrogate species [START_REF] Pagano | Using triaxial accelerometers to identify wild polar bear behaviors[END_REF][START_REF] Ferdinandy | Challenges of machine learning model validation using correlated behaviour data: Evaluation of cross-validation strategies and accuracy measures[END_REF]).

These methods have been successfully applied to a variety of species [START_REF] Brown | Observing the unwatchable through acceleration logging of animal behavior[END_REF] to identify routine behaviours such as walking, flying, or swimming [START_REF] Shepard | Identification of animal movement patterns using tri-axial accelerometry[END_REF]), but also to detect specific events such as prey capture [START_REF] Ropert-Coudert | Foraging strategies and prey encounter rate of free-ranging Little Penguins[END_REF][START_REF] Wilson | Locomotion dynamics of hunting in wild cheetahs[END_REF], mating or suckling [START_REF] Whitney | Identifying shark mating behavior using three-dimensional acceleration loggers[END_REF][START_REF] Shuert | Assessing the utility and limitations of accelerometers and machine learning approaches in classifying behaviour during lactation in a phocid seal[END_REF]). Thus, it is possible to infer behaviour when visibility is limited, providing a detailed insight into daily time budgets [START_REF] Lush | Use of tri-axial accelerometers to assess terrestrial mammal behaviour in the wild[END_REF][START_REF] Rast | Machine learning goes wild: Using data from captive individuals to infer wildlife behaviours[END_REF], even for elusive species.

The aim of our study is to present practical guidelines for inferring animal behaviour in the wild, based on a classification algorithm for acceleration data trained on captive animals, to calibrate the approach for species that are particularly elusive. For this purpose, we studied a large herbivore, the roe deer (Capreolus capreolus) using both captive individuals in an enclosure and free-ranging individuals monitored in a natural environment. Indeed, the roe deer is typically elusive, and predominantly crepuscular or nocturnal, particularly when hunted [START_REF] Bonnot | Fear of the dark? Contrasting impacts of humans versus lynx on diel activity of roe deer across Europe[END_REF], so that direct observation is both time consuming and often incomplete, particularly in closed habitats. Although its spatial behaviour and activity have been intensively studied independently [START_REF] Bonnot | Habitat use under predation risk: hunting, roads and human dwellings influence the spatial behaviour of roe deer[END_REF][START_REF] Padié | Roe deer at risk: teasing apart habitat selection and landscape constraints in risk exposure at multiple scales[END_REF][START_REF] Krop-Benesch | Long-term measurement of roe deer ( Capreolus capreolus ) (Mammalia: Cervidae) activity using two-axis accelerometers in GPS-collars[END_REF], to provide a more complete and unfragmented picture of both where the animal is and what it is doing there, we need to be able to link spatial locations (e.g. GPS monitoring) with continuous inference of behaviour. Accelerometers provide an unprecedented opportunity to infer behavioural states over the 24-hour cycle to understand, for instance, how cryptic species behave across fluctuating environments.

To this end, i) we calibrated a behavioural classification algorithm using supervised machine learning methods (see Material & Methods), accelerometer data derived from sensors integrated in GPS-collars, and behavioural videos of captive roe deer (Calibration step, Fig. 1), ii) we validated algorithm predictions on free-ranging roe deer with the same type of accelerometers and filmed in the wild (Validation step) and finally iii) to illustrate the relevance of this approach, we applied this algorithm to predict the behaviours of 47 unobserved free-ranging roe deer with accelerometers to infer their circadian time budget in a human-dominated landscape (Application step).

Materials and Methods

Accelerometer characteristics

Roe deer were equipped with one of two types of accelerometry sensors associated with two different models of GPS collars (see Table 1). Both sensor types measured acceleration along the three perpendicular axes (anteroposterior [surge or forward/backward], dorso-ventral [heave or up/down] and transversal [sway or sideways], hereafter called X, Y and Z axes, respectively) with values ranging between -125 (= -8 g) and 125 (= 8 g) for each axis (1 g = 9.81 m.s -2 ). However, although they were supplied by the same manufacturer, the two sensor types differed in their acceleration pattern due to i) a difference in sampling frequency (i.e. 8 Hz and 32 Hz), ii) their position on the animal's neck (due to weight differences) and iii) the orientation of the axes on the collar (see images in Table 1). To account for these differences, we constructed distinct classification algorithms for the two accelerometer sensor types (type A or B). In addition, to control for inter-individual variation in acceleration patterns for a given type of sensor (related to collar position on the animal's neck or variation in sensitivity between sensors; [START_REF] Kröschel | Remote monitoring of vigilance behavior in large herbivores using acceleration data[END_REF][START_REF] Dickinson | Best practice for collar deployment of tri-axial accelerometers on a terrestrial quadruped to provide accurate measurement of body acceleration[END_REF], we scaled acceleration data at each step (see details in section 2.b).

I)

Calibration of the classification algorithms on captive roe deer

In this first step, we built and evaluated the performance of behavioural classification algorithms trained on accelerometer data and behavioural observations (Fig. 1). For that, we studied captive roe deer that were easily observable in the experimental facility of INRAE in order to obtain numerous high-quality video data (Fig. 1).

1) Collection of behavioural and accelerometer data

The Gardouch experimental station is located in the South-West of France (43°37′N, 1°67′E), on the slopes of a hill, experiencing an oceanic climate with summer droughts. The station includes 11 enclosures of 0.5 ha which house tame captive roe deer of both sexes (one to six roe deer per enclosure). Each enclosure contains grassland, trees and shrubs that provide shelter and some natural food sources, but their diet is supplemented with artificial pellets for livestock (600 g per individual per day).

Accelerometer data were collected between 2016 and 2019 on three tame adult females living in these enclosures with one or three congeners. Because they are accustomed to human presence, these deer can be fitted with collars without requiring physical restraint and, subsequently, easily observed. This protocol was approved by the Ethical Committee 115 of Toulouse and was authorized by the French government (APAFIS#15760-2018061909204934 v6). In order to maximise the range of observed behaviours, the accelerometers were deployed on each individual several times, for periods of approximately 2-weeks, during different seasons and years. Furthermore, two females were fitted with both sensor types across years (see Table S2). Behavioural observations (see below) were collected by video-recording each female during daytime, while they moved freely within their enclosure. These recordings were time-stamped manually (GMT-time) using a GPS-beacon to provide exact synchronisation with the accelerometer data.

2) Data preparation

2.a) Behavioural observations from video recording

A very detailed ethogram of 54 exclusive behaviours was defined, based on biologically meaningful behaviours that involve specific positions of the body and head (see Appendix S1). When an animal could not be observed, or when the distinction between behaviours was unclear, we classified the event as "unwatchable" and removed these sequences from the dataset. In order to obtain the time stamp and duration of each behaviour, video analyses were carried out using freely available open-source event-logging software ("Jwatcher"and "BORIS" [START_REF] Stankowich | Quantifying Behavior the JWatcher Way[END_REF][START_REF] Friard | BORIS: a free, versatile open-source event-logging software for video/audio coding and live observations[END_REF]. Each behavioural event was manually labelled using the pre-defined ethogram. Because certain behaviours were not expressed sufficiently frequently by the captive animals (ex: fighting), we did not consider them for the subsequent classification step (more information on behavioural data obtained per individual are provided in Appendix S2). Moreover, we grouped certain behaviours that are very similar in terms of movement and function (e.g. observing and sniffing the air) into a single category, resulting in 25 behavioural classes for the classification algorithms (see Tables S1 andS2 for more details).

2.b) Accelerometer data

We derived 26 separate feature variables (see Table 2 andCollins et al. (2015), for details) from acceleration signals measured on the three axes (Table 1). In particular, for each axis, we calculated standard deviation, static acceleration, dynamic acceleration, angle of rotation, minimum and maximum values for dynamic acceleration, dominant power spectrum and frequency at the dominant power spectrum. In addition, based on all three axes, we calculated overall and vectorial body dynamic acceleration (OBDA and VEDBA), which provide proxies of energy expenditure linked to body movement [START_REF] Qasem | Tri-Axial Dynamic Acceleration as a Proxy for Animal Energy Expenditure; Should We Be Summing Values or Calculating the Vector[END_REF].

The duration of the moving window over which these 26 variables were calculated was based on the accuracy of the classification algorithm independently for the two types of sensors. We tested moving windows of between 1 and 5 seconds (following Shepard et al. (2008a)), and obtained the best performance with a moving window of 4 seconds for the type A sensor and 3 seconds for the type B sensor, likely due to different base sampling frequencies (8 versus 32 Hz, respectively).

Subsequently, we scaled the acceleration data by subtracting the mean of the feature variable and dividing the result by its standard deviation. More specifically, for this calibration step and for each sensor type, we scaled data using the mean and standard deviation calculated on data from all captive individuals. Indeed, there was little among-individual variation in acceleration patterns across captive animals, probably because of small sample sizes (N=3 for type A and N=2 for type B), and/or because they were equipped for short time periods (one to two weeks) so that there was little variation in fur thickness.

Table 2: Details of the 26 variables derived from raw accelerometer data and used to infer roe deer behaviour. The duration of the moving window over which the variables were calculated was 4 seconds for the type A sensor and 3 seconds for the type B sensor (see main text for details).

Variable names X axis Y axis Z axis Description

Raw

2.c) Synchronising acceleration data with observational data

An accurate calibration of the accelerometer signal requires a perfect match of the accelerometer data with the corresponding behavioural sequence derived from the video observations. However, initial inspection revealed that the internal clocks of the accelerometers often did not run at precisely the same rate as the GPS-beacon clock used during video-recording. We thus corrected, when possible, the time of the accelerometer data (see Appendix S2) and retained only synchronised data for further analyses.

Finally, we cleaned the dataset by retaining only behaviourally labelled accelerometer data that corresponded to the sequences of the 25 behaviours defined above. To obtain a clear signal for these behaviours, we retained only those segments that lasted more than 2 seconds, and then removed the initial and final 0.5 second of each segment to eliminate transitions between successive behaviours.

3) Construction of classification algorithms

For the calibration step, we randomly selected 75% of the sequences for each behaviour (independent behavioural sequences) from the cleaned dataset of captive roe deer to train our classification algorithms. We compared several supervised machine-learning methods which are based on different rules to classify data (see Table 3). For each method, tuning steps and tuned parameters varied, as did the combination of feature variables used to optimize the classification (see Table 3). Based on the most commonly-used classification approaches, we tested random forests (hereafter, RF), artificial neural networks (ANN), support vector machine (SVM) and classification and regression trees (CART) (see [START_REF] Nathan | Using tri-axial acceleration data to identify behavioral modes of free-ranging animals: general concepts and tools illustrated for griffon vultures[END_REF] for more details).

Table 3: Supervised machine learning methods tested in this study.

Supervised machine learning methods

R packages used and tuning

Rationale of the approach

Random forest (RF)

Caret (method = rf ntree (=500) and mtry (=15) optimal) required Random forest

This method is based on several iterations of classification trees using a random subset of the data for each tree (here n=500) and a random subspace of predictor variables (here n=9) for each tree branch. The final prediction is the result of all trees combined by a majority rule thus limiting overfitting and being able to cope with unbalanced datasets [START_REF] Breiman | Random Forests[END_REF].

Artificial neural networks (ANN)

Caret (method = nnet size (=5) and decay (=0) optimal)

This method distributes the data in automata (neurons). These units are responsible for combining their information together to determine the value of the discrimination variable. It is from the connection of these units to each other that the ANN capacity for discrimination emerges.

Support Vector Machine (SVM) e1071

This method searches for an optimal linear classifier (hyperplane) that will separate the data into classes and maximize the distance between these classes (margins)

Classification And Regression Tree (CART)

Caret (method = rpart2 maxdepth= 3 for sensor B and 4 for sensor A) required rpart

This method uses a set of hierarchical decision rules developed to classify data. It is a decision tree where each fork is split by values of a predictor variable.

4) Predictions and performance of classification algorithms

Using each of the classification algorithms trained on 75% of the cleaned data set collected on captive animals (training dataset), we predicted behaviour on the remaining 25% (test dataset). We compared the resulting predicted behaviours from the different algorithms with the observed behaviours extracted from videos, based on confusion matrices. We calculated several metrics (see details in Appendix S3) to assess the performance of the algorithms for each behaviour separately (especially the F1-score metric) and the overall performance of the algorithms (especially the accuracy metric). Finally, we focused on specific behaviours that we considered biologically meaningful to subsequently explore variation in the circadian time budget of free-ranging roe deer during the Application step. To do so, we grouped behaviours that were similar, or difficult to distinguish, into five behavioural classes: 1) foraging head down (including feeding, walking or unmoving with head-down), 2) walking head up (including walking with head-up and head at mid-height or sniffing the air while moving), 3) running, (corresponding to trotting, jumping or galloping), 4) grooming (including grooming while either standing or lying, and shaking the body) and 5) unmoving (including other behaviours such as lying down, standing still, vigilance or feeding with head-up) (see Appendix S1). The same performance metrics as described in Appendix S3 were then calculated for each of these five behavioural classes.

II) Validation of the classification algorithms in the wild

In this second step, we validated the classification algorithms that were calibrated on captive roe deer for predicting behaviour of free-ranging individuals. To do so, we used independent accelerometer and observation data collected on free-ranging roe deer that were comparable to those used for the subsequent Application step in the wild (Fig. 1).

1) Collection of behavioural and accelerometer data

We studied a free-ranging roe deer population monitored in the Aurignac study site located in a 19,000 ha rural region in the Vallons et Coteaux de Gascogne (Zone Atelier PyGar) in the south-west of France (43°16′N, 0°53′E). The landscape is heterogeneous and hilly, with a mix of crops (32% of the total area), meadows (37%), hedgerows (4%) and woodland (19%) (see [START_REF] Morellet | Landscape composition influences roe deer habitat selection at both home range and landscape scales[END_REF] for more details).

Accelerometer data were collected between 2016 and 2020 on free-ranging roe deer that were caught during winter (from January to March) using drive nets. Deer were tranquilised (with an intramuscular injection of acepromazine (calmivet 3cc; [START_REF] Montané | Effects of acepromazine on capture stress in roe deer (Capreolus capreolus)[END_REF]) and transferred to a wooden retention box to reduce stress and risk of injury. Each individual was aged and sexed and then equipped with a GPS collar with integrated accelerometer sensors.

All capture and marking procedures were done in accordance with local and European animal welfare laws (prefectural order from the Toulouse Administrative Authority to capture and monitor wild roe deer and agreement no. A31113001 approved by the Departmental Authority of Population Protection;). Marked individuals were video-recorded during the following year when conditions were suitable for the collection of behavioural information (Appendix S2).

Videos were time-stamped manually (GMT) using a GPS-beacon (GPS Garmin).

2) Data preparation

The preparation of behavioural (a: labelling behavioural sequences) and accelerometer (b: calculation) data and the time-synchronisation between them (c) were performed as explained in section I.2. However, in this validation step on free-ranging roe deer, we scaled all accelerometer variables per individual (to minimize variations due to collar tightness and sensor type) using accelerometer data recorded over approximatively one month, close in time to the moment when the individual was observed (to minimize variation due to seasons). The duration of one month was estimated to be sufficient to estimate deer activity while being relatively easily tractable for these accelerometer bigdata.

3) Construction of classification algorithms

To validate the behavioural predictions of the classification algorithms on free-ranging roe deer, for each sensor type separately, we used the full cleaned dataset collected on captive animals as the training dataset to construct the classification algorithms (hereafter, referred to as the global classification algorithm). As for the calibration step, we tested different supervised machine learning methods (RF, ANN, CART and SVM).

4) Predictions and performance of classification algorithms

Using the global classification algorithms, we predicted behaviour for the full cleaned dataset collected on free-ranging roe deer, and evaluated their performance by comparing the predicted and observed behavioural classes with the metrics presented in section I.4.

III) Application of the classification algorithms to predict the circadian time budget of free ranging animals

In this last step, we applied the global classification algorithms (one for each sensor type) to free-ranging roe deer that were fitted with an accelerometer sensor, but that were not video recorded, in order to estimate their circadian time budget (Fig. 1).

1) Data collection, preparation and prediction of algorithms

We collected accelerometer data on 47 free-ranging roe deer from the Aurignac site as explained in section II.1. We focused this analysis on data collected during March, because there are no important life history events (e.g. birth, rut, etc.) at this time that might confound signal clarity, although males may begin defending territories. We calculated feature variables as described above (see section I.2), and scaled them per individual using all the data available during March for that individual. Then, we applied the global classification algorithms that we constructed on captive roe deer and validated on free-ranging roe deer (see section II.3) to obtain predictions per individual for each behavioural class for the month of March (see Fig. 1).

2) Estimation of circadian time budget

As the activity of roe deer is known to vary strongly over the circadian cycle, with higher activity during twilight (Krop-Benesch et al. 2013), we analysed the proportion of time allocated to each behavioural class both per day and per hour using Bayesian multilevel mixed models (with a Dirichlet distribution and a logit link function; using "brm" function in the brms package [START_REF] Bürkner | brms: An R package for Bayesian multilevel models using Stan[END_REF]). First, we investigated the proportion of time allocated to each behavioural class per day with a generalized multilevel mixed model. Secondly, with a multilevel generalized additive mixed model, we investigated variation in the proportion of time allocated to each behavioural class per hour, in relation to the time of day, using cyclic cubic splines to smooth the effect of time (in hours) over the 24-hour cycle. We included individual identity as a random factor in all models to account for repeated observations for a given individual. Finally, we compared this model with a basic model with no effect of the time of day, based on approximate leave-one-out (LOO) cross-validation, as implemented in the loo package [START_REF] Vehtari | Practical Bayesian model evaluation using leaveone-out cross-validation and WAIC[END_REF].

All analyses were performed with R version 4.0.3 (R Core Team, 2020).

Results a) Comparing supervised machine learning approaches

For the calibration step, all supervised machine learning approaches predicted (i) the 25 behaviours that made up the test sub-dataset with an accuracy varying between 50% and 60% for type A sensors, and between 53% and 69% for type B, and (ii) the five behavioural classes with a high level of accuracy (from 85% to 91% for type A, and from 85% to 94% for type B) (see Appendices S3 & S5). For the validation step, all supervised machine learning methods predicted (i) the 25 behaviours that made up the test sub-dataset with an accuracy varying between 30% and 46% for type A sensors, and between 36% and 48% for type B, and (ii) the five behavioural classes with a high level of accuracy (from 79% to 90% for type A, and from 58% to 86% for type B) (see Appendices S8 & S10). Overall, when considering the ethogram of 25 behaviours, accuracy was relatively low (<75%) for all methods, as some specific behaviours were very poorly predicted (e.g. range of F1-scores for vigilance [0-29] % for both sensor types). However, behaviours that were poorly predicted were often confused with other behaviours of the same behavioural class (e.g. vigilance predicted as lying down or standing still, see Tables S4 a.b.). When considering the five behavioural classes, the RF and SVM algorithms performed best, and all of the behavioural classes were predicted with a high level of accuracy for calibration (Table S3), or with a higher level of accuracy than other approaches for validation (Table S8). Indeed, when using the CART and ANN algorithms, some behavioural classes were very poorly predicted (ex: F1 score for grooming =0 for sensor type B, Table S10). Therefore, we selected the RF algorithm for subsequent analyses, as it performed the best, particularly during validation, and needed less computation time than SVM. Indeed, this approach has been widely used for behavioural prediction (e.g. in Eurasian beavers [START_REF] Graf | The Use of Acceleration to Code for Animal Behaviours; A Case Study in Free-Ranging Eurasian Beavers Castor fiber[END_REF], in puma [START_REF] Wang | Movement, resting, and attack behaviors of wild pumas are revealed by tri-axial accelerometer measurements[END_REF], in grey seals [START_REF] Shuert | Assessing the utility and limitations of accelerometers and machine learning approaches in classifying behaviour during lactation in a phocid seal[END_REF])), facilitating comparison among studies. It should be noted that the accelerometer variables used in the RF algorithm did not contribute equally to the discrimination of the 25 behaviours, as their importance varied between 0 and 100% (Appendices S6 & S7).

1) Calibration: Algorithm performance on data from captive animals using

Random Forests RF algorithms were able to predict the 25 behaviours with an accuracy of 56% (type A sensor) and 67% (type B sensor). Classification success differed greatly among behaviours (Fig. 2 and Tables S4 a.b.): while some behaviours were very well predicted (e.g. F1 scores for galloping = 91 % for both sensor types), others were poorly so (e.g. F1 scores for ruminating with head up = 25% and 39% for type A and B, respectively). However, when considering the five behavioural classes (Fig. 2 and Appendix S5), accuracy was 90% and 93% for type A and B sensors, respectively. In particular, foraging head down, walking and unmoving were very well predicted (F1-scores between 84 and 96%, Fig. 2). Running and grooming were slightly less well predicted, especially for type A sensors (F1-scores: 72% and 67% for type A sensor, and 93% and 78% for type B sensor).

2) Validation: algorithm performance on data from free-ranging animals using

Random Forests Global RF algorithms predicted the five behavioural classes with an accuracy of 90% (range of 86-97% among animals) and 85% (range of 82-91% among animals) for type A and B sensors, respectively (a comparison of predicted and observed behavioural classes for an observed acceleration sequence is provided in Appendix S11). The five behavioural classes were not predicted with similar accuracy, and the level of accuracy differed slightly from the calibration step (see Fig. 3 and Appendices S5 & S10). The majority of behavioural classes were slightly less well predicted during the validation step (e.g. for unmoving: 94% vs 94 % for sensor type A and 96% vs 92 % for sensor type B), but this difference was more marked for grooming (67% vs 38% for sensor type A and 78% vs 34 % for sensor type B). Thus, global classification algorithms performed very well for identifying foraging head down (F1-scores of 92% and 86% for sensor types A and B, respectively), running (90% and 81% for sensor types A and B, respectively) and unmoving (94% and 92 % for sensor types A and B, respectively) of free-ranging roe deer, but a little less well for walking (83% and 67% for sensor types A and B, respectively), and rather badly for grooming (38% and 34% for sensor types A and B, respectively). The F1-score values were close to those for both sensitivity and precision. This means that no behaviour was more overpredicted (lower values of precision) than underpredicted (lower values of precision), or vis a versa. Overall, for both sensor types, most of the misclassified values for grooming were confused with foraging head-down or unmoving, whereas for sensor type B only, misclassified values for walking were mostly confused with unmoving.

3) Application: Algorithm predictions for the circadian behavioural rhythm of freeranging roe deer

We estimated the circadian time-budget of free-ranging roe deer during March with respect to the five behavioural classes using the predictions of the global classification algorithms. First, according to the Bayesian multilevel mixed model describing variation in the proportion of time allocated to each behavioural class per hour, we found that free-ranging roe deer spent most of their active time foraging head down, i.e. on average, 4.4±0.6 h per day, followed by 2.0±0.5 h walking, 1.8±0.4 h grooming, and 0.2±0.1 h running. The remaining time was allocated to unmoving behaviours other than grooming, including standing, lying down, vigilance or feeding with head-up, representing around 65% of the total time (15.7±0.8 h) (Fig. 4). Hence, roe deer were actually engaged in foraging activities for two-thirds (on average 4.4 hours) of their habitual time active (total of 6.6 hours per day, either foraging, walking or running). This time-budget, however, varied greatly over the day. Indeed, the selected model that best described variation in the proportion of time allocated to each behavioural class per hour included a smoothed effect of the time of day (Delta LOOIC with the basic model: 12790.1), such that deer were more active during twilight hours (defined here as two hours around either sunrise or sunset). During March, they spent around twice as much time foraging head-down, walking or running during dawn and dusk than during the day or night (Fig. 5.a,b,c) (Fig. 5.d). More precisely, we observed that foraging occurred around half as frequently during the day than during other periods (mean percentage of time foraging head down during the day: 7.9±1.7 % vs 16.2±3.1 % during other periods), whereas moving behaviours were clearly concentrated during twilight (mean percentage of time walking or running during twilight: 13.6±1.5 % and 3.1±0.6 %, vs. during day and night: 7.5±1.0 % and 1.9±0.4 %). Only the time allocated to grooming behaviour did not vary over the course of the day (Fig. 5.e).

Discussion

The golden age of biologging [START_REF] Wilmers | The golden age of bio-logging: how animal-borne sensors are advancing the frontiers of ecology[END_REF] is revolutionising our capacity to understand the behavioural ecology of wild animals. Using high frequency accelerometer monitoring, we successfully identified the most important behavioural phases of wild freeranging cryptic roe deer with a high degree of accuracy (> 85%). We obtained daily and hourly time budgets of 47 free-ranging individuals, providing evidence that such detailed information may help to better understand the behaviour of this species in relation to environmental variability. The calibration and validation procedures that we developed are equally applicable to other species, as long as high quality accelerometric and behavioural data are available to build a sufficiently powerful classification algorithm. Below, we discuss the strengths and limitations of our method, and provide guidelines (also summarized in Box 1) and potential future directions for elucidating the behaviour of wild animals with this approach.

Calibration of a classification algorithm with captive animals

The calibration procedure using captive roe deer enabled us to predict discrete behavioural categories, specifically, walking, running, foraging head-down, grooming and unmoving, with a high overall level of accuracy. Furthermore, using a classification algorithm based on a detailed ethogram of 25 specific behaviours, we were able to reliably identify certain specific behaviours (e.g. F1-scores > 90% for galloping), which could be the target of specific research questions. For example, accurate predictions for the occurrence of galloping may provide insight on flight behaviour in response to human disturbance [START_REF] Stankowich | Ungulate flight responses to human disturbance: A review and metaanalysis[END_REF], thus providing a better description of the landscape of fear [START_REF] Laundre | The Landscape of Fear: Ecological Implications of Being Afraid~!2009-09-09~!2009-11-16~!2010-02-02~![END_REF] for wild, cryptic species.

We used captive animals for the calibration step for their ease of observation (6 to 10 hours of film per sensor type), generating a large dataset of acceleration signals and associated behaviours. However, certain behaviours did not figure in our classification algorithm because they were rarely or never observed in captivity (e.g. fighting, mating and nursing), although accelerometers are powerful tools to detect these rare events (e.g. mating behaviour in sharks (Ginglymostoma cirratum) [START_REF] Whitney | Identifying shark mating behavior using three-dimensional acceleration loggers[END_REF]; display behaviours in little bustards (Tetrax tetrax) [START_REF] Gudka | Feeling the heat: Elevated temperature affects male display activity of a lekking grassland bird[END_REF]. For behaviours such as parturition [START_REF] Fogarty | Can accelerometer ear tags identify behavioural changes in sheep associated with parturition[END_REF][START_REF] Gurule | Evaluation of the tri-axial accelerometer to identify and predict parturition-related activities of Debouillet ewes in an intensive setting[END_REF] or maternal care (ex: in grey seal (Halichoerus grypus) [START_REF] Shuert | Coping styles in capital breeders modulate behavioural trade-offs in time allocation: assessing fine-scale activity budgets in lactating grey seals (Halichoerus grypus) using accelerometry and heart rate variability[END_REF] that are difficult to observe in the wild, it is, therefore, key to ensure that captive animals are able to express them. The advantages and limitations of relying on captive animals to calibrate behaviour classification algorithms needs to be carefully considered on a case by case basis (Guideline 1).

A crucial parameter for algorithm performance is the position of the accelerometer on the animal's body [START_REF] Barwick | Categorising sheep activity using a tri-axial accelerometer[END_REF], Guideline 2). For many species, accelerometers are fixed on a collar which is positioned on the animal's neck, which may impair detection of important behaviours that do not involve marked movements of the head (Tables S4). For example, in our analysis, foraging with head up was poorly discriminated (F1-scores < 50%), probably because the associated movements were not distinguishable from unmoving behaviours such as observation or vigilance. Studies on livestock have used accelerometers located near the jaw to detect chewing [START_REF] Alvarenga | Using a three-axis accelerometer to identify and classify sheep behaviour at pasture[END_REF], but this is currently difficult to use on wild animals, unless a suitable system is developed that does not significantly impact animal welfare. Alternatively, foraging and rumination may be more efficiently detected by combining accelerometery with an acoustic sensor (Studd et al. 2019a) Because biologging is a young and rapidly developing field, manufacturers are constantly upgrading their equipment [START_REF] Boyd | Bio-logging science: sensing beyond the boundaries[END_REF][START_REF] Evans | Recent advances in bio-logging science: Technologies and methods for understanding animal behaviour and physiology and their environments[END_REF]. As was the case in this study, ecological studies often span years, or even decades [START_REF] Lindenmayer | Value of long-term ecological studies[END_REF], so that calibration must account for technological developments (Guideline 3). Indeed, despite using a single manufacturer, we found that the acceleration signal varied according to the orientation of the axes of a particular sensor, sampling frequency and tag position on the animals' neck due to weight differences between versions of the sensor. As a result, key parameters of the procedure (see Fig. 1) must be established independently for each type of equipment, as we did for the two sensor types (e.g. number of feature variables, time window duration to calculate variables derived from raw acceleration data, choice of machine learning approach).

Finally, accelerometery generates huge data sets, and there is a trade-off between the precision of behavioural predictions and the time and space needed for storage and to process the data. In this study, we found little difference in classification performance in relation to sampling frequency (8 or 32 Hz, see example in Table S3), suggesting that lower rates of data acquisition sufficed for our purposes (see [START_REF] Hounslow | Assessing the effects of sampling frequency on behavioural classification of accelerometer data[END_REF]. As in several studies using accelerometer data [START_REF] Fehlmann | Identification of behaviours from accelerometer data in a wild social primate[END_REF][START_REF] Tatler | High accuracy at low frequency: detailed behavioural classification from accelerometer data[END_REF], we included a wide diversity of accelerometer-related variables in the algorithms (see Table 2), which improved their predictive power, but also significantly increased computation time (Fig. 1 -Part 2). In our case, RF and SVM provided the most powerful algorithms, but were also the longest to implement in terms of computing time, algorithm construction (RF) and prediction (SVM) (Fig. 1 -Part 3&4). The choice of method will, thus, depend on the target behaviour studied and, more generally, the trade-off between precision and effort to process the accelerometer big data (Guideline 4).

Validating classification algorithms for estimating behaviour in the wild

The use of free-ranging roe deer to validate the RF algorithms that we built based on captive roe deer confirmed the efficiency of the algorithms for predicting the main behavioural classes that constitute the activity of this species (accuracy> 85%). Indeed, except for grooming behaviours (F1-scores < 40%), the RF algorithms were able to predict foraging head down, running, walking and unmoving with high performance in free-ranging roe deer (range of F1-scores: [83-94%] for sensor type A and [68-92%] for sensor type B). This validation step using several roe deer allowed us to identify that acceleration signals vary among individuals in relation to collar tightness and sensitivity (see section on accelerometer characteristics) which can influence the performance of the algorithms. It is, hence, important to take these variations into account for behavioural prediction across a number of individuals (Guideline 5). Problems of sensor variability could be resolved by applying data correction, if manufacturers provide information to control this source of variability [START_REF] Kröschel | Remote monitoring of vigilance behavior in large herbivores using acceleration data[END_REF], or by using acceleration variables which summarize acceleration over the three axes, such as VeDBA and OBDA [START_REF] Studd | Behavioral classification of low-frequency acceleration and temperature data from a free-ranging small mammal[END_REF]. Another solution, that we used in this study, is to scale the data per individual, which provided better behavioural prediction for wild roe deer. Despite these procedures, differences in performance between supervised machine learning methods were more marked for the validation step (difference in accuracy between the best and worst methods: 11 % for sensor type A and 28 % for sensor type B) than for the calibration step (difference in accuracy between the best and worst methods: 6 % for sensor type A and 8 % for sensor type B), and, globally, algorithm performance tended to decrease between steps. We think that this could be due to residual variation in the data across individuals and sensors that we could not control for. However, it could also be because we were unable to record the full range of behaviours that the classification algorithm can predict with the quite small number of videos that we obtained per free-ranging individual (see Appendix S2),. Thus, we consider that it is important to validate the classification algorithms on independent individuals, which can alter the performance of the model predictions [START_REF] Ferdinandy | Challenges of machine learning model validation using correlated behaviour data: Evaluation of cross-validation strategies and accuracy measures[END_REF], and particularly on free-ranging individuals in order to estimate the performance of the algorithms on data similar to those used in the application step (Guideline 6).

Inferring the circadian time budget of free-ranging animals

The use of accelerometers to infer the time-budget of free-ranging roe deer is a promising approach, as has been demonstrated in other species such as red foxes (Vulpes vulpes) [START_REF] Rast | Machine learning goes wild: Using data from captive individuals to infer wildlife behaviours[END_REF], snowshoe hares (Lepus americanus) (Studd et al. 2019a), fur seals (Arctocephalus pusillus) [START_REF] Ladds | Using accelerometers to develop time-energy budgets of wild fur seals from captive surrogates[END_REF], chipmunks (Tamias alpinus & T. speciosus) [START_REF] Hammond | Using accelerometers to remotely and automatically characterize behavior in small animals[END_REF]) and crab plovers (Dromas ardeola) [START_REF] Bom | Optimizing acceleration-based ethograms: the use of variable-time versus fixed-time segmentation[END_REF]. For roe deer, previous studies have often been limited to information on space use [START_REF] Cagnacci | Animal ecology meets GPSbased radiotelemetry: a perfect storm of opportunities and challenges[END_REF][START_REF] Malagnino | Do reproductive constraints or experience drive age-dependent space use in two large herbivores[END_REF] and activity [START_REF] Kozakai | Fluctuation of daily activity time budgets of Japanese black bears: relationship to sex, reproductive status, and hard-mast availability[END_REF][START_REF] Pagon | Seasonal variation of activity patterns in roe deer in a temperate forested area[END_REF] , or to occasional direct observations of specific behaviours (e.g. vigilance [START_REF] Benhaiem | Hunting increases vigilance levels in roe deer and modifies feeding site selection[END_REF][START_REF] Favreau | Within-population differences in personality and plasticity in the trade-off between vigilance and foraging in kangaroos[END_REF])), usually during the day and in habitats that provide high observability. Using an approach based on accelerometer sensors, ecologists will be increasingly able to remotely and continuously estimate specific behaviours of wild animals and how they may vary among individuals [START_REF] Bidder | Monitoring canid scent marking in space and time using a biologging and machine learning approach[END_REF][START_REF] Bennison | A bioenergetics approach to understanding sex differences in the foraging behaviour of a sexually monomorphic species[END_REF]) and over time (e.g. according time of day and season [START_REF] Hammond | Using accelerometers to remotely and automatically characterize behavior in small animals[END_REF][START_REF] Rast | Machine learning goes wild: Using data from captive individuals to infer wildlife behaviours[END_REF], according to environmental conditions).

Here, using continuous accelerometer data obtained on 47 free-ranging roe deer, we were able to infer the behavioural time budget across the 24-hour diel cycle, irrespective of their habitat or location. For example, we were able to identify foraging head-down behaviour with a high level of accuracy, and showed that free-ranging roe deer spent, on average, more than four hours per day engaged in this activity. However, this was particularly concentrated during twilight (Fig. 4), but much less prevalent during daylight, presumably due to frequent disturbance in this human-dominated area [START_REF] Bonnot | Habitat use under predation risk: hunting, roads and human dwellings influence the spatial behaviour of roe deer[END_REF]. Interestingly, we found that roe deer also spent much more time moving during twilight, which may reflect the constraints of travelling from refuge areas frequented during daylight to richer feeding grounds in highly fragmented landscapes [START_REF] Abbas | Landscape fragmentation generates spatial variation of diet composition and quality in a generalist herbivore[END_REF]). However, it should be noted that the classification algorithms struggled to accurately identify foraging with head up, a common behaviour in browsers such as roe deer, at least during certain seasons [START_REF] Bodmer | Ungulate Frugivores and the Browser-Grazer Continuum[END_REF]). Indeed, during spring, roe deer are known to feed on buds and young leaves of trees and shrubs, when available [START_REF] Tixier | Are European roe deer browsers? A review of variations in the composition of their diets[END_REF], so that we almost certainly underestimated total foraging time. It is hence important to bear in mind the limitations of a given classification algorithm when interpreting the results (Guideline 7).

Conclusion and perspectives

The approach that we present in this paper, combining calibration and validation of the accelerometer prior to application in a free-ranging animal, is transferable to other species and will enable accurate prediction of important behaviours in cryptic wild animals. Our practical guidelines for improving behavioural prediction highlight the importance of the validation step which is frequently omitted [START_REF] Wang | Movement, resting, and attack behaviors of wild pumas are revealed by tri-axial accelerometer measurements[END_REF][START_REF] Ladds | Using accelerometers to develop time-energy budgets of wild fur seals from captive surrogates[END_REF][START_REF] Rast | Machine learning goes wild: Using data from captive individuals to infer wildlife behaviours[END_REF]. Indeed, validation through field verification on free-ranging individuals is crucial to ensure robust behavioural inference . The combination of accelerometers with GPS monitoring opens the door to spatially explicit modelling of behaviour [START_REF] Wang | Movement, resting, and attack behaviors of wild pumas are revealed by tri-axial accelerometer measurements[END_REF][START_REF] Rast | Machine learning goes wild: Using data from captive individuals to infer wildlife behaviours[END_REF][START_REF] Tatler | Accelerometer informed time-energy budgets reveal the importance of temperature to the activity of a wild, arid zone canid[END_REF], for example, to better understand the impact of landscape modifications on wild populations. Similarly, combining accelerometers with acoustic sensors could aid identification of discrete behaviours such as chewing, vocalization or grooming [START_REF] Wijers | Listening to Lions: Animal-Borne Acoustic Sensors Improve Bio-logger Calibration and Behaviour Classification Performance[END_REF][START_REF] Wijers | The influence of spatial features and atmospheric conditions on African lion vocal behaviour[END_REF]Studd et al. 2019a), for example, to better document the responses of wildlife to human disturbance or predation risk [START_REF] Lynch | Landscape and anthropogenic features influence the use of auditory vigilance by mule deer[END_REF]. In the context of the ever-increasing anthropogenic pressure, biologging promises to help us better understand how wildlife copes with human-induced rapid environmental change.

Practical guidelines regarding the different steps of the study

Calibration step:

(1) Thoroughly consider the advantages (data precision and quantity) and limits (absence of behaviours) of the use of captive animals.

(2) Take into account the limits to detect some behaviours according to sensor position on the body of the animal (3) Test different parameters per species and material (here sensor type) throughout the procedure: window size, feature variables, classification algorithm (4) When choosing among classification algorithms, take into account the trade-off between precision and time/storage needed to process accelerometer big data.

Validation step

(5) Take into account the variability of acceleration signals between individuals and/or materials.

(6) Use independent individuals to validate classification algorithms, as much as possible similar to those on which the classification will be applied.

Application step

(7) Always keep in mind the limitations of the classification algorithm to discriminate behaviours when interpreting the results Wolf, M., van Doorn, G.S., Leimar, O. & Weissing, F.J. (2007). Life-history trade-offs favour the evolution of animal personalities. Nature, 447, 581-584. Yoda, K., Sato, K., Niizuma, Y., Kurita, M., Bost, C., Le Maho, Y., et al. (1999). Precise monitoring of porpoising behaviour of Adélie penguins determined using acceleration data loggers. J Exp Biol,202,[3121][3122][3123][3124][3125][3126]

Figure 1 :

 1 Figure 1: Flowchart of the three-step process developed for the classification of roe deer behaviour using accelerometer data. Calibration step (on filmed captive roe deer), Validation step (on filmed free-ranging roe deer), Application step (on unobserved free-ranging roe deer). The four components of analysis (numbered 1 to 4) were described for the calibration step column and then mentioned in the two other columns if they were still running: Part : Collection of behavioural and accelerometer data on roe deer. Part : Preparation of behavioural (time stamp and duration of behavioural sequences) and accelerometer (calculation of 26 feature variables) data, and temporal synchronisation between the two. Part : Construction of four classification algorithms based on the training data subset. Part : Prediction of behaviours from classification algorithms and estimation of performance based on the test data subset.

  Angles of rotation[START_REF] Shepard | Identification of animal movement patterns using tri-axial accelerometry[END_REF] Bidder et al. et al. 2006) ODBA = |DBA[X]| + |DBA[Y] | + |DBA[Z]|Sum of values of dynamic acceleration of the three axes over the moving window Vectorial dynamic body acceleration[START_REF] Gleiss | Making overall dynamic body acceleration work: on the theory of acceleration as a proxy for energy expenditure: Acceleration as a proxy for energy expenditure[END_REF][START_REF] Qasem | Tri-Axial Dynamic Acceleration as a Proxy for Animal Energy Expenditure; Should We Be Summing Values or Calculating the Vector[END_REF] VeDBA =Vectorial sum of values of dynamic acceleration of the three axes over the moving window

Figure 2 :

 2 Figure 2: Confusion matrix for the 25 behaviours (left) and the five behavioural classes (right) for (A) the accelerometer type A sensor (N = 3 individuals) and (B) the accelerometer type B sensor (N = 2 individuals). Cross-validation comparing observed vs predicted behaviours was obtained with the Random Forest algorithm applied to the test dataset on captive females. Results are shown as F1 scores for each class (%).

Figure 3 :

 3 Figure 3: Confusion matrix for the 25 behaviours and the five behavioural classes for (A) the sensor type A (N = 6 individuals) and (B) the sensor type B (N = 8 individuals). Crossvalidation of observed versus predicted classes was obtained with the Random Forest algorithm applied to the test dataset of the free-ranging roe deer. Results are shown as F1 scores for each class (%).

Figure 4 :

 4 Figure 4: Daily time budget of 47 free-ranging roe deer during March based on the five behavioural classes inferred with the global classification algorithm. Solid points (and bars) represent predictions (and their associated 95% credible intervals). Hollow points represent observed values averaged for one individual.

Figure 5 :

 5 Figure 5: Hourly time budget for 47 free-ranging roe deer based on the five behavioural classes (a-e) inferred with the global classification algorithm. Solid lines (and the coloured area) represent predictions (and their associated 95% credible intervals). Points represent observed values averaged for one individual. Grey bars indicate two hours around mean twilight during March. Hours of the day are in GMT.

Table 1 :

 1 Details of sensor characteristics and number of individuals monitored at each step (Calibration, Validation, Application) of the study

	Accelerometer sensor type			Type A			Type B
	GPS collar	Vectronic GPS PLUS-1C Store On Board and GPS PLUS mini-1C	Vectronic vertex plus
	Collar weight			484 g			355 g
	Internal clock type	Internal clock is independent from that of the GPS, and thus drifts over time, requiring synchronization	Internal clock is integrated with that of the GPS, thus there is little or no drift over time
		X axis: anteroposterior movements (surge or	Y axis: anteroposterior movements (surge or
		forward/backward); Y axis: dorso-ventral	forward/ backward); Z axis: dorso-ventral
		movements (heave or up/down); Z axis: transversal	movements (heave or up/down); Z axis:
			movements (sway or sideways).		transversal movements (sway or sideways).
	Acceleration measured by
	each axis
	Year of deployment	2016	2017	2018	2019	2020	2019	2020

Sampling Frequency (Hertz) 8 32 Number of captive individuals monitored for calibration step 1 2 2 Number of free-ranging individuals monitored for validation step 3 3 8 Number of free-ranging individuals monitored for application step

	(which was not certified by peer review) is the author/funder. All rights reserved. No reuse allowed without permission.
	12	11	1	3	4	10	7