The general public prefers production systems that promote heat abatement for farm animals, like shade on pasture and fans in indoor housing (Cardoso et al., Reference Cardoso, von Keyserlingk, Hötzel, Robbins and Weary2018). However, heat stress is one of the main challenges of grazing cows, as animals on pasture are constantly submitted to great environmental variability. Nowadays, new approaches to data analysis (fuzzy logic, artificial neural networking and data mining) can help researchers interpret large databases, improving livestock farming through a better understanding of the production system. Pattern extraction by data mining potentially allows accurate decision-making. Data mining tasks have been used in several dairy production research areas in an attempt to detect problems such as dystocia and calving difficulty (Zaborski et al., Reference Zaborski, Proskura and Grzesiak2017, Reference Zaborski, Proskura and Grzesiak2018), mastitis (Sharifi et al., Reference Sharifi, Pakdel, Ebrahimi, Reecy, Farsani and Ebrahimie2018) and factors affecting cow reactivity during milking (Neja et al., Reference Neja, Piwczyński, Krężel-Czopek, Sawa and Ozkaya2017). However, most such research has focused on confined animals and only a few papers have applied this technique to analysis of animal behaviour raised on pasture. Based on this, we hypothesized that data mining can be applied for rule extraction and to identify potentially motivating environmental factors for grazing dairy cows to access shade.
Material and methods
The experiment was conducted in accordance with guidelines laid down by the Animal Ethics Committee of the Universidade Federal do Paraná and national legislation.
Experimental area and management
The study was carried out on a commercial dairy farm in southern Brazil. Data collection was performed during summer (southern hemisphere). The experimental area had 4 paddocks (1.500 m2/paddock), and each one was composed of a silvopastoral system (SPS). The silvopastoral system provided a total shaded area of 5 m2/animal in each paddock and a sunny area of 33 m2/animal. The cows were moved daily to a new paddock. The paddocks and SPS distribution were uniform, allowing us to evaluate one paddock per day.
Animals and frequency at the shaded and sunny areas
Lactating Jersey cows (n = 39), with similar coat colour (light brown), and weight (mean ± sd) of 450 ± 50 kg were observed during four days, for approximately 8 h each day (from 9 : 00 to 16 : 50). As the proposal of this study was to classify the cows' decision in relation to environmental factors regardless of behaviour, we evaluated the frequency of dairy cows located in different areas of the SPS. The frequency of animals in shaded and sunny areas was recorded by scan sampling at 10 min intervals. The cow was considered to be in the shaded area when more than 50% of her body was in the shade of the tree. The cow was considered to be in a sunny area when more than 50% of her body was in the sun.
Environment evaluation
Environmental factors of air temperature (AT, °C), relative humidity (RH, %), solar radiation (SR, W/m2), and wind speed (WS, m/s) were measured in each area (shaded and sunny) of the SPS (detailed in the online Supplementary File). Data collection was carried out from 9 : 00 to 16 : 50 with intervals of 10 min., at a height of 1.3 m from the ground, which corresponds to the height of the centre of mass of Jersey adult cattle.
Data mining and statistical analysis
Animal frequency at the areas and environmental data were used to build a database with 29 320 observations and 10 variables, one being the classification (online Supplementary Table S1). The database was built with each observation (frequency at the areas and environmental) synchronized by date and time of day. Data mining was performed with aid of the software Waikato Environment for Knowledge Analysis (WEKA®, 3–4), which classifies the data and builds a classification tree using the J48 algorithm. Model accuracy, as well as class precision, were calculated by a confusion matrix (online Supplementary Table S2). In order to confirm the level of agreement of the data sets and classification accuracy, the Kappa statistical method was used (online Supplementaty Equation 1).
As confirmatory analysis, the data (frequency at the areas and environment) were analysed by generalized linear models and submitted to the Spearman correlation test by statistical software R. In all models, areas were used as fixed effect, while animals, days and hours were fixed as random effects. The confidence intervals were estimated using Type II Wald chi-square tests and the fit of the model was given by a likelihood-test. The fitness of the models was tested by inspecting the residual in the graphs, a line of best fit. The normality of the random facts was given by quartile plot means with a confidence interval of 95%.
Results
The data mining model correctly classified 87% of the instances with substantial accuracy (Kappa = 0.73; Landis and Koch, Reference Landis and Koch1977) and provided precision in classifying the location classes, shaded (0.96) and sunny (0.74). The model showed five classification rules, these being two rules for cow's decision to access sunny areas, and three rules for accessing shaded areas. The solar radiation (root node of the classification tree) was the most important environmental factor to classify the cow's decision (Fig. 1).
The environment of conditions (shaded or sunny) influenced (Z = 15.449, P < 0.001) the areas used by animals, the highest frequency (70%) being that recorded in the shaded areas. There was a difference in air temperature (F = 3.419, P < 0.001, Fig. 2a) and solar radiation (F = 25.716, P < 0.01, Fig. 2c) between the shaded and sunny areas. In addition, air temperature and solar radiation were correlated (r = 0.63; P < 0.05). Shaded areas exhibited a numerically higher relative humidity but this difference was not significant (F = 1.864, P > 0.05, Fig. 2b). Wind speed did not differ between the area (F = 1.213, P > 0.05, Fig. 2d).
The critical period for solar radiation (727 W/m2) was in the afternoon between 12 : 00 and 12 : 50. Both solar radiation and shade use increased during the morning and until 12 : 50. The shade use of dairy cows increased by an average of 8.5% per hour during this time (Fig. 3).
Discussion
This is the first study that has applied data mining in a classification task to identify the interaction between dairy cow decision and environmental factors in pasture systems. In our study, solar radiation was the most reliable environmental factor to indicate cows' decision to access shaded or sunny areas. This does not mean that the classification tree excluded the influence of air temperature in cows' decisions, but in the mathematical space, solar radiation was more important. The correlation between solar radiation and air temperature may justify why the algorithm did not consider the air temperature for building the classification tree. As an attribute of simplification, the model uses the minimum information necessary for classifying the attributes (Buczak and Guven, Reference Buczak and Guven2016), since variables that present a significant correlation can compromise the model development. Not considering redundant attributes is a task that improves the model accuracy.
Both variables, solar radiation and air temperature, were lower in the shaded areas, and they are important when assessing the animals' thermal comfort. The individual effect of environmental factors on dairy cow behaviour is well known, but studies about the interaction of environmental factors are limited (Sejian et al., Reference Sejian, Bhatta, Gaughan, Dunshea and Lacetera2018; Tullo et al., Reference Tullo, Mattachini, Riva, Finzi, Provolo and Guarino2019). In livestock, thermal comfort indices help to interpret the complex interactions between the physical (environment) and biological (animal) components, resulting in a variety of responses, which must be interpreted according to the animal species and individual characteristics. As an example, the temperature and humidity index is the main thermal comfort index used in animal production (eg at pasture see Sharpe et al. Reference Sharpe, Heins, Buchanan and Reese2020 and in confinement see Mcdonald et al. Reference McDonald, von Keyserlingk and Weary2020). However, a disadvantage is that it only considers these two variables (Sejian et al., Reference Sejian, Bhatta, Gaughan, Dunshea and Lacetera2018). When assessing the thermal comfort of animals raised on pasture, solar radiation must be considered, as it is one of the main environmental factors that trigger thermal stress (Magalhães et al., Reference Magalhães, Zolin, Lulu, Lopes, Furtini, Vendrusculo, Zaiatz, Pedreira and Pezzopane2020).
To respect ecological limits and provide better welfare conditions for farm animals, we need to provide elements to mitigate adverse situations. Whilst in confinement management the elements are specific and controllable, like fans and sprinklers, in pastoral environments natural shade is the most important element to mitigate the effects of environmental factors. In our study, the cows remained longer in the shaded (70%) than sunny areas. Shaded areas present better microclimatic conditions and cows remain longer in these areas during the summer (Deniz et al., Reference Deniz, Schmitt Filho, Hötzel, de Sousa, Pinheiro Machado Filho and Sinisgalli2020), even on days with relatively low levels of solar radiation (Schütz et al., Reference Schütz, Rogers, Poulouin, Cox and Tucker2010). In the winter, cows could also use shade when motivated to do so, either to seek protection from the sun in the middle of the day or to rest (de Sousa et al., Reference de Sousa, Deniz, Vale, Dittrich and Hötzel2021). We only evaluated cloudless days, but we could observe that as solar radiation increased during the morning, the animals moved to shaded areas. Besides shade providing a better microclimate for the animals, raising animals in shaded pasture meets consumer expectations for animal production systems closer to natural (Cardoso et al., Reference Cardoso, von Keyserlingk, Hötzel, Robbins and Weary2018).
Pattern recognition is an important tool to improve livestock management, as this is based on the extraction of characteristics that help to classify a study object (Theodoridis and Koutroumbas, Reference Theodoridis and Koutroumbas2003). From the categorization of data (in this case animal behaviour) the most probable hypothesis (here, shade use) can be found within a set of hypotheses. Thus, models developed by data mining help in the interpretation of complex databases, and assist the farmers in decision making to improve the animal's thermal comfort and reduce economic losses. However, obtaining a large database of pasture areas remains a challenge, as generally the number of animals per area is lower when compared to confinement. In addition, pastoral environments are complex systems with great environmental variability, since many obstacles hinder the total control of these open systems. Thus, we strongly suggest that future research uses data mining in environmental science and in the behaviour of animals raised on pasture to expand our knowledge on more sustainable systems models.
In conclusion, the data mining (machine learning technique) allowed the development of a mathematical model to extract patterns of environmental factors that influence the decision of dairy cows to access determined areas. Solar radiation was the environmental factor with the greatest potential to classify the decision of dairy cows to access shaded areas. Through the pattern found in our study, we suggest that studies evaluating thermal comfort of dairy cows on pasture areas should use indices that consider solar radiation.
Supplementary material
The supplementary material for this article can be found at https://doi.org/10.1017/S0022029921000509