Behavioral fractal method associated with GPS tracking to spatial activity sequences of grazing cattle

ABSTRACT Global positioning and geographic information systems are essential for studying foraging animal behavior. This study aims to implement a fractal self-similarity and chaos game computational efficient methodology to determine the behavior-associated fractal using GPS data of activity sequences in spatial ranges of livestock movement trajectories in interaction with habitat factors. Six cows were randomly selected with an average weight of 480 kg, maintained under the same conditions, and a GPS-equipped collar was installed, programmed at intervals of 1 min and an average of 9 h daylight. Roughly 192810 registries and an average of 32135 signals per cow from trajectory tracking in spatial activity sequencing were used as a variable of interest in the fractal characterization methodology. Spatial patterns were evaluated using the Morán’s spatial autocorrelation indices, cluster, and non-parametric statistics, evaluating deterministic spatial patterns of preferential activities associated to spatial ranges of less than 7.1 m (resting 42 %, grazing 38 %). GPS information was refined through spatial ranges and changes in activities under resting, eating, traveling, and complementary schemes associated to the fractal displacement behavior of grazing cattle. This information was processed and mapped using fractal self-similarity rules in the Sierpinski triangle to determine the typical fractal of spatial activities per animal in the habitat. The particular fractal record of each bovine as a function of trajectory sequences was mapped for binary image matrices, registering a good classification (83 %) of the animals by breed and climatological cycle, using information from the sequencing of spatial activities associated to the preferred behavior in the habitat.


Introduction
Information monitoring and consolidation in the ethological study of diverse animals and cattle under grazing activities using global positioning systems (GPS) and satellite images have been consolidated in the last 30 years (Williams et al., 2022;Bailey et al., 2018;Dean et al., 2013).These are essential tools in research on the spatial and temporal displacement of animals in interaction with biotic and abiotic factors in the environment, generating progress in ecology and precision farming at different habitat scales (Demšar et al., 2015;Teimouri et al., 2018;McVey et al., 2022).Using computational algorithms, geographic information systems (GIS) speed up animal movement modeling time in various environmental conditions.This methodology is used to evaluate animal displacement or movement patterns by assigning spatial ranges in resting, grazing or eating, and traveling activities in interaction with biotic factors, such as breed, forages, and tree systems (Stephenson and Bailey, 2017;Mora-Delgado et al., 2018;Xu et al., 2020), jointly with abiotic factors such as meteorological seasons, access to water, and land slopes (Bailey et al., 2018).Accordingly, this research aimed to implement computational procedures to determine the typical trace of spatio-temporal fractal self-similarity as a function of displacement and as a non-linear variable of interest related to the sequences of activities such as resting, grazing, traveling, and complementary activities carried out daily by cows interacting with habitat factors.
The DNA classification methodology was implemented in this research to generate significant development using comparative processing algorithms with image matrices due to the progress of computational platforms (Hoang et al., 2016).This methodology includes sequencing applications using fractal selfsimilarity theories and chaos game representation (CGR), reporting progress in genetics and protein field applications (Löchel and Heider, 2021;Jones et al., 2011).Spatial activities sequencing data will be mapped in the habitat and the characterization and classification analysis through the typical fractal image matrices of the deterministic spatial behavior of an animal will be implemented using algorithms with low computational cost compared to other methodologies and focused on cattle welfare projection and the rational management of ecosystems (Herlin et al., 2021;Hoang et al., 2016;Wang et al., 2015).

