Ingrid D E Van Dixhoorn
email: ingrid.vandixhoorn@wur.nl

Lydiane Aubé

Coenraad Van Zyl

Rudi De Mol

Joop Van Der Werf

Romain Lardy

Marie Madeleine Mialon

C G Van Reenen

Isabelle Veissier

From data on gross activity to the characterization of animal behaviour: which metrics for which purposes

Keywords: sensors, time budget, animal welfare, health, activity metrics, cow

The behaviour of an animal is closely linked to its internal state. Various metrics can be calculated from activity data. Complex patterns of activity within or between individuals, such as cyclic patterns and synchrony, can inform on the biological functioning, the health status, or the welfare of an animal. These patterns are now available thanks to sensors that continuously monitor the activity of individual animals over long periods. Data processing and calculations, however, should be clarified and harmonised across studies for the results to be comparable. We present metrics describing activity patterns, we discuss their significance and relevance for behavioural and welfare studies and their limits, and we detail how they can be calculated. Four groups of metrics are distinguished: metrics related to overall activity (e.g., time spent in each activity per unit of time), metrics related to fluctuations around mean activity, metrics related to the cyclicity of activity, and metrics related to the synchrony between animals. Metrics may take statistical approaches (e.g., average and variance) or modelling approaches (e.g., Fourier Transform).

Examples are taken essentially from cattle for which individual activity sensors are easily available at present. The calculations, however, can be applied to other species and can be performed on data obtained from sensors as well as visual observations. The present methodological article will help researchers to obtain the most benefit from activity data and will support the decision of which metric can be used to address a given purpose.

Introduction