Experimental design, data collection, and study site
The spatial location data of this study were collected with a Garmin eTrex Vista GPS, conditioned in collars placed on six individuals (three animals per breed) of two cattle breeds (Brahman and Romosinuana) in two contrasting meteorological seasons with a 1-min resolution during approximately 9 h of daylight.The "dry" season (D) registered an average of 15191 individual records for each cow from 09 July 2011 to 07 Aug 2011 for a total of 91150 data and an average of 3038 data per day.The "wet" season (W), which ranged from 08 Oct 2011 to 14 Nov 2011, registered averages of 16949 and 3388 data, respectively, for a total of 101664 records (Figure 1A).The average temperature and precipitation data for the two observed cycles are 88 mm and 29 °C and 155 mm and 27 °C, respectively.
This study was carried out following a non-invasive experimentation methodology under general standards for using collars equipped with GPS, with weights of less than 1 kg, and placed on the necks of dry cows.The use of observation and monitoring activities with these devices does not affect the natural behavior of bovines in their habitats (Manning et al., 2017;Seidel et al., 2018).The collars were always placed and removed from the cows at the same location (909976, 1049211) near the salting room (Figure 1B).In two contrasting climatological cycles, the observation of time and space were carried out for 30 d.The equipment placed on the collar was always installed in the morning hours around 7h00 and was removed at around 17h00.The GPS records were compiled every minute with a daily average of 9 h.The field protocols implemented were those of Mora-Delgado et al. (2018).The geographical study site where the experiment was performed is a 4-ha field at coordinates 5°02'29.78"N, 74°53'19.41"W, altitude 275 m, an average annual temperature of 26 °C and annual precipitation of 1,732 mm in the city of Armero Guayabal, Tolima, Colombia.

Ecosystem factors and animals
The spatial location of biotic and abiotic factors was recorded in a typical pasture of a tropical dry forest area (Figure 1B).], and Teca (Tectona grandis L.f.).The mean height of the species was 14 ± 0.3 m, and the mean diameter at breast height was 0.4 ± 0.04 m.A total of 68 gauging points were randomly selected in a physical measurement space with a dimension scale using a frame of 4[(0.5 m)(0.5 m)] = 4(0.25 m 2 ) = 1 m 2 , following the methodology used by Polania et al. (2013).At each gauging point, green forage samples were taken by extraction, and the types of grasses and weeds were determined by direct observation.Green forage was measured in g m -2 at each gauging point in the "dry" (D) and "wet" (W) seasons and  The six cows were randomly selected from 18 animals and coded as V k with k = 1, …,6.Three individuals were Brahman (B) with k = 1,2,3 and three were Romosinuana (Ro) for k = 4,5,6.The individuals had an average live weight of 460 kg and were between 34 to 48 months of age.

Sequences scheme of changes in animal activities associated to movement
The stored data was concatenated day to day in each meteorological season for each V k.This way, the cumulative amount of GPS signal sequence data of cow displacement every minute and processed in the GIS computational platform was related in a vector of 192814 data.These corresponded to 6 cows*30 days*2 climatological cycles, for a total N T = 360 observed cases in modeling the typical fractal associated to the linear sequencing of activities per cow, generating i k (t) for t =1,2,3...30 and V k (j) = [long k (j),lat k (j)] for 1<=j<= i k (30).For example, the black dots in Figure 1B show the spatial location sequence of the movement in the habitat for the V 4 cow in the "wet" season and the data per day t and i 4 the cumulative amount of data with i 4 (30) = 17050.
The Euclidean metric to define distances was used and the j -th displacement of animal k in meters D k (j) was calculated with the distance from V k (j -1) to V k (j) for j = 2,… i k (30).At the end of the day, each GPS device was removed and put on again the next day.Therefore, it was necessary to restart the displacement daily to D k (j) = 0.This occured for j i k t = = 1 and j i i t 1).The spatial dimension constraint was assumed as d = 5 m, due to the GPS calibration and measurement error, according to the methodology in Becciolini and Ponzetta (2018) and Ungar et al. (2011).Hence, the displacement of animals in the habitat was classified into three spatial ranges through 25, 50, and 75 % quantiles, respectively, assigned to the empirical distribution of activities by spatial ranges indicated in Table 1, including resting (ℜ), grazing or eating (Ԑ), and traveling () respectively for each V k cow per meteorological season.The observed frequencies corresponding to a succession of activities were established following the methodology proposed in Polania et al. (2013), Ungar et al. (2011), andMcVey et al. (2022).Two observed frequency schemes of the trajectories in successive sequences of spatial activities were used: resting, grazing (eating), and traveling, defined by A 1 = {ℜ, Ԑ,}.Additionally, a second scheme A 2 = {ℜ, Ԑ, , C} was proposed, in which activity (C) was included, representing the complementary activity corresponding to the biological need to drink water and consume mineral salts.Thus, with the sequences of activities ( )∈ for j = 1… i k (30) the animals interacting with incident factors of displacement in search of comfort in the ecosystem were characterized ethologically.
For example, cow V 4 in the "wet" season under the A 2 scheme registered a sequence of 17050 activities, so

Possibilities of activity changes in schemes associated to bovine behavior
Animals were characterized and classified through fractal self-similarity associated to the frequencies of consecutive sequences of activity change.The typical fractal model was built with information from each succession of two consecutive activities per V k cow under two A r schemes with r=1,2.In scheme A 1 and {ℜℜ, ℜԐ, ℜ, ԐԐ , Ԑℜ, Ԑ, , ℜ and Ԑ}, there were nine possibilities in terms of the sequence mapped to the fractal at the vertices of an equilateral triangle; on the other hand, under the scheme A 2 {ℜℜ, ℜԐ, ℜ, ℜC, ԐԐ , Ԑℜ, Ԑ, ԐC, , ℜ, Ԑ, C, CC, Cℜ, CԐ, and and C}, a total of 16 possibilities were mapped to the vertices of a square.

Kruskal-Wallis test and Moran and Getis indices
Following the methodology in the evaluation of spatial patterns of grazing areas (Sankey et al., 2009), spatial autocorrelation patterns of sequences of activities were evaluated in the A 1 scheme under the statistical null

Notation of activities
Activities by spatial ranges (m) hypothesis high/low clustering (General G) to determine random or deterministic trends of spatial features.A negative ZG < 0 value indicates that the values of the variable are grouped into spatially low values in the study site.The spatial autocorrelation tests, the Moran indices, and high/low clustering (Getis-Ord General G) were performed using spatial patterns statistics in ArcGis10.5 (ESRI 2016).The tests were used to assess the spatial autocorrelation structure dynamics of animal displacement activities (Schmal et al., 2017;Getis and Ord, 1992).The non-parametric Kruskal-Wallis test using the Matlab R2019a libraries and the Infostat2017 software through the free software environment R were used to evaluate if a group of data came from the same population in two activity schemes.Furthermore, the ANOVA was used to compare the sequences by categories of bovine spatial activities as an extension of the Mann-Whitney U test (Ungar et al., 2011;McVey et al., 2022).

Classification using fractal self-similarity dendrograms of images obtained from the chaos game
The analysis and classification of sequences of activities associated to displacement under the A r schemes were conducted computationally by implementing fractal self-similarity and chaos game procedures using Hoang et al. ( 2016) methodology.The sequences of activities were mapped to the fractal by assigning a different activity to each vertex in the regular polygons of Figures 2A and 2B, Tables 1 and 2. Points inside each polygon represented the sequences of activities A j r k ( ) for the V k animal in each meteorological season.First, the schemes for r ϵ{1,2} were fixed, and the initial point of each geometric figure was located geometrically in the barycenter.Then, the consecutive point inside the geometric figure was plotted as the midpoint between the centroid and the vertex, corresponding to the activity in the A r k ( ) 1 sequence.Therefore, the second point inside the figures was the midpoint between the first point and the vertex associated with the A r k ( ) 2 activity.Continuing the process sequentially, the j-th point inside the figures was the midpoint between the (j-1)-th point and the vertex associated to the last recorded activity A i r k k  the corresponding element in the I n array and returns the absolute difference in the corresponding element of the output D array.The next step was to remove the matching elements between I m and I n to generate a discrepancy matrix A given by A(m,n) = length(find(D > 0)), which can be normalized, dividing by the maximum component to obtain matrix Vector Y was calculated with the cityblock distance between components of the X array under the Yv=pdist(X, 'cityblock') function.Then, the Y = squareform(Yv) function was used to obtain the symmetric matrix Y that contains all the distances of the Yv vector.This function converted the Yv vector of length m(m-1)/2 = 66 into Y, a 12-by-12 symmetric matrix with zeros along the diagonal.The objects were then grouped into a Z binary hierarchical cluster tree via the Z=linkage(Y,'weighted') command.This linkage command used the distance information specified in command pdist to determine the proximity of objects to each other.As objects were paired into binary groups, the newly formed groups were gathered into larger groups until a hierarchical tree was formed.The weighted average link 'weighted' used a recursive definition for the distance between two groups.If group r was created by combining groups p and q, the distance between c and another group s was defined as the average of the distance between p and s and the distance between q and s, using Subsequently, based on the information from the similarity matrix Z, the command dendrogram(Z) generated the hierarchical binary tree classification cluster.The Excel Office 2019, ArcGis 10.5 esri 2016, and Hawths Analysis Tools for ArcGIS software consolidated the information in Tables 1 and 2. The software MatLab®10 R2019a was used to elaborate Figures 1-4.