The behaviour of an animal can inform about the internal state of that animal, in relation to biological functioning, health and welfare. Activity measurements have long been used to identify differences in walking behaviour to detect lameness [START_REF] Pastell | A wireless accelerometer system with wavelet analysis for assessing lameness in cattle [Article[END_REF] or differences in the amount of activity to detect oestrus [START_REF] Saint-Dizier | Towards an Automated Detection of Oestrus in Dairy Cattle [Review][END_REF] or periparturient disorders [START_REF] Rutten | Sensor data on cow activity, rumination, and ear temperature improve prediction of the start of calving in dairy cows [Article[END_REF][START_REF] Rutten | Invited review: Sensors to support health management on dairy farms[END_REF][START_REF] Weary | Board-invited Review: Using behavior to predict and identify ill health in animals[END_REF]. Additionally, comparing the activity of a focus animal to its baseline or to penmates allows identification of deviations that potentially indicate a change in internal state, e.g., an animal becoming ill (Kok et al., 2023). The continuous measurements of activity allow for complex patterns to be highlighted, such as circadian components and regularity, and these patterns can be used to identify animals at risk of diseases [START_REF] Van Dixhoorn | Behavioral patterns as indicators of resilience after parturition in dairy cows[END_REF][START_REF] Van Dixhoorn | Indicators of resilience during the transition period in dairy cows: A case study[END_REF][START_REF] Wagner | Detection of changes in the circadian rhythm of cattle in relation to disease, stress, and reproductive events [Article[END_REF].

Ethologists, and other researchers usually calculate several metrics from activity data to characterise an animal's behaviour, e.g., time spent on each activity, fragmentation of activity, 24-h patterns or proportion of animals engaged in the same activity. However, the way these metrics are calculated vary between studies. For instance, the synchrony between animals, that reflects the functioning of a group, can be calculated at individual level as the percentage of animals performing the same activity as the focus animal, then at group level as a mean of that percentage or using concordance indices such as Kappa coefficients or overdispersion index [START_REF] Raussi | A note on overdispersion as an index of behavioural synchrony: a pilot study in dairy cows[END_REF][START_REF] Tuomisto | Finishing bulls have more synchronised behaviour in pastures than in pens [Article[END_REF][START_REF] Veissier | Social behaviour in domestic beef cattle when yearling calves are left with the cows for the next calving [Article][END_REF]. The pros and cons of each metric are rarely explained.

The activities can be documented by observers, from direct observation or from video recordings, or obtained using sensors. Direct observation allows precise activities to be recorded. For instance, lying can be divided into lying head down versus head up with corresponding arousal levels inferred [START_REF] Veissier | Calves' responses to repeated social regrouping and relocation[END_REF]. Direct observation (both real time or from video recordings) requires a high workload and data at night are often missing due to difficulties in observing animals in the dark. The last ten years have seen a boom in the development of sensor technologies, which can provide data along time series more easily than direct observation. Activities (especially in large domestic animals like cattle) can now be recorded continuously on individual animals and for very long periods with little workload, using accelerometers, image analysis from videos, or Real Time Locating System (RTLS) [START_REF] Buller | Animal welfare management in a digital world [Review][END_REF]. Most of the commercially available sensors that monitor cattle activity show excellent performance in validation studies [START_REF] Lee | Wearable Wireless Biosensor Technology for Monitoring Cattle: A Review[END_REF]. They usually provide information on gross activities such as lying, standing, moving, feeding, and ruminating or the position of animals in the barn. From the organisation of these activities, specific patterns can be detected, especially those indicative of animal malaise due to illness or stress [START_REF] Wagner | Detection of changes in the circadian rhythm of cattle in relation to disease, stress, and reproductive events [Article[END_REF] or related to the social organization of animal groups [START_REF] Rocha | Persistence of sociality in group dynamics of dairy cattle [Article[END_REF], allowing new insight into animal behaviour. However, to date the flood of data obtained from sensors seem underutilised [START_REF] Koltes | A Vision for Development and Utilization of High-Throughput Phenotyping and Big Data Analytics in Livestock [Review[END_REF].

Access to data on activity is not only facilitated for ethologists, but also for researchers from other discipline, e.g., animal health and animal production and for non-scientists like users of precision farming systems that are not necessarily used to process data on behaviour [START_REF] Borchers | A validation of technologies monitoring dairy cow feeding, ruminating, and lying behaviors [Article[END_REF]. It is thus crucial to provide harmonised metrics to analyse behaviour and to discuss what they are supposed to measure and their limits. This would allow comparisons between studies, help the interpretation of results, extend the use of activity data beyond ethologists, and ease the re-use of datasets.

In the present paper, we consider the metrics that describe different aspects of behaviour from data collected by sensors or by direct observations (Figure 1). We consider metrics describing 1-overall activity, 2-fluctuations around mean activity, 3-cyclicity of activity, and 4-synchrony between animals. For each of these four groups of metrics, we identify the main metrics in use, the calculation methods, the limitations or the difficulties that can be encountered to calculate them, and their biological meaning (i.e. what it implies for animal welfare or health or the functioning of social groups). Examples are taken essentially from cattle, for which individual activity sensors are easily available at present. The calculations, however, can apply to datasets from other species (including other animal-specific activities) and can be performed on data coming from sensors as well as from observation. This paper does not focus on the validation of the sensors or the observers (to assess inter or intra observer variation) but on the processing of the data acquired by the sensors or observers.

We believe such a methodological review is pivotal and timely given the boom of activity data obtained by sensors. The review will hopefully support researchers by improving the use of activity data to answer their research questions. In addition, it should facilitate the consideration of animal behaviour by nonethologists especially in Precision Livestock Farming (PLF), with a view to help phenotyping animals for selection, monitoring them for the detection of changes due to specific states such as oestrus, disease, or stress, or evaluating housing conditions and management aspects.

The data

In the present paper, we focus on gross activities such as feeding behaviour (including eating and drinking), active behaviour (apart from eating or drinking) including walking, running or other movements, or inactive behaviour including standing still and lying. More specific activities include grazing and ruminating in ruminants (e.g., cattle, sheep, goats), rooting in pigs, and foraging behaviour in poultry. All these activities are characterised by lasting for some time. They are sometime referred to as 'states', as opposed to brief behaviours (e.g., interactions between animals) that are referred to as 'events'.

Observers can perform focal (and continuous) sampling i.e., they note changes in activity with reference to the time of the change occurrence. Alternatively, observers can perform scan sampling i.e. they note the animal's activity as detected at first glance at regular intervals [START_REF] Bateson | Measuring Behaviour: An Introductory Guide[END_REF]. Examples of the continuous and scan sampling data are shown in the supplementary materials. A mix of the two is also possible: the activity is recorded continuously and at the end of each interval (e.g. 5 min) the observer notes the predominant activity; the format of data will then be similar to that of scan sampling. Sensors generally produce a signal that is nearly continuous; the data on gross activity is usually delivered as time spent in each activity per time intervals (e.g. minutes per hour or per 15 min) or as predominant behaviour per time interval. The metrics that can be calculated, depend on the formats of data (see next sections).

Definitions

The overall activity refers to the time spent performing specific activities during a certain time period.

Each activity such as feeding, drinking, walking, standing idling or lying, can be characterised by the duration it is performed, the number of bouts (where a bout is defined by the continuous expression of an activity), and the average duration of bouts. The overall fractioning of activity refers to how many bouts of activity are noticed, in other words how often the animal changes of activity. The level of activity reflects how much an animal is active, that is walking, running, or feeding rather than lying or standing immobile. The time period on which these metrics are calculated varies between studies, e.g. an hour or a day. The term 'time budget' is specifically used to describe how an animal divides its day (or shorter period) into the various activities.

Calculations

Proportion of time spent in an activity.

The proportion of time spent in a given activity a in a collection of activity bouts B (whatever the activity) is calculated as follows:

𝑃𝑟𝑜𝑝𝑜𝑟𝑡𝑖𝑜𝑛 𝑂𝑓𝐴𝑐𝑡𝑖𝑣𝑖𝑡𝑦 𝑎 𝐵 = ( ∑ 𝐷 𝑏 𝑏∈𝐵, 𝐴 𝑏 =𝑎 ) ∑ 𝐷 𝑏 𝑏∈𝐵 ⁄ ( 1
)
where Db is the duration of the bout b and Ab is the activity in bout b.

In case of scan sampling, the time spent in an activity is estimated from the number of scans per activity, multiplied by the interval between scans -although what the animal has done between scans remains unknown -. The proportion of time spent in an activity a in a period P can be calculated as follows:

𝑃𝑟𝑜𝑝𝑜𝑟𝑡𝑖𝑜𝑛 𝑂𝑓𝐴𝑐𝑡𝑖𝑣𝑖𝑡𝑦 𝑎 𝑃 = ( ∑ 𝐿 𝑝 𝑝∈𝑃,𝐴 𝑝 =𝑎 ) ∑ 𝐿 𝑝 𝑝∈𝑃 ⁄ (1)
where p a subperiod of P, Lp is the length of the subperiod p, and Ap is the activity in the subperiod p.

Duration of activities (or proportion of time spent in activities) can be calculated for each activity separately and whatever the time period. If the experimenter decides to group two activities (e.g., lying ruminating and standing ruminating), the duration/proportion of the new activity (here ruminating) is obtained by summing up those of the individual activities.

Number and duration of activity bouts.

Continuous and scan sampling also allow detecting when the activity changes, so that the number of activity bouts can be obtained, and the mean duration of bouts can be calculated. The average bout duration of activity a in bouts collection B is calculated as:

𝐴𝑣𝑔𝐵𝑜𝑢𝑡𝐷𝑢𝑟𝑎𝑡𝑖𝑜𝑛 𝑎 𝐵 = ( ∑ 𝐷 𝑏 𝑏∈𝐵,𝐴 𝑏 =𝑎 ) 𝑁 𝐵 (𝑎) ⁄ ( 2
)
where Db is the duration of the bout b and NB(a) the number of bouts of the collection B where the activity equals a.

Sensor-based systems, however, sometimes provide the time spent in each activity per time period and not the exact timing of a change if any; in this case, the number and the duration of bouts of activity remain unknown.

Calculation of the number of bouts of an activity and of the mean duration of the bouts requires that the recording is done on long periods to avoid edge effects. Indeed, when the monitoring starts, the animal is observed in a given activity, but one does not know for how long the animal has been performing the activity. It is common practice to remove the first and the last activity bout observed during the time period studied. The time period must thus be long enough so that several entire bouts of activity can be recorded. In practice, the number of bouts and their mean duration are often calculated per day (see for instance [START_REF] Veissier | Cubicle housing systems for cattle: Comfort of dairy cows depends on cubicle adjustment [Review][END_REF]).

Assessing the total number of activity bouts in a day, in other words the number of times an animal changes of activity, requires that the ethogram consists of activities described with the same level of details, so that the number of bouts does not depend on what activity an animal performs most during the day.

The gross activities detected by sensors are usually adequate. This is not necessarily the case with direct observations. For instance, to answer a specific question, an experimenter may want to sort activities into lying, standing inactive, feeding (all of these lasting for minutes or hours) and other activities, that can consist of walking, running, exploring the environment, interacting with other animals or self-directed activities (all of them lasting for few seconds or minutes). In that case, the number of times an animal changes of activity will largely depend on whether the animal performs the short-lasting activities frequently. The grouping of activities into gross activities should be done before the total number of activity bouts is calculated. Indeed, in the example given above on ruminating while lying or standing, the number of ruminating bouts during a day cannot be calculated by adding the number of lying-ruminating bouts and that of standing-ruminating bouts, because the two activities can be performed in the same bout.

Duration and number of bouts also largely depend on how bouts are defined. The most common practice is to consider each change of activity as the beginning of a new bout. For example, with continuous observations the number of lying bouts of a cow can be assessed by the number of times the animal lays down; with scan sampling, an eating bout can be defined when eating is observed on at least one scan [START_REF] Tucker | Laterality of lying behaviour in dairy cattle[END_REF]. When scan sampling is used, the interval between scans should be smaller than the duration of activities to not miss bouts. An animal switching from an activity to another can still be considered in the same bout if it returns quickly to the initial activity. One needs to define how long the animal must stop an activity between two instances of that activity so that separate bouts are identified [START_REF] Yeates | The use of mixed distribution models to determine bout criteria for analysis of animal behaviour [Article[END_REF].

For instance, eating bouts are usually combined into meals if the interval between successive eating bouts is less than the meal criterion. The minimum interval between bouts can be determined by different methods [START_REF] Tolkamp | Satiety Splits Feeding Behaviour into Bouts[END_REF][START_REF] Yeates | The use of mixed distribution models to determine bout criteria for analysis of animal behaviour [Article[END_REF][START_REF] Dado | Continuous Computer Acquisition of Feed and Water Intakes, Chewing, Reticular Motility, and Ruminal pH of Cattle[END_REF], for example, using log-survivorship and log-frequency analysis (see [START_REF] Tolkamp | Satiety Splits Feeding Behaviour into Bouts[END_REF], for a description of these methods).

Activity level.

The overall activity of an animal can be summarised into an activity level by assigning a weight to each activity, the weight expressing the contribution of the activity to the arousal of the animal [START_REF] Veissier | Calves' responses to repeated social regrouping and relocation[END_REF]. The level of activity of the period P is calculated by the sum of the time spent in each activity multiplied by the weight of the activity:

𝐴𝑐𝑡𝑖𝑣𝑖𝑡𝑦𝐿𝑒𝑣𝑒𝑙 𝑎 𝑃 = (∑ 𝑇 𝑎𝑝 • 𝑊 𝑎 𝑝∈𝑃 𝑎∈𝐴 ) ( 3
)
where Tap is the time spend on activity a in period p, Wa is the weight of activity a, the summations are over subperiods p in period P (and over all activities in A).

The weights can be assigned a priori by the experimenter or elicited from observations. [START_REF] Veissier | Calves' responses to repeated social regrouping and relocation[END_REF] performed a Factorial Analysis of Correspondence (FAC) on the number of instances (scans x calves) of each of five activities per hour; the first axis -that summarises most of the variations between the 24 hours of the day -brought decreasing weights to feeding (1.438), walking (0.763), standing immobile (-0.085), lying head up (-0.261), then lying head down (-0.541), ordering the activities as one would intuitively do to express the decreasing arousal. The FAC is based on associations between activities and therefore, the outcome of the FAC strongly depends on the level of detail of the activities that are included. Experience told us that the ethogram should not be split in too many (short lasting) activities to elicit meaningful weights.

The time budget of animals depends on their living conditions and the farm management. Cows spend about half of the day lying but this can vary from 8 h to 13 h (reviewed by [START_REF] Tucker | Lying time and the welfare of dairy cows[END_REF]. Lying time is reduced in case of uncomfortable lying areas (poorly designed or too hard, wet, small, hot) or not enough resting places for the size of the herd [START_REF] Tucker | Lying time and the welfare of dairy cows[END_REF]. Cow may nevertheless spend more time lying in case of short cubicles preventing them to stand properly in a cubicle and thus forcing them to lie down as soon as they enter a cubicle [START_REF] Veissier | Cubicle housing systems for cattle: Comfort of dairy cows depends on cubicle adjustment [Review][END_REF]. The time spent feeding and walking also largely diet, compared to animals fed diets with less than 20% starch [START_REF] Commun | Behavioural adaptations of sheep to repeated acidosis challenges and effect of yeast supplementation [Article][END_REF][START_REF] Mialon | Effects of the forage-to-concentrate ratio of the diet on feeding behaviour in young Blond d'Aquitaine bulls[END_REF]).

The effects described in the above paragraph are typically observed on all animals from a herd.

Modifications are also observed between individuals in a herd. The overall activity of an animal varies over time due to its physiological state. Young cows are often more active and change more often of activity than adult ones [START_REF] Solano | Associations between lying behavior and lameness in Canadian Holstein-Friesian cows housed in freestall barns[END_REF]. At the time of oestrus, cows are agitated, spending less time eating but more time active in other ways (more walking, less lying) [START_REF] Reith | Review: Behavioral signs of estrus and the potential of fully automated systems for detection of estrus in dairy cattle[END_REF]. Changes are also observed due to gestation and parturition: the time spent lying by cows decreases from one month before to one month after calving and slowly increases thereafter up to end of lactation, with 2 h of amplitude of variations in multiparous cows [START_REF] Hut | Sensor based time budgets in commercial Dutch dairy herds vary over lactation cycles and within 24 hours[END_REF]. The changes in activity are generally well marked and short lasting around oestrus but less marked and gradual around calving, making calving detection from gross activity more difficult than that of oestrus [START_REF] Benaissa | Calving and estrus detection in dairy cattle using a combination of indoor localization and accelerometer sensors[END_REF].

The overall activity of an animal can also change due to a pathological state (e.g. due to inflammation [START_REF] Dittrich | Alterations in sick dairy cows' daily behavioural patterns [Review[END_REF]. These modifications are called sickness behaviour, characterisedamong others -by a low activity of the animal [START_REF] Weary | Board-invited Review: Using behavior to predict and identify ill health in animals[END_REF]. Metabolic disorders (e.g., hypocalcemia, ketosis, acidosis) are generally accompanied by an increase in the time spent lying and a corresponding decrease of the time spent active and feeding [START_REF] Weary | Board-invited Review: Using behavior to predict and identify ill health in animals[END_REF]Belaid et al. 2021). These modifications are more marked in hypocalcemia than in other metabolic diseases, hence the name 'downer cow' syndrome for hypocalcemia (Wadhwa & Prasad, 2002). Acidosis can be accompanied by a higher fractioning of activity: sheep suffering from acidosis often change their posture from lying to standing [START_REF] Commun | Behavioural adaptations of sheep to repeated acidosis challenges and effect of yeast supplementation [Article][END_REF], as if they do not feel comfortable in either of these postures. Infectious diseases are also associated with an increase in time spent lying down and a decrease in time spent feeding [START_REF] Weary | Board-invited Review: Using behavior to predict and identify ill health in animals[END_REF]. Mastitis however may result in a decreased time spent lying down, compensated by an increased time spent standing [START_REF] Fogsgaard | Behavioral changes in freestall-housed dairy cows with naturally occurring clinical mastitis [Article][END_REF][START_REF] Medrano-Galarza | Behavioral changes in dairy cows with mastitis [Article][END_REF], presumably due to the pain on the udder which is increased by the pressure on it when the animal is lying. Lameness is also accompanied by sickness behaviour and a specific pattern of lying behaviour with less lying bouts but of longer duration [START_REF] Solano | Associations between lying behavior and lameness in Canadian Holstein-Friesian cows housed in freestall barns[END_REF][START_REF] De Mol | Applicability of day-to-day variation in behavior for the automated detection of lameness in dairy cows [Article][END_REF]. Sick cows, whatever the origin of the disorders, usually spend less time ruminating [START_REF] Calamari | Rumination time around calving: An early signal to detect cows at greater risk of disease [Article][END_REF].

Stress is another factor affecting the activity of animals. Stressed animals usually spend less time lying down and change more often of activity. For instance, suckling calves separated from their dam and moved from pasture to a barn respond to these changes by spending less time lying down, more time standing still or walking, and by fractionating their activities to a larger extent (Veissier et al., 1989). These modifications fade within days or weeks, indicating habituation to the new environment. Similar changes are observed when primiparous cows join the lactating herd. Around calving, primiparous cows decrease their time spent lying to a larger extent than multiparous cows [START_REF] Hut | Sensor based time budgets in commercial Dutch dairy herds vary over lactation cycles and within 24 hours[END_REF] and we suspect that this is due to the many changes undergone by them around calving: they are milked for the first time and they are introduced to the lactating herd and so exposed to social partners and a pen, both novel to them.

Monitoring the overall activity can thus help to check if the animals are managed adequately and to detect physiological states (especially oestrus), pathological states, or stress. Feeding, ruminating and lying seem especially sensitive to variations in the animal or its environment. Lying is generally reduced in case of stress or an uncomfortable lying area, so it is often considered that a prolonged time spent lying indicates good welfare (Piñeiro et al., 2019a(Piñeiro et al., , 2019b)). However, lying time is often increased in case of disease too. In any case, the value obtained for duration and frequency of activities should be interpreted considering the context in which they are obtained, for instance the type and management of feeding, the housing or grazing conditions, and the timing in relation to calving.

Metrics to address fluctuations around the mean activity Definition

The activity of an animal varies within and between days [START_REF] Hut | Sensor based time budgets in commercial Dutch dairy herds vary over lactation cycles and within 24 hours[END_REF].

Calculations

The metrics used to describe variations of an animal activity across time periods (e.g., hours within

Variance

The sum of the squares of the differences between each value and the mean (see formula below);

and Standard deviation (SD): the square root of the variance.

𝑉𝑎𝑟𝑖𝑎𝑛𝑐𝑒(𝑥) = 1 𝑁 -1 ∑(𝑥 𝑖 -𝜇) 2 𝑁 𝑖=1 ( 4
)
where x is the sequence of activities (expressed for example as the level of activity) composed of N observations, xi is the i th observation, and µ the mean of the activities.

Root Mean Square of the Successive Differences (RMSSD):

RMSSD measures the variations from one interval to the next one. RMSSD is calculated as follows:

𝑅𝑀𝑆𝑆𝐷(𝑥) = √ 1 𝑁 -1 ∑(𝑥 𝑖 -𝑥 𝑖+1 ) 2 𝑁-1 𝑖=1 2 (5)
where x is the sequence of activities (expressed for example as the level of activity) composed of N observations, xi is the i th observation.

Irregularity.

An index of irregularity of behaviour can be calculated as proposed for feed intake (Salgado et al., 2021a(Salgado et al., , 2021b)). Fist a regression line of cumulative data (e.g., cumulative time spent in a given activity) is drawn, then the differences between observed values and the regression line are calculated. The sum of these differences brings the irregularity index.

Biological meaning

Maximum activity during the day can be relevant to identify cow states: in a study where many metrics were used for a random forest classification, [START_REF] Lardy | Discriminating pathological, reproductive or stress conditions in cows using machine learning on sensor-based activity data[END_REF] found that the maximum activity during the day and Quantile 90 (two metrics closely linked) were the most important features to discriminate pathological and physiological states of cows.

Within-day variations of activity are well marked in healthy and non-stressed animals. For instance, lying is predominant at some times during the day whereas eating and other activities are predominant at other times. Therefore, the activity level is not constant from hour to hour during the day. Within-day variations (measured by SD and RMSSD) are less marked in sick animals than in healthy ones; this is the case for cows affected by mastitis and to a lesser extent by lameness [START_REF] Veissier | Short communication: Early modification of the circadian organization of cow activity in relation to disease or estrus[END_REF]. Within-day variations are also affected by oestrus: variations rise above baseline at the beginning of oestrus then decrease below baseline for at least two days [START_REF] Veissier | Short communication: Early modification of the circadian organization of cow activity in relation to disease or estrus[END_REF]. RMSSD slightly differs from SD. With the same amount of variations during the day (same SD), an activity that varies smoothly between successive hours results in a low RMSSD while an activity that fluctuates between successive hours results in a high RMSSD. In [START_REF] Veissier | Short communication: Early modification of the circadian organization of cow activity in relation to disease or estrus[END_REF] the decrease in within day variations under mastitis, lameness and oestrus was more marked when assessed by RMSSD than by SD, suggesting that cows change of activity more often when diseased or in oestrus. Stress may also be associated with a reduction in within-day variation in activity, as observed in cattle moved from pasture to indoor housing (Veissier et al., 1989;using the difference between night and early morning). Spreading activities throughout the day can also be a way to adapt to specific conditions. Bulls fed fibrous diets eat in few meals during the day whereas bulls fed high starch diets spread their eating activity over the entire day, which results in a low SD of eating duration [START_REF] Mialon | Effects of the forage-to-concentrate ratio of the diet on feeding behaviour in young Blond d'Aquitaine bulls[END_REF]. Dispersing small meals over the day seems a strategy to avoid ruminal acidosis due to high amounts of starch in a diet.

Between-day variations of activity can increase when animals are disturbed. For instance, cattle and sheep affected by acidosis or ketosis have more variable activities across days than healthy animals [START_REF] Commun | Behavioural adaptations of sheep to repeated acidosis challenges and effect of yeast supplementation [Article][END_REF][START_REF] González | Changes in Feeding Behavior as Possible Indicators for the Automatic Monitoring of Health Disorders in Dairy Cows[END_REF]. At least in case of ketosis, an effective treatment eliminates the effect [START_REF] Goldhawk | Prepartum feeding behavior is an early indicator of subclinical ketosis[END_REF]. Lame cows can also display high between-days variations in the duration of lying bouts [START_REF] Ito | Lying behavior as an indicator of lameness in dairy cows [Article][END_REF][START_REF] Solano | Associations between lying behavior and lameness in Canadian Holstein-Friesian cows housed in freestall barns[END_REF]. A quick return to normal or baseline values after small disturbances (micro-recoveries) results in low variance, and is considered as a sign of good resilience [START_REF] Scheffer | Quantifying resilience of humans and other animals[END_REF]. Animals that spontaneously (i.e., apart from diseases or other challenges) have a variable activity are less prone to further diseases [START_REF] Van Dixhoorn | Indicators of resilience during the transition period in dairy cows: A case study[END_REF].

Metrics to address the cyclicity of activity Definition

Cyclicity indicates fluctuations at regular intervals around activity trends. The most common cycle is the circadian cycle, which is the 24-h rhythm due to the alternance of day and night.

Calculations

Several metrics can be used for addressing the cyclicity of activity (Kok et al., 2023). Autocorrelation and Fourier transform are basic calculations. Other indices are derived from them such as non-periodicity index [START_REF] Van Dixhoorn | Behavioral patterns as indicators of resilience after parturition in dairy cows[END_REF][START_REF] Van Dixhoorn | Indicators of resilience during the transition period in dairy cows: A case study[END_REF] and degree of functional coupling [START_REF] Berger | Evaluation of living conditions of free-ranging animals by automated chronobiological analysis of behavior[END_REF][START_REF] Scheibe | Comparative Analysis of Ultradian and Circadian Behavioural Rhythms for Diagnosis of Biorhythmic State of Animals[END_REF].

Autocorrelation.

The autocorrelation measures the correlation between successive values of a signal. The autocorrelation depends on the chosen delay, e.g., for hourly data the lag-1 corresponds to the correlation between successive hours and lag-24 corresponds to the correlation between an hour of the day and the same hour of the next day, therefore depending on the circadian cycle. For a sequence x of size N, the autocorrelation with a lag l is calculated as following:

𝐴𝐶𝐹(𝑥, 𝑙) = 1 (𝑁 -𝑙)𝜎 2 ∑(𝑥 𝑖 -𝜇)(𝑥 𝑖+𝑙 -𝜇) 𝑁-𝑙 𝑖=1 (6)
Where σ is the variance of the sequence x, μ is the average value of the sequence x and xi the i th element of the sequence x.

Non-periodicity.

Non-periodicity is calculated by plotting the correlogram of the raw data (which is a graphical display of a correlation matrix of the data) over a sinusoid with an amplitude of 0.25 and a 24-hour cycle and assessing the difference between the correlogram and the sinusoid by calculating the mean squared error (Figure 2) [START_REF] Van Dixhoorn | Behavioral patterns as indicators of resilience after parturition in dairy cows[END_REF][START_REF] Van Dixhoorn | Indicators of resilience during the transition period in dairy cows: A case study[END_REF]. The value of an amplitude of 0.25 is chosen as it gave the best fit and might be adjusted in other situations where the autocorrelation shows a circadian rhythm.

𝑁𝑜𝑛𝑝𝑒𝑟𝑖𝑜𝑑𝑖𝑐𝑖𝑡𝑦(𝑥) = (∑ (𝐴𝐶𝐹(𝑥, 𝑙) -0.25 • 𝑐𝑜𝑠(2𝜋 • 𝑙 24 ⁄ )) 2 𝑙=1…100 ) 100 (9)
where x is a variable measured at hourly (or other chosen time interval) time intervals, ACF(x,l) is the autocorrelation function for variable x at lag l (ranging from 1 to 100), 0.25•cos(2π•l/24) is the cosine function with a 24-h cycle and an amplitude of 0.25 that is used as a fit function.

Fourier transform.

Fourier transform represents the sinusoids that compose the original variations. Each sinusoid is defined by a frequency and an amplitude. The contribution of each sinusoid to explain the original variations is expressed in absolute or relative power, usually referring to the frequency of the sinusoid or to frequency bands. For instance, the contribution of the circadian cycle and of ultradian cycles can be calculated. When variations within 24 h time series are analysed by Fourier transform, the fundamental (h0) refers to the average activity during 24 h, harmonic 1 (h1) refers to variations following a 24 h cycle; h2, to a 12 h cycle; h3, to an 8 h cycle; h4 to a 6 h cycle, etc. The main cycle is the circadian one; the activity of an animal can therefore be modelled by its overall activity (mean during 24 h) and the variations around overall activity following a 24 h cycle, in other words into h0 and h1. The Fourier-based approximation with thresholding (FBAT) method was developed to compare such models obtained on successive time series [START_REF] Wagner | Detection of changes in the circadian rhythm of cattle in relation to disease, stress, and reproductive events [Article[END_REF]. An alternative to the Fourier transform is the Cosinor method. Cosinor and Fourier are analogous in formulation, but differ in operation (see [START_REF] Chkeir | A mathematical approach using a thoracic temperature sensor for detecting human circadian rhythms[END_REF], for a comparison of the two modelling approaches). An example of Fourier transform is visualised in Figure 2.

Degree of functional coupling (DFC).

The degree of functional coupling is obtained by calculating autocorrelations, then applying Fourier transform to the correlogram, extracting the significant harmonics and calculating the power of each significant harmonics out of the power of all significant harmonics (DFC). More specifically, the relative power of the harmonic corresponding to a 24 h cycle expresses how much the variations are due to the circadian cycle: when DFC equals 100%, the variation in activity follows strictly a circadian cycle vs. when DFC equals 0%, the activity not at all depends on the 24 h cycle [START_REF] Berger | Evaluation of living conditions of free-ranging animals by automated chronobiological analysis of behavior[END_REF].

In theory, data on 24 h only can be used to identify a circadian cycle. In practice, activity data usually contains noise, i.e., erratic fluctuations so that more than one day is necessary to identify correctly cyclic components. The number of days required depends on the amount of noise vs. cyclic components.

In general, the activity of an animal peaks several times during the day, e.g., depending on the timing of feeding or milking, whereas the activity stays low during whole night. Autocorrelations and Fourier transform hardly take the dissymmetry between day and night activity into account. Wavelet methods could be used to overcome this problem (discussed in [START_REF] Wagner | Detection of changes in the circadian rhythm of cattle in relation to disease, stress, and reproductive events [Article[END_REF].

Daily periodicities are influenced by internal clocks (endogenous driven biological cycles) and external factors such as temperature, light, humidity, feeding time (exogenously driven biological cycles) [START_REF] Saper | Hypothalamic regulation of sleep and circadian rhythms[END_REF]. Internal clocks generate a rhythm of about 24 h period. In mammals, the central internal clock situated in the brain (suprachiasmatic nuclei) coordinates peripheral clocks in the body (Honma, 2018). Among external cues (or "Zeitgebers), light is known to be the most powerful one, impacting both on behaviour and physiological functions (Honma, 2018). For instance, cows are typically diurnal animals: they eat essentially between dawn and dusk and they predominantly rest at night [START_REF] Devries | Short communication: Diurnal feeding pattern of lactating dairy cows [Article][END_REF][START_REF] Hafez | The behaviour of Domestic Animals. Baillere, Tindall & Casell[END_REF]. Variations can nevertheless be observed between cows in the cyclicity of their behaviour. Competition for resources (e.g. feed, lying area), due to overstocking or ambiguity in the ranking order because of frequent change in group composition, can cause a misalignment with the circadian rhythm [START_REF] Mccabe | Impact of exposure to chronic light-dark phase shifting circadian rhythm disruption on muscle proteome in periparturient dairy cows[END_REF][START_REF] Van Dixhoorn | Behavioral patterns as indicators of resilience after parturition in dairy cows[END_REF][START_REF] Van Dixhoorn | Indicators of resilience during the transition period in dairy cows: A case study[END_REF][START_REF] Van Erp | Circadian misalignment imposed by nocturnal feeding tends to increase fat deposition in pigs [Article][END_REF].

Cows that have more marked circadian patterns of activity seem more resistant to health disorders.

For instance, cows with marked cyclicity of eating, walking or lying before calving are less affected by postpartum health disorders (including inflammatory and metabolic problems [START_REF] Van Dixhoorn | Behavioral patterns as indicators of resilience after parturition in dairy cows[END_REF][START_REF] Van Dixhoorn | Indicators of resilience during the transition period in dairy cows: A case study[END_REF]). Indeed, dairy cows need to have their physiological mechanisms fine-tuned to be able to produce large quantities of milk while avoiding nutritional and metabolic deficiencies (negative energy balance or mineral deficiencies such as hypocalcemia). We hypothesise that good cyclicity, aligned with circadian rhythm can help to avoid such dysfunctions, especially in the high-risk postpartum period.

Any change of the internal state of an animal -due to stress, disease or some specific reproductive status (parturition, oestrus) -can in turn affect the cyclicity of activities. For instance, the difference between activity during the day and at night is less marked in heifers experiencing a large change in their environment -weaning and turning from pasture to indoors -and in cows affected by mastitis or lameness (Veissier et al., 1989;[START_REF] Veissier | Short communication: Early modification of the circadian organization of cow activity in relation to disease or estrus[END_REF]. Variations during the day can be modelled, e.g., thanks to Fourier transform in the FBAT method. The distance between models obtained on successive 24 h series increases when cows are stressed, diseased, in oestrus or about to calve, expressing a change in daily patterns [START_REF] Wagner | Detection of changes in the circadian rhythm of cattle in relation to disease, stress, and reproductive events [Article[END_REF]. These effects may be due to the release of glucocorticoids during stress, disease or even calving. Indeed, glucocorticoids, the secretion of which follows a circadian pattern, help to coordinate peripheral clocks with the brain pacemaker [START_REF] Dumbell | Circadian Clocks, Stress, and Immunity[END_REF]. represents the strength of the cycles in activitities with a 24, 12, 8, and 6 h cycles and is used a a measure of the cyclicity of the cow.

Metrics to address the synchrony between animals Definition

The synchrony measures the extent to which animals of a given group perform the same activity at the same time. The synchrony can be assessed between two animals, between an animal and the group it belongs to, or at the group level.

Calculations

The synchrony is to be assessed based on what animals do at certain points in time spaced at regular intervals. Collecting data using scan sampling therefore is appropriate for calculations of synchrony metrics. In case of continuous observations, which is changes in behaviour are noted for each animal exactly when they occur, a pre-processing of data is necessary: at each time interval the instantaneous activity of each animal of the group need to be extracted (resampling procedure). When data are expressed as main activity of each animal during a certain interval, as often done with sensors, synchrony can only be approximated: if the intervals at which the activity is noted are short enough (e.g. 5 min) then it may be considered that the animal kept the same activity during the whole interval, and the data can then be processed as scan sampling.

Several metrics can be found in the literature to calculate synchrony. We cite here the most common ones.

(a)

The synchrony between two animals is calculated as the proportion of the scans during which they are engaged in the same activity (see example in Veissier et al., 1989):

𝑠𝑦𝑛𝑐ℎ𝑟𝑜𝑛𝑦 = 1 𝑛 ∑ 𝑆 𝑖 𝑛 𝑖=1 ( 7
)
where n is the number of scans, Si equals 1 if the two animals have the same activity at scan i and 0 if they do not.

The synchrony of a focus animal with the rest of the group or a certain sub-group of animals in the group can be calculated as:

(b) the average of the proportion of animals from the group or the sub-group performing the same activity as the focus animal across scans. This also corresponds to the average of synchrony indices (a) obtained for a focus animal and any other animal from the herd or the sub-group (Veissier et al., 1989):

𝑠𝑦𝑛𝑐ℎ𝑟𝑜𝑛𝑦 = 1 𝑛(𝑚 -1) ∑ ∑ 𝑆 𝑖𝑗 𝑛 𝑖=1 𝑚-1 𝑗=1 ( 8
)
where n is the number of scans, m is the number of animals in the group, Sij equals 1 if the focus animal and the other animal j have the same activity at scan i and 0 if they do not.

(c) the proportion of scans during which the focal individual performs the same activity as most individuals of the rest of the group [START_REF] Ruckstuhl | To synchronise or not to synchronise: A dilemma for young bighorn males? [Article[END_REF]. The calculation is similar to that for the synchrony between two animals given in (a) above but with Si equals 1 when the focus animal has the same activity as most of the group and 0 when it does not.

At group level, the synchrony can be calculated with several indices:

(d)
The proportion of scans where all animals of the group perform the same activity; Again, similar calculations as for (a) are used with Si equals 1 if all animals perform the same activity and 0 if not.

(e)

The average of metrics (b) (Veissier et al., 1989) or (c) [START_REF] Asher | Assessing synchrony in groups: Are you measuring what you think you are measuring? [Article][END_REF].

The metrics presented above depend largely on the number of activity categories and the number of animals in the group (especially metrics (d)): when the group is large and the number of activity categories is high, there is little chance that animals perform the same activity at the same time. [START_REF] Asher | Assessing synchrony in groups: Are you measuring what you think you are measuring? [Article][END_REF] thus recommend comparing the distribution of activity observed with the one obtained at random. This can be done with:

(f) Kappa coefficient of agreement. For instance, the proportion of pairs of animals observed with the same activity is calculated [START_REF] Rook | Synchronisation of eating, ruminating and idling activity by grazing sheep[END_REF]:

𝑃(𝑂) = 1 𝑛𝑝 ∑ 𝑆 𝑖 𝑛 𝑖=1 (9)
where n is the number of scans, p is the total number of pairs of animals in the groups, and Si the number of pairs of animals performing the same activity at scan i.

The expected proportion of pairs that would perform the same activity by chance is then calculated:

𝑃(𝐸) = 1 (𝑛𝑚) 2 ∑ 𝐶 𝑘 2 𝑙 𝑘=1 ( 10
)
where n is the number of scans, m is the group size, l is the number of activity categories, and Ck the frequency of observation of activity category k (i.e., total number of scan x animals occurrence of the activity).

Then

𝐾𝑎𝑝𝑝𝑎 𝑐𝑜𝑒𝑓𝑓𝑖𝑐𝑖𝑒𝑛𝑡 = 𝑃(𝑂) -𝑃(𝐸) 1 -𝑃(𝐸) (11)
The Kappa coefficient equals 1 if all animals always perform the same activity at the same time (full synchronization). It equals 0 when animals are not synchronised more than at random.

(g) Other methods can be found in the literature to compare the synchrony observed to that expected on a randomised dataset: calculating a dispersion index [START_REF] Raussi | A note on overdispersion as an index of behavioural synchrony: a pilot study in dairy cows[END_REF] or applying Monte-Carlo methods [START_REF] Whitehead | Testing association patterns of social animals[END_REF]. These two options are rarely used in the literature on behaviour (e.g., we did not find studies using the dispersion index apart from that of [START_REF] Raussi | A note on overdispersion as an index of behavioural synchrony: a pilot study in dairy cows[END_REF]). In most case, they actually may not have added value compared to the Kappa coefficient of agreement.

The activity categories should be carefully chosen. If there are too many categories (e.g., detailing

precisely what the animals do when standing active: walking, scratching, interacting with each other), the animals will seem little synchronised whereas if there are too few categories (e.g., active vs. inactive) they will seem very synchronised. [START_REF] Asher | Assessing synchrony in groups: Are you measuring what you think you are measuring? [Article][END_REF] recommend using 5 activity categories in laying hens.

It must be considered whether we expect that there can be or not social facilitation of an activity (that is an animal engaging in an activity encourages the other to do so). In ruminants, ruminating appears as a reflex activity, ruminating thus should not be used as a separate category but rather included in lying and standing idling (i.e., postures when ruminating can occur) because we do not expect social facilitation of ruminating.

To be interpreted in terms of positive relationship, the synchrony needs to be estimated between animals that have about the same time budget (i.e., same amount of time spent in each activity per day).

For instance, although a cow has a strong bound to its new-born calf, the apparent synchrony between them may be low because the cow spends lot of the time foraging whereas the calf spends more time lying [START_REF] Veissier | Social behaviour in domestic beef cattle when yearling calves are left with the cows for the next calving [Article][END_REF].

Biological meaning

Animals may be synchronised because the activity of an animal is influenced by that of other animals. Social facilitation has been described in many species and contexts [START_REF] Clayton | Socially Facilitated Behavior[END_REF]. Animals may be synchronised also because they adopt a similar rhythm of activity: activities follow a circadian rhythm triggered at least in part by external cues such as light or timing of food distribution (or milking in dairy cows) so if animals are subjected to the same cues, their activity will tend to be similar [START_REF] Flury | Daily patterns of synchrony in lying and feeding of cows: Quasi-natural state and (anti-) synchrony factors[END_REF].

The synchrony between two animals (fighting excluded) gives us an estimate of how closely (and positively) they are related to each other. Two animals bound by a positive social relationship have more chances than unrelated animals to express the same activity at the same time. For instance, when calves stay with their dam after weaning they keep preferential relations that are shown by proximity, exchanges of positive interactions, and also synchrony [START_REF] Veissier | Social behaviour in domestic beef cattle when yearling calves are left with the cows for the next calving [Article][END_REF].

Synchrony at the group level reflects social cohesion, i.e. the strength of the bonds between the animals in the group [START_REF] Clayton | Socially Facilitated Behavior[END_REF]. Groups newly formed are usually less cohesive, animals exchanging aggressive interactions and being less synchronised [START_REF] Mounier | Behavior, physiology, and performance of bulls mixed at the onset of finishing to form uniform body weight groups[END_REF]. The synchrony can also decrease if there is competition for the access to a resource, e.g., food and lying places. For instance, in cows and sheep, synchrony of lying decreases when lying space is limited [START_REF] Bøe | Resting behaviour and displacements in ewes-effects of reduced lying space and pen shape[END_REF][START_REF] Winckler | Effects of under-and overstocking freestalls on dairy cattle behaviour[END_REF]. The synchrony between an animal and the rest of its group reflects its familiarity with the group: synchrony may be low in case of newly introduced animals until the organization of the group is stabilised [START_REF] Arey | Time course for the formation and disruption of social organisation in group-housed sows [Article][END_REF][START_REF] Boyle | Does housing nulliparous dairy cows with multiparous animals prior to calving influence welfare-and production-related parameters after calving? [Article][END_REF]. A variation in synchrony can also be caused by a health disorder: the activity of an animal is modified in case of disease [START_REF] Dantzer | From inflammation to sickness and depression: when the immune system subjugates the brain[END_REF], so that it can depart from the rest of the group (e.g., a cow isolates and stay standing idling or lying for longer when ill [START_REF] Proudfoot | Social stress as a cause of diseases in farm animals: Current knowledge and future directions[END_REF][START_REF] Proudfoot | Linking the social environment to illness in farm animals[END_REF].

Discussion

In this review we present metrics that can be calculated from data on gross activity and identify their conditions for use (summarised in Table 1). We divided the metrics into four groups that all represent a different aspects of animal behaviour: the overall activity, the fluctuations around the mean activity, the cyclicity and the synchrony between animals.

The overall activity is the most often studied aspect. It represents the total duration and organisation of the activity in bouts. The fluctuations of activity during the day or across days and the organisation of these fluctuations according to (circadian) cycles are less often addressed but are gaining attention in research. Synchrony between animals is generally used to study the social organisation of a group of animals, but is also more and more used as specific indicators (e.g. diseases or evaluation of the management) and constitutes also a promising indicator of positive welfare (Keeling et al., 2021;Napolitano et al., 2009).

These four groups of metrics can be used to analyse the impact of housing and management procedures. In that case, the values at herd level are evaluated, all animals within the herd are taken into account. In most cases, the average herd level values per metric are expected to not vary much in time, unless management or housing change.

These metrics can also be used to compare animals within a herd individually (with same management and housing). Animals are usually consistent with time, so that the data can be used to phenotype them [START_REF] Bacher | Association between breeding bulls' reactivity to humans or handling and their daily behaviour and growth[END_REF][START_REF] Poppe | Development of resilience indicator traits based on daily step count data for dairy cattle breeding [Article[END_REF]. In turn the behavioural phenotype can inform about other traits. For instance, a cow that shows low regularity in activity is likely to be more susceptible to post-partum diseases, when she has to cope with metabolic constraints [START_REF] Van Dixhoorn | Behavioral patterns as indicators of resilience after parturition in dairy cows[END_REF].

Transient changes in activity can be observed under certain circumstances at animal level, especially when an animal is sick, in a specific physiological state (oestrus, calving), or stressed. When such transient changes are observed on most animals of the herd and at the same time, it is likely that the herd has been disturbed by external events (e.g., handling to apply a treatment, hoof trimming, period of heat stress). When the transient change is observed in only one or few animals, it is more likely an individual case of disease or a reproductive event.

Combining several behavioural metrics is usually necessary to have a comprehensive overview of the internal state of an animal. For instance, to infer the internal state of a cow (diseased, in oestrus, about to calve, or stressed), metrics on overall activity, fluctuations and cyclicity are necessary to be able to classify the cows into the corresponding state [START_REF] Lardy | Discriminating pathological, reproductive or stress conditions in cows using machine learning on sensor-based activity data[END_REF].

In this paper, only metrics describing overall activity, fluctuations around mean activity, cyclicity and synchrony between animals are described and discussed. The data can nevertheless be further processed to extract more information. For instance, a network analysis could be performed with links between individuals of a group estimated from their synchrony. Such an approach could probably be applied to study group effects such as social facilitation, leadership, or cooperation among individuals.

Markov chains can be used to analyse sequences of activities to better understand of the organisation of activities [START_REF] Rugg | Analyzing Time Budgets with Markov Chains[END_REF][START_REF] Schafer | A Bayesian Markov Model with Pólya-Gamma Sampling for Estimating Individual Behavior Transition Probabilities from Accelerometer Classifications [Article][END_REF]. Machine learning applied to metrics describing activity can also help to classify animals according to their phenotype or to detect changes in activity on specific animals and days [START_REF] Lardy | Discriminating pathological, reproductive or stress conditions in cows using machine learning on sensor-based activity data[END_REF][START_REF] Wagner | Comparison of Machine Learning Methods to Detect Anomalies in the Activity of Dairy Cows[END_REF][START_REF] Debauche | Farm animals' behaviors and welfare analysis with ia algorithms: A review [Review][END_REF].

In conclusion, activity data provide the raw material for the calculation of several metrics that describe animal behaviour. The choice of which metrics to use, depends on the research question or potential application. A clear research question helps to select the metrics that best characterise an animal behaviour in relation to the research or applied question. We believe that clarification of the metrics and on how they should be calculated will help to standardise these metrics, making them easier to use and allowing comparisons between studies.

Figure 1 -

 1 Figure 1 -Visualisation of the data acquisition and processing proces. The scope of this paper focusses on the possible calculations of the data that describe the four metrics: overall activity, fluctuations around the mean activity, cyclicity of activity and synchrony. The calculations can be done on data that is acquired by obbservations and/or with sensors.

  depends on housing and management conditions: cows grazing at pasture spend much more time eating and walking than cows kept indoors and fed herbage harvested from the same pasture (527 min/d eating and 311 min/d walking at pasture vs. 398 min/d and 133 min/d indoor (Dohme-Meier et al., 2014)); bulls and sheep spend less time eating when the diets contain a large proportion of fibre than when the diets contain a large proportion of starch (-67% in bull fed a 45% starch diet and -18% in sheep fed a 38% starch

  The variations are described by metrics calculating how far values, obtained on a given time period, are spread around the mean value across several time periods. The calculations are generally applied to the duration of activities or the level of activity, less often to the number of bouts or their duration, with all values obtained at animal level. The time period is often the hour within the day(Mialon et al 2008 (eating duration in bulls),[START_REF] Lardy | Discriminating pathological, reproductive or stress conditions in cows using machine learning on sensor-based activity data[END_REF] (level of activity in cows)) or the day within a period of at least several days[START_REF] Hut | Sensor based time budgets in commercial Dutch dairy herds vary over lactation cycles and within 24 hours[END_REF] (duration of each activity);Solano et al., 2016 (number of bouts)).

  a day) are similar to those traditionally used in descriptive statistics except that they are applied at individual level (to characterise the variability of the activity of a given animal and not the variability between animals): Minimum (Min) refers to the minimum value observed/recorded Maximum (Max) refers to the maximum value observed/recorded Range corresponds to the difference between Min and MaxQuantilesQuantiles re cut points dividing the dataset into continuous intervals with equal probabilities. The most commonly used quantiles are quartiles, which divide the number of data points into four parts, where the first quartile (Q1, 25 th percentile) is the maximum value on the 25% of the dataset that obtained the lowest values, the second quartile (Q2) corresponds to the median, and the third quartile (Q3, 75 th percentile) is the minimum value on the 25% of the dataset that obtained the highest values.

Figure 2 -

 2 Figure 2 -Examples of non-periodicity of eating behaviour visualised through correlograms (top), and Fourier transform pattern (bottom) (frequency of activity performed per day). In the correlograms, dotted lines represent the expected cyclicity of the specific behaviour, while the solid lines indicate the observed behaviours. Non-periodicity is assessed by calculating the RMSE of the correlogram as compared to the sinusoid. In the Fourier transform pattern the amplitude is given per frequency, expressing the strengh of the cycles in activity for that frequency. The peak at frequency 1 shows that this cow has a strong circadian pattern. The sum of the amplitudes at frequency 1, 2, 3 and 4

Table 1 -

 1 Summary of metrics to describe the activity of animals with their condition of use

	Category	Metrics	Raw data	Purpose	Limitations	Reference
	Overall activity	Proportion of time spent in an activity	Collection of activity bouts	Detection of physiological states	Depends on their living	Veissier 2004
			with duration	(e.g., oestrus), pathological states	conditions and the farm
				(lameness), or stress	management
					Modifications are also
					observed between individuals
		Number and duration of activity bouts	Collection of activity bouts		There is a need to :	Tucker et al., 2009.
			with duration		-record on long periods to	Ledgerwood et al., 2010.
					avoid edge effects.	Yeates et al., 2001
					-describe activity with similar
					details
					-have a clear determination
					of when a new activity starts
		Activity level	Time spent on activities		Weights of each activity to be
					elicited.
	Fluctuations	Min/max/range/quantiles/variance/RMSSD	Timeseries	To identify pathological or		Hut et al., 2022; Lardy et
	around the mean			physiological states of cows		a;. 2023; Mialon et al.
						2008.
		Irregularity	Continuous sampling			Salgado et al. 2021a&b
	Cyclicity	Autocorrelation	Continuous sampling	Detection of physiological states	Recording on long periods	Dixhoorn et al., 2023,
		Non-periodicity	Continuous sampling	(e.g., oestrus), pathological states	(longer than the cycle to be	2018;
		Cosinor method	Continuous sampling	(lameness), or stress.	detected)	Chkeir et al., 2019
		Fourier transform	Continuous sampling	To predict resilience.
		Degree of functional coupling (DFC)				Berger et al., 2003;
						Scheibe et al., 1999
	Synchrony	Proportion of animals from the group or the sub-group	Scan sampling	Bonds between animals and / or	Depends on the number of	Veissier et al., 1989
	between	performing the same activity as a focal individual.		availability of resources	animals and number of
	individuals				activity categories
		Proportion of scans during which a focal individual	Scan sampling	Inclusion of an animal in a group.		Ruckstuhl, 1999 Asher &
		performs the same activity as most individuals of the		Detection of health disorder		Collins 2012
		rest of the group
	Synchrony at	The average of metrics taken at individual level.	Scan sampling and	Social cohesion		Veissier et al., 1989; Stoye
	herd level		continuous sampling	Competition for resources		et al. 2012
						Arsher and Collins, 2012
		The proportion of scans where all animals of the group				Arsher and Collins, 2012
		perform the same activity				Stoye et al., 2012
		Kappa coefficient of agreement				Rook and Penning, 1991

Funding

The study received financial support via the SmartCow project funded by the European Commission (Horizon 2020 research and innovation program, grant agreement No. 730924) and is part of IRC-SAE (CAP 20-25).

Data, scripts, code, and supplementary information availability

Supplementary material : Examples of calculations of metrics using R software are available online: Supplementary materials belonging to From data on gross activity to the characterization of animal behaviour: which metrics for which purposes: https://doi.org/10.6084/m9.figshare.24891252.

Conflict of interest disclosure

The authors declare that they comply with the PCI rule of having no financial conflicts of interest in relation to the content of the article. Isabelle Veissier is recommender of PCI Animal Science.