Preferences of activities by breed and climatological cycle under the Kruskal-Wallis test and the Moran and Getis indices, indicators of animal displacement
The evaluation of spatial autocorrelation by ranks of activities displacement for each V k cow implemented using the Moran and Getis autocorrelation indices indicated deterministic spatial autocorrelation (p < 0.01).Meanwhile, the high/low clustering index (Getis or General G) showed positive autocorrelation values and high and negative standardized Z Getis <0 values.The sequences of spatial activities associated to animal behavior were correlated to deterministic movement patterns, with preferences for small ranges of localized displacement {ℜℜ, ԐԐ, Ԑℜ and ℜԐ}, separated by movements of longer distance {ℜ, ℜ, and } with a higher proportion of preferences by individuals to carry out activities, such as resting and grazing (eating) in the habitat (Table 2) (Sankey et al., 2009).The consecutive sequences of activities of longitude of 192,814 data of bovines were compared, comprised by the concatenation of the activities in two meteorological seasons employing the Kruskal-Wallis test (p < 0.01).The evaluation was performed through comparisons using the average number of activities carried out by the animals per breed and meteorological season under the A 2 scheme, showing the preferences of animals according to the percentages of activities as follows: ℜ (42 %), Ԑ (38 %),  (18 %), and C (2 %) (Figure 3B and Table 2).When comparing the successions of commutation of activities by breed and meteorological season, ethological traits of the Brahman cows (B) in two meteorological seasons were observed grazing or eating (ԐԐ), traveling (), and visiting the drinking and salting troughs (CC) more frequently than the Romosinuana (Ro) individuals.The opposite occurred in activities that included resting {ℜℜ, ℜԐ, and Ԑℜ}.
The relative frequencies of the commutation successions in nine possible consecutive activity changes were compared in the A k 1 scheme, finding differences (p < 0.01) grouped into five categories indicated by letters  a to h (Figure 3A).In the A k 2 scheme, similar statistical differences (p < 0.01) were found in commutation groups in nine categories (Figure 3B).These results indicated heterogeneity and asymmetry in the behavior of cows associated to their spatial activity change sequences in the habitat.

Breed prediction by dendrogram classification associated to the sequencing of activities
Using the chaos game (Figures 2A and 2B), the fractal image matrices were compared bivariately point by point to obtain the similarity matrix Z. Classification was made by implementing hierarchical trees per pair of cows under the A 1 and A 2 schemes (Figures 4A and  4B), respectively.Two groups were identified in the dendrogram of Figure 4A.The first group was comprised of animals of the Brahman breed ( 3 ) where an individual classification independent of the meteorological condition was consolidated.Thus, the breed classification had high effectiveness of 83.3 %.The second group included 14 % of the Brahman breed V W 3 and 85 % of the Romosinuana breed (V H 4 , V D 4 , V 5 , V D 5 , V W 6 , and V D 6 ), indicating a high ranking according  to the Ro breed.It could also be observed that the B breed was more predictable than Ro, concurring with the individual classification.Furthermore, by including the complementary (C) activity, a better classification was obtained according to the breed.

Discussion
The usefulness of remote sensors, such as GPS, constitutes an essential tool for understanding behavior patterns in the movement or displacement of grazing livestock, allowing real-time monitoring (Stephenson and Bailey, 2017;González et al., 2015).GPS tracking can be used to answer a wide variety of questions (Bailey et al., 2018;Seidel et al., 2018).In this case, the results suggest a more significant displacement of the animals in the dry seasons.However, the Brahman breed showed a more significant displacement than the Romosinuana breed (p < 0.01).These results agree with what was reported by Russell et al. (2012), in which Brahman cows traveled more considerable distances per day during the summer seasons (p < 0.01) than Angus or Brangus cows.A more significant proportion of time dedicated to resting was observed per climatological cycle, consistent with findings in the same tropical ecological zone, indicating a higher proportion of time dedicated to this activity (Mora-Delgado et al., 2018).Thus, on average, the cows spent 33 % of their time grazing for food, 42 % resting, and 25 % traveling.The results indicate a higher proportion of time dedicated to activities such as resting (lying down), resting (standing), or ruminating (González et al., 2015;Ungar et al., 2011).
In the A 2 scheme, there were differences by activity commutation groups (p < 0.01), indicating heterogeneity and asymmetry of the deterministic behavior of the cows.The tortuosity analysis explains this heterogeneity and asymmetry, represented by sinusoidal and nonlinear movement in the plane (Liu et al., 2015).Hence, the activity change sequences were consistent with the morphology, physiology, and preferences of animals in the complex behavior at temporal and spatial scales proposed by Herlin et al. (2021).
The results indicate a time dedicated to moving or traveling in search of food of 19 %, in discrepancy with the 6 % reported by Mora-Delgado et al. (2016).A larger traveling explains this result in searching for better grazing sites in tropical pastures.However, this statement needs to be seen with caution, as other factors can affect the movement of animals, which can be evaluated from the fractal approach (Almeida et al., 2010).The results of the cluster technique implemented with bovine displacement patterns allowed identifying that the foreign Brahman breed was more predictable than the Colombian Romosinuana breed under the A 2 scheme.However, it is crucial to validate this methodology with a more significant number of animals of different breeds.

Conclusions
It is essential to highlight that the results were based on limited data and should be viewed with caution.The potential of the fractal self-similarity methodology and dendrograms as a tool to identify deterministic patterns of the sequencing of activities with data of the georeferenced positions obtained with GPS and the interaction with ecosystem factors was brought to the discussion.The results of this research, through this technique applied to image matrices of the associated fractal using the game of chaos, allowed a better classification of the breed with the A 2 scheme by including a complementary activity and describing deterministic patterns of behavior of grazing animals associated to spatiotemporal displacements with a high degree of tortuosity.It could also help formulate hypotheses for specific scientific experiments to identify animals by their behavior in space activities, particularly for grazing cattle in precision farming.The hierarchy, interactions between activities, and changes in activities of grazing cows by breed and climatological cycle were described.The Kruskal-Wallis test indicates that the animals showed more significant average displacement in the dry season, with spatial preferences for short displacement journeys in activities such as resting and grazing (food).

Figure 1 -
Figure 1 -GPS data of V k cow movement positions at two contrasting meteorological seasons in the geographical study site.A) GPS tracking data of grazing cows recorded at two meteorological seasons.B) GPS data of the spatial positions of cow V 4 in the Armero-Guayabal habitat during the wet season.
wareaopen(I m ,5) function was used to remove all connected components with fewer than 5 pixels from the binary image I m , producing another binary image I m .Consequently, the D matrix was constructed with D(m,n) = imabsdiff (I m , I n ), where the imabsdiff function substracts each element in the I m array from

Figure 2 -
Figure 2 -Fractals associated to the chaos game in the A r schemes with r=1,2.A j k 1 ( )= Activities of schemes A 1 according to the displacement of the V 4 cow; Commutation of activities: resting (ℜ), eating (Ԑ), and traveling ().A j k 2 ( ) = Activities of schemes A 2 according to the displacement of the V 1 cow; Commutation of activities: resting (R), eating (Ԑ), traveling (), and complementary (C).A) Sequence A j 1 4 ( ) in the wet season.B) of schemes A 2 according to the displacement of V k cows; Commutation of activities: resting (ℜ), eating (Ԑ), traveling (), and complementary (C).Grazing cattle classification Sci.Agric.v.80, e20220052, 2023

Figure 3 -
Figure 3 -Kruskal-Wallis test at a significance level of 5 % (p < 0.01) comparing commutation frequencies of activities in schemes A r , r=1,2;for V k X , X ∈ {D, W}.Notation V k D is equivalent to V k in the "dry" season, and V k W represents the V k sequence in the "wet" season.A) Activity switching frequencies under the A 1 scheme, with a standard deviation of 13.78.B) Activity switching frequencies under the A 2 scheme, with a standard deviation of 11.6.Commutation of activities: resting (ℜ), eating (Ԑ), and traveling ().

Table 1 -
Activities of schemes A 1 and A 2 according to the displacement of V k cows.

Table 2 -
Comparison test of relative frequencies associated to the commutation state in A 2 activities for V k cows.Wallis test, comparison of letters (from a to i), classification in nine groups (average percentages with a common letter (p > 0.05)); A j