<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE article PUBLIC "-//NLM//DTD JATS (Z39.96) Journal Publishing DTD v1.3 20210610//EN" "JATS-journalpublishing1-3-mathml3.dtd">
<article xmlns:mml="http://www.w3.org/1998/Math/MathML" xmlns:xlink="http://www.w3.org/1999/xlink" xmlns:ali="http://www.niso.org/schemas/ali/1.0/" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" article-type="research-article" dtd-version="1.3" xml:lang="EN">
<front>
<journal-meta>
<journal-id journal-id-type="publisher-id">Front. Anim. Sci.</journal-id>
<journal-title-group>
<journal-title>Frontiers in Animal Science</journal-title>
<abbrev-journal-title abbrev-type="pubmed">Front. Anim. Sci.</abbrev-journal-title>
</journal-title-group>
<issn pub-type="epub">2673-6225</issn>
<publisher>
<publisher-name>Frontiers Media S.A.</publisher-name>
</publisher>
</journal-meta>
<article-meta>
<article-id pub-id-type="doi">10.3389/fanim.2025.1640550</article-id>
<article-version article-version-type="Version of Record" vocab="NISO-RP-8-2008"/>
<article-categories>
<subj-group subj-group-type="heading">
<subject>Original Research</subject>
</subj-group>
</article-categories>
<title-group>
<article-title>Detecting frequent sequential patterns between weather and cattle behavior using data mining</article-title>
</title-group>
<contrib-group>
<contrib contrib-type="author" corresp="yes">
<name><surname>Trieu</surname><given-names>Ly Ly</given-names></name>
<xref ref-type="aff" rid="aff1"><sup>1</sup></xref>
<xref ref-type="corresp" rid="c001"><sup>*</sup></xref>
<uri xlink:href="https://loop.frontiersin.org/people/2991609/overview"/>
<role vocab="credit" vocab-identifier="https://credit.niso.org/" vocab-term="conceptualization" vocab-term-identifier="https://credit.niso.org/contributor-roles/conceptualization/">Conceptualization</role>
<role vocab="credit" vocab-identifier="https://credit.niso.org/" vocab-term="Data curation" vocab-term-identifier="https://credit.niso.org/contributor-roles/data-curation/">Data curation</role>
<role vocab="credit" vocab-identifier="https://credit.niso.org/" vocab-term="Formal analysis" vocab-term-identifier="https://credit.niso.org/contributor-roles/formal-analysis/">Formal analysis</role>
<role vocab="credit" vocab-identifier="https://credit.niso.org/" vocab-term="investigation" vocab-term-identifier="https://credit.niso.org/contributor-roles/investigation/">Investigation</role>
<role vocab="credit" vocab-identifier="https://credit.niso.org/" vocab-term="methodology" vocab-term-identifier="https://credit.niso.org/contributor-roles/methodology/">Methodology</role>
<role vocab="credit" vocab-identifier="https://credit.niso.org/" vocab-term="resources" vocab-term-identifier="https://credit.niso.org/contributor-roles/resources/">Resources</role>
<role vocab="credit" vocab-identifier="https://credit.niso.org/" vocab-term="validation" vocab-term-identifier="https://credit.niso.org/contributor-roles/validation/">Validation</role>
<role vocab="credit" vocab-identifier="https://credit.niso.org/" vocab-term="visualization" vocab-term-identifier="https://credit.niso.org/contributor-roles/visualization/">Visualization</role>
<role vocab="credit" vocab-identifier="https://credit.niso.org/" vocab-term="Writing &#x2013; original draft" vocab-term-identifier="https://credit.niso.org/contributor-roles/writing-original-draft/">Writing &#x2013; original draft</role>
<role vocab="credit" vocab-identifier="https://credit.niso.org/" vocab-term="Writing &#x2013; review &amp; editing" vocab-term-identifier="https://credit.niso.org/contributor-roles/writing-review-editing/">Writing &#x2013; review &amp; editing</role>
</contrib>
<contrib contrib-type="author" corresp="yes">
<name><surname>Bailey</surname><given-names>Derek W.</given-names></name>
<xref ref-type="aff" rid="aff2"><sup>2</sup></xref>
<xref ref-type="aff" rid="aff3"><sup>3</sup></xref>
<xref ref-type="corresp" rid="c001"><sup>*</sup></xref>
<role vocab="credit" vocab-identifier="https://credit.niso.org/" vocab-term="conceptualization" vocab-term-identifier="https://credit.niso.org/contributor-roles/conceptualization/">Conceptualization</role>
<role vocab="credit" vocab-identifier="https://credit.niso.org/" vocab-term="Data curation" vocab-term-identifier="https://credit.niso.org/contributor-roles/data-curation/">Data curation</role>
<role vocab="credit" vocab-identifier="https://credit.niso.org/" vocab-term="Funding acquisition" vocab-term-identifier="https://credit.niso.org/contributor-roles/funding-acquisition/">Funding acquisition</role>
<role vocab="credit" vocab-identifier="https://credit.niso.org/" vocab-term="investigation" vocab-term-identifier="https://credit.niso.org/contributor-roles/investigation/">Investigation</role>
<role vocab="credit" vocab-identifier="https://credit.niso.org/" vocab-term="methodology" vocab-term-identifier="https://credit.niso.org/contributor-roles/methodology/">Methodology</role>
<role vocab="credit" vocab-identifier="https://credit.niso.org/" vocab-term="Project-administration" vocab-term-identifier="https://credit.niso.org/contributor-roles/project-administration/">Project administration</role>
<role vocab="credit" vocab-identifier="https://credit.niso.org/" vocab-term="resources" vocab-term-identifier="https://credit.niso.org/contributor-roles/resources/">Resources</role>
<role vocab="credit" vocab-identifier="https://credit.niso.org/" vocab-term="supervision" vocab-term-identifier="https://credit.niso.org/contributor-roles/supervision/">Supervision</role>
<role vocab="credit" vocab-identifier="https://credit.niso.org/" vocab-term="validation" vocab-term-identifier="https://credit.niso.org/contributor-roles/validation/">Validation</role>
<role vocab="credit" vocab-identifier="https://credit.niso.org/" vocab-term="visualization" vocab-term-identifier="https://credit.niso.org/contributor-roles/visualization/">Visualization</role>
<role vocab="credit" vocab-identifier="https://credit.niso.org/" vocab-term="Writing &#x2013; original draft" vocab-term-identifier="https://credit.niso.org/contributor-roles/writing-original-draft/">Writing &#x2013; original draft</role>
<role vocab="credit" vocab-identifier="https://credit.niso.org/" vocab-term="Writing &#x2013; review &amp; editing" vocab-term-identifier="https://credit.niso.org/contributor-roles/writing-review-editing/">Writing &#x2013; review &amp; editing</role>
</contrib>
<contrib contrib-type="author">
<name><surname>Cao</surname><given-names>Huiping</given-names></name>
<xref ref-type="aff" rid="aff1"><sup>1</sup></xref>
<uri xlink:href="https://loop.frontiersin.org/people/1401675/overview"/>
<role vocab="credit" vocab-identifier="https://credit.niso.org/" vocab-term="conceptualization" vocab-term-identifier="https://credit.niso.org/contributor-roles/conceptualization/">Conceptualization</role>
<role vocab="credit" vocab-identifier="https://credit.niso.org/" vocab-term="Formal analysis" vocab-term-identifier="https://credit.niso.org/contributor-roles/formal-analysis/">Formal analysis</role>
<role vocab="credit" vocab-identifier="https://credit.niso.org/" vocab-term="investigation" vocab-term-identifier="https://credit.niso.org/contributor-roles/investigation/">Investigation</role>
<role vocab="credit" vocab-identifier="https://credit.niso.org/" vocab-term="methodology" vocab-term-identifier="https://credit.niso.org/contributor-roles/methodology/">Methodology</role>
<role vocab="credit" vocab-identifier="https://credit.niso.org/" vocab-term="resources" vocab-term-identifier="https://credit.niso.org/contributor-roles/resources/">Resources</role>
<role vocab="credit" vocab-identifier="https://credit.niso.org/" vocab-term="validation" vocab-term-identifier="https://credit.niso.org/contributor-roles/validation/">Validation</role>
<role vocab="credit" vocab-identifier="https://credit.niso.org/" vocab-term="visualization" vocab-term-identifier="https://credit.niso.org/contributor-roles/visualization/">Visualization</role>
<role vocab="credit" vocab-identifier="https://credit.niso.org/" vocab-term="Writing &#x2013; original draft" vocab-term-identifier="https://credit.niso.org/contributor-roles/writing-original-draft/">Writing &#x2013; original draft</role>
<role vocab="credit" vocab-identifier="https://credit.niso.org/" vocab-term="Writing &#x2013; review &amp; editing" vocab-term-identifier="https://credit.niso.org/contributor-roles/writing-review-editing/">Writing &#x2013; review &amp; editing</role>
</contrib>
<contrib contrib-type="author">
<name><surname>Cao Son</surname><given-names>Tran</given-names></name>
<xref ref-type="aff" rid="aff1"><sup>1</sup></xref>
<uri xlink:href="https://loop.frontiersin.org/people/3181960/overview"/>
<role vocab="credit" vocab-identifier="https://credit.niso.org/" vocab-term="conceptualization" vocab-term-identifier="https://credit.niso.org/contributor-roles/conceptualization/">Conceptualization</role>
<role vocab="credit" vocab-identifier="https://credit.niso.org/" vocab-term="Funding acquisition" vocab-term-identifier="https://credit.niso.org/contributor-roles/funding-acquisition/">Funding acquisition</role>
<role vocab="credit" vocab-identifier="https://credit.niso.org/" vocab-term="Project-administration" vocab-term-identifier="https://credit.niso.org/contributor-roles/project-administration/">Project administration</role>
<role vocab="credit" vocab-identifier="https://credit.niso.org/" vocab-term="supervision" vocab-term-identifier="https://credit.niso.org/contributor-roles/supervision/">Supervision</role>
<role vocab="credit" vocab-identifier="https://credit.niso.org/" vocab-term="Writing &#x2013; original draft" vocab-term-identifier="https://credit.niso.org/contributor-roles/writing-original-draft/">Writing &#x2013; original draft</role>
<role vocab="credit" vocab-identifier="https://credit.niso.org/" vocab-term="Writing &#x2013; review &amp; editing" vocab-term-identifier="https://credit.niso.org/contributor-roles/writing-review-editing/">Writing &#x2013; review &amp; editing</role>
</contrib>
<contrib contrib-type="author">
<name><surname>Tobin</surname><given-names>Colin T.</given-names></name>
<xref ref-type="aff" rid="aff4"><sup>4</sup></xref>
<uri xlink:href="https://loop.frontiersin.org/people/1192649/overview"/>
<role vocab="credit" vocab-identifier="https://credit.niso.org/" vocab-term="Data curation" vocab-term-identifier="https://credit.niso.org/contributor-roles/data-curation/">Data curation</role>
<role vocab="credit" vocab-identifier="https://credit.niso.org/" vocab-term="investigation" vocab-term-identifier="https://credit.niso.org/contributor-roles/investigation/">Investigation</role>
<role vocab="credit" vocab-identifier="https://credit.niso.org/" vocab-term="methodology" vocab-term-identifier="https://credit.niso.org/contributor-roles/methodology/">Methodology</role>
<role vocab="credit" vocab-identifier="https://credit.niso.org/" vocab-term="resources" vocab-term-identifier="https://credit.niso.org/contributor-roles/resources/">Resources</role>
<role vocab="credit" vocab-identifier="https://credit.niso.org/" vocab-term="Writing &#x2013; original draft" vocab-term-identifier="https://credit.niso.org/contributor-roles/writing-original-draft/">Writing &#x2013; original draft</role>
<role vocab="credit" vocab-identifier="https://credit.niso.org/" vocab-term="Writing &#x2013; review &amp; editing" vocab-term-identifier="https://credit.niso.org/contributor-roles/writing-review-editing/">Writing &#x2013; review &amp; editing</role>
</contrib>
<contrib contrib-type="author">
<name><surname>Oltjen</surname><given-names>Cory</given-names></name>
<xref ref-type="aff" rid="aff2"><sup>2</sup></xref>
<role vocab="credit" vocab-identifier="https://credit.niso.org/" vocab-term="Data curation" vocab-term-identifier="https://credit.niso.org/contributor-roles/data-curation/">Data curation</role>
<role vocab="credit" vocab-identifier="https://credit.niso.org/" vocab-term="investigation" vocab-term-identifier="https://credit.niso.org/contributor-roles/investigation/">Investigation</role>
<role vocab="credit" vocab-identifier="https://credit.niso.org/" vocab-term="resources" vocab-term-identifier="https://credit.niso.org/contributor-roles/resources/">Resources</role>
<role vocab="credit" vocab-identifier="https://credit.niso.org/" vocab-term="Writing &#x2013; original draft" vocab-term-identifier="https://credit.niso.org/contributor-roles/writing-original-draft/">Writing &#x2013; original draft</role>
</contrib>
</contrib-group>
<aff id="aff1"><label>1</label><institution>Department of Computer Science, New Mexico State University</institution>, <city>Las Cruces</city>, <state>NM</state>, <country country="us">United States</country></aff>
<aff id="aff2"><label>2</label><institution>Department of Animal and Range Sciences, New Mexico State University</institution>, <city>Las Cruces</city>, <state>NM</state>, <country country="us">United States</country></aff>
<aff id="aff3"><label>3</label><institution>Research and Outreach, Deep Well Ranch</institution>, <city>Prescott</city>, <state>AZ</state>, <country country="us">United States</country></aff>
<aff id="aff4"><label>4</label><institution>Carrington Research Extension Center, North Dakota State University</institution>, <city>Carrington</city>, <state>ND</state>, <country country="us">United States</country></aff>
<author-notes>
<corresp id="c001"><label>*</label>Correspondence: Ly Ly Trieu, <email xlink:href="mailto:lytrieu@nmsu.edu">lytrieu@nmsu.edu</email>; Derek W. Bailey, <email xlink:href="mailto:dwbailey@jamesfamilytrust.com">dwbailey@jamesfamilytrust.com</email></corresp>
</author-notes>
<pub-date publication-format="electronic" date-type="pub" iso-8601-date="2025-09-01">
<day>01</day>
<month>09</month>
<year>2025</year>
</pub-date>
<pub-date publication-format="electronic" date-type="collection">
<year>2025</year>
</pub-date>
<volume>6</volume>
<elocation-id>1640550</elocation-id>
<history>
<date date-type="received">
<day>03</day>
<month>06</month>
<year>2025</year>
</date>
<date date-type="accepted">
<day>15</day>
<month>08</month>
<year>2025</year>
</date>
</history>
<permissions>
<copyright-statement>Copyright &#xa9; 2025 Trieu, Bailey, Cao, Cao Son, Tobin and Oltjen.</copyright-statement>
<copyright-year>2025</copyright-year>
<copyright-holder>Trieu, Bailey, Cao, Cao Son, Tobin and Oltjen</copyright-holder>
<license>
<ali:license_ref start_date="2025-09-01">https://creativecommons.org/licenses/by/4.0/</ali:license_ref>
<license-p>This is an open-access article distributed under the terms of the <ext-link ext-link-type="uri" xlink:href="https://creativecommons.org/licenses/by/4.0/">Creative Commons Attribution License (CC BY)</ext-link>. The use, distribution or reproduction in other forums is permitted, provided the original author(s) and the copyright owner(s) are credited and that the original publication in this journal is cited, in accordance with accepted academic practice. No use, distribution or reproduction is permitted which does not comply with these terms.</license-p>
</license>
</permissions>
<abstract>
<p>Climate frequently influences the sustainability of livestock systems. As a result of climate change, heat stress may become a significant challenge for cattle producers. Heat stress occurs during hot weather conditions when animals are unable to maintain homeothermy, which can negatively affect production, reproduction, and animal well-being. In this study, thermal heat index was used to monitor thermal conditions facing cattle on rangelands. Three metrics&#x2014;movement rate, activity, and distance traveled from water&#x2014;obtained from GPS tracking were used to represent behavior changes in response to variation in thermal conditions. Each of these behavior metrics was categorized into four behavioral levels (high, medium, slight, and low) using a well-known k-means clustering algorithm. Additionally, daily thermal conditions were categorized into three weather levels (hot, medium, and cool) based on heat index values, also using the k-means clustering. The objective was to identify and detect the relationship between hot weather and cattle behavior, with the hypothesis that consecutive hot days have a clear negative effect on cattle behavior, particularly leading to a reduction in activity and movement. To investigate this, the unsupervised Co-occurrence Map Sequential Pattern Mining (CM-SPAM) algorithm in data mining was applied to analyse tracking data collected in the summers of 2019 and 2021 at Deep Well Ranch, Prescott, Arizona, USA. The CM-SPAM algorithm successfully identified that consecutive hot days (two, three and four days in a row) resulted in a consistent decrease in movement rate on the second, third and fourth days, respectively, suggesting a decrease in cattle activity during the morning and evening grazing bouts. The activity and distance to water metrics were not able to establish a connection between hot weather conditions and behavioral change. The CM-SPAM algorithm successfully identified impacts of consecutive days of hot weather on cattle rather than only daily evaluations. Our study demonstrates the potential to remotely detect changes in cattle behavior during potentially stressful thermal conditions. This type of analysis could enable early interventions to manage heat stress, preventing potential negative effects on the animals&#x2019; health and productivity.</p>
</abstract>
<kwd-group>
<kwd>heat stress</kwd>
<kwd>on-animal sensor</kwd>
<kwd>GPS tracking</kwd>
<kwd>sequential pattern mining</kwd>
<kwd>data mining</kwd>
</kwd-group>
<funding-group>
<funding-statement>The author(s) declare financial support was received for the research and/or publication of this article. This project was funded in part by the Harold James Family Trust.</funding-statement>
</funding-group>
<counts>
<fig-count count="15"/>
<table-count count="7"/>
<equation-count count="10"/>
<ref-count count="42"/>
<page-count count="22"/>
<word-count count="11771"/>
</counts>
<custom-meta-group>
<custom-meta>
<meta-name>section-in-acceptance</meta-name>
<meta-value>Precision Livestock Farming</meta-value>
</custom-meta>
</custom-meta-group>
</article-meta>
</front>
<body>
<sec id="s1" sec-type="intro">
<label>1</label>
<title>Introduction</title>
<p>Heat stress arises in hot weather conditions when animals struggle to maintain homeothermy. It is a serious threat to the animal well-being and sustainability of livestock systems because it negatively impacts health, production, reproduction, and nutrition (<xref ref-type="bibr" rid="B8">Becker et&#xa0;al., 2020</xref>; <xref ref-type="bibr" rid="B17">Gonzalez-Rivas et&#xa0;al., 2020</xref>). When cattle are under heat stress, their core body temperature increases, often leading to changes in behavior, such as increased water and decreased feed intake as well as reduced activity. In 2003, heat stress caused annual economic losses of $369 million for beef and $128 million for poultry in the US (<xref ref-type="bibr" rid="B36">St-Pierre et&#xa0;al., 2003</xref>). Heat stress continues to be problematic with global warming (<xref ref-type="bibr" rid="B9">Berman, 2019</xref>; <xref ref-type="bibr" rid="B27">Napolitano et&#xa0;al., 2023</xref>). Therefore, it is crucial to identify and understand the relation between heat stress and animal behavior to detect conditions when animals are susceptible and to implement management strategies to alleviate the negative impact of heat stress and ensure the health and productivity of livestock.</p>
<p>Observing cattle in extensive rangeland is difficult and labor-intensive (<xref ref-type="bibr" rid="B4">Bailey, 2016</xref>). However, recent advancements in technology, such as on-animal sensors like GPS tracking and accelerometers, as well as Internet of Things (IoT), have greatly improved the ability to monitor livestock (<xref ref-type="bibr" rid="B5">Bailey et&#xa0;al., 2018</xref>; <xref ref-type="bibr" rid="B31">Nyamuryekung&#x2019;e, 2024</xref>). Real-time livestock monitoring using on-animal sensors not only reduces the labor associated with traditional methods of livestock observation but also enables farmers and ranchers to respond more quickly when animals are affected by adverse weather conditions.</p>
<p>Machine learning is increasingly applied in agriculture to utilize data from sensors, which are able to enhance the management of animal health, behavior, nutrition, and productivity (<xref ref-type="bibr" rid="B24">Liakos et&#xa0;al., 2018</xref>; <xref ref-type="bibr" rid="B25">Mia et&#xa0;al., 2025</xref>; <xref ref-type="bibr" rid="B35">Shine and Murphy, 2021</xref>). In <xref ref-type="bibr" rid="B18">Gorczyca and Gebremedhin (2020)</xref>&#x2019;s study, four different supervised machine learning models, penalized linear regression, random forests, gradient boosted machines, and neural networks, were used to analyze how environmental heat stressors (air temperature, relative humidity, solar radiation, and wind speed) affect physiological responses (respiration rate, skin temperature, and vaginal temperature) in dairy cows. In <xref ref-type="bibr" rid="B7">Becker et&#xa0;al. (2021)</xref>&#x2019;s study, logistic regression, Gaussian na&#xef;ve Bayes, and random forest were used to predict cow heat stress levels&#x2014;scored from 1 (no stress) to 4 (moribund)&#x2014;based on different features (temperature-humidity index, respiration rate, lying time, lying bouts, total steps, drooling, open-mouth breathing, panting, location in shade or sprinklers, somatic cell score, reticulorumen temperature, hygiene body condition score, milk yield, and milk fat and protein percent), providing dairy producers valuable insights to identify heat stress early and minimize its harmful impacts like milk loss. While supervised learning depends on labeled datasets to guide the training process, unsupervised learning explores patterns within unlabeled datasets. Developing labeled datasets require observations or video to record livestock behavior. Obtaining visual observations is time consuming and expensive. On extensive rangelands, video is not a practical approach to record grazing animal behaviors. In the study by <xref ref-type="bibr" rid="B13">Branco et&#xa0;al. (2021)</xref>, the Generalized Sequential Pattern (GSP) algorithm in Weka was applied to detect sequential pattern mining for the behavioral sequences, revealing that the behavior sequence of &#x201c;Lying down&#x201d; followed by &#x201c;Lying laterally&#x201d; occurred under heat stress conditions, indicating a thermally stressful environment for the birds. In <xref ref-type="bibr" rid="B26">Mluba et&#xa0;al. (2024)</xref>&#x2019;s work, the Sequence-to-Pattern Generation (Seq2Pat) library, which offers a constraint-based sequential pattern mining algorithm, was used to mine sequential patterns from pig behavior data obtained through sequences of cropped images. These patterns help identify behavioral deviations that may indicate potential health or welfare issues, although heat stress conditions were not included in the analysis. In our work, we focus on detecting the relationship between cumulative heat load and cattle behavior using unsupervised learning. Each day&#x2019;s weather level is associated with the corresponding animal behavior and encoded in the sequences, enabling analysis of behavioral patterns across consecutive days, followed by a comparison between behavior observed in the detected pattern during heat stress and that on the nearest cool weather day.</p>
<p>This study aims to demonstrate a &#x201c;proof of concept study&#x201d; to evaluate the potential of identifying hot weather conditions that may adversely impact cattle behavior. The hypothesis is that consecutive hot days negatively impact cattle behavior, and cattle respond by decreasing their activity and movement. The cattle behavior was represented by using three GPS-derived metrics: movement rate, activity, and distance traveled from water. Each behavior metric was clustered into four categories (high, medium, slight, and low) using the well-known k-means clustering algorithm. Traditionally, a supervised classification (<xref ref-type="bibr" rid="B11">Bishop and Nasrabadi, 2006</xref>) is employed to classify behavior (class) from labeled data. The data consists of weather features, including variables such as air temperature and humidity. These can be used to differentiate between the various levels of behavior metric (low, slight, medium, and high). These methods typically focus on daily predictions, rather than tracking behavior across multiple continuous days. In contrast, our research leverages unsupervised methods (sequential pattern mining in particular) in data mining (<xref ref-type="bibr" rid="B20">Han et&#xa0;al., 2011</xref>) to uncover relationships related to hot weather and animal behavior. Unlike supervised methods, unsupervised algorithms identify patterns or structures in the data without any labeled data. In this work, the unsupervised Co-occurrence Map Sequential Pattern Mining (CM-SPAM) algorithm in data mining was applied to analyse GPS tracking data collected in the summers from two different years, 2019 and 2021, at Deep Well Ranch, Prescott, Arizona, USA. To monitor the thermal conditions experienced by cattle on rangelands, the thermal heat index was utilized in our work. Based on daily heat index values, the k-means clustering algorithm was employed to categorize weather conditions into three levels: hot, medium, and cool. While sequential pattern mining is widely used in applications such as analysing customer purchase or web page sequences (<xref ref-type="bibr" rid="B16">Fournier-Viger et&#xa0;al., 2017</xref>; <xref ref-type="bibr" rid="B37">Tan et&#xa0;al., 2016</xref>), its application is not well recognized in the agriculture field. We hypothesize that CM-SPAM can effectively detect changes in cattle behavior during consecutive hot days. Consecutive hot days may be more averse to cattle than a single hot day (<xref ref-type="bibr" rid="B6">Beatty et&#xa0;al., 2006</xref>; <xref ref-type="bibr" rid="B19">Hahn, 1999</xref>).</p>
</sec>
<sec id="s2" sec-type="materials|methods">
<label>2</label>
<title>Material and methods</title>
<sec id="s2_1">
<label>2.1</label>
<title>Study site and environment</title>
<p>The study was conducted in the North Pasture at Deep Well Ranch (DWR) located 16 km north of Prescott, Arizona, United States (112&#xb0; 29&#x2019; W, 34&#xb0; 41&#x2019; N). The pasture spans an area of 1096 ha of rolling terrain, with elevations ranging from 1471 to 1542 m. The study site is in the cold semi-arid (Bsk) K&#xf6;ppen climate zone. Average annual precipitation is around 450 mm, with more than 40% of it falling during the summer monsoon season, which typically occurs from July to September. Vegetation is primarily composed of perennial grasslands, dominated by species such as black grama (<italic>Bouteloua eripoda</italic> (Torr.) Torr.), dropseeds (<italic>Sporobolous</italic> spp.) and purple threeawn (<italic>Aristida purpurea</italic> Nutt). Two different studies were carried out during the summer in 2019 and 2021.</p>
</sec>
<sec id="s2_2">
<label>2.2</label>
<title>Animals and devices</title>
<p>The protocol for this study was approved by the New Mexico State University Institutional Animal Care and Use Committee (approval number 2019-021).</p>
<p>In Trial 1, a herd of 135 Corriente cow-calf pairs grazed the North Pasture. The cows ranged in age from 2 to 15 years. Throughout their lives, the herd had always grazed the North and adjacent pastures. Randomly selected cows were equipped with GPS tracking collars, using IgotU GT-120 and IgotU GT-600 receivers (<xref ref-type="bibr" rid="B23">Knight et&#xa0;al., 2018</xref>). A total of 35 GPS collars were placed on 35 randomly selected cows, with 6 recording at 2-minute intervals (IgotU GT-600) and 29 at 10-minute intervals (19 IgotU 120, and 10 IgotU 600). The difference in recording intervals (2 minutes vs. 10 minutes) was due to the battery capacities of the devices. In the North Pasture, the collars were placed on cows on June 4<sup>th</sup>, 2019, and removed on October 31<sup>st</sup>, 2019. This data was part of a study summarized by <xref ref-type="bibr" rid="B38">Tobin et&#xa0;al. (2021a)</xref>.</p>
<p>In Trial 2, a herd of 120 Corriente cows grazed the North Pasture. Collars (IgotU 120) were placed on 40 randomly selected cows, recording their locations at 10-minute intervals. The collars were attached on June 13<sup>th</sup>, 2021, and the study was conducted from July 8<sup>th</sup> to September 17<sup>th</sup>, 2021, while the cows grazed the North Pasture.</p>
</sec>
<sec id="s2_3">
<label>2.3</label>
<title>Experimental design</title>
<p>In Trial 1, 10-minute interval tracking data from 22 cows was recorded from June 5<sup>th</sup>, 2019 to September 17<sup>th</sup>, 2019. In Trial 2, only 7 cows were used due to missing data. The time frame for Trial 2 was in the summer, starting on July 8<sup>th</sup> and ending on September 17<sup>th</sup>, 2021.</p>
<p>The weather data for both trials were downloaded from Prescott Regional Airport (PRA), located in Prescott, Arizona, United States, which is located adjacent to DWR and 7.5 km from the study pasture (34&#xb0; 38&#x2019; 57.0114&#x201d; N, 112&#xb0; 25&#x2019; 19.9914&#x201d; W). The terrain (flat to gentle) slopes, elevations and vegetation at DWR next to the airport are similar to the study pasture. Weather data were recorded every 5 minutes and included air temperature and relative humidity.</p>
</sec>
</sec>
<sec id="s3">
<label>3</label>
<title>Data mining analysis</title>
<sec id="s3_1">
<label>3.1</label>
<title>Terminology</title>
<p>This section introduces the necessary terminology for describing the dataset used in data mining analysis and the concept of sequential pattern mining (<xref ref-type="bibr" rid="B37">Tan et&#xa0;al., 2016</xref>).</p>
<sec id="s3_1_1">
<label>3.1.1</label>
<title>Definition 1 (sequence)</title>
<p>A sequence in this study is in chronological order and combines the daily thermal heat index (described in Section 3.2.1) and behavior within <italic>n</italic> continuous days periods. More formally, the definition of sequence is as follows:</p>
<p><italic>Let I = {i</italic><sub>1</sub><italic>, i</italic><sub>2</sub><italic>,.,i<sub>l</sub></italic>} <italic>be a set of items (symbols). An itemset X is a set of items such that</italic><inline-formula>
<mml:math display="inline" id="im1"><mml:mrow><mml:mi>X</mml:mi><mml:mtext>&#x2009;</mml:mtext><mml:mo>&#x2286;</mml:mo><mml:mtext>&#x2009;</mml:mtext><mml:mi>I</mml:mi></mml:mrow></mml:math></inline-formula><italic>. A sequence is an ordered list of itemsets s</italic> = &lt;<italic>I</italic><sub>1</sub>,<italic>I</italic><sub>2</sub>,.,<italic>I<sub>n</sub></italic>&gt; <italic>such that</italic><inline-formula>
<mml:math display="inline" id="im2"><mml:mrow><mml:msub><mml:mi>I</mml:mi><mml:mi>k</mml:mi></mml:msub><mml:mo>&#x2286;</mml:mo><mml:mi>I</mml:mi></mml:mrow></mml:math></inline-formula><italic>where</italic> 1 &#x2264; <italic>k</italic> &#x2264; <italic>n</italic>.</p>
<p>In our study, examples of items are Julian date (<italic>jdate</italic>_156), heat index (<italic>cool_heatIndex</italic>) and movement rate (<italic>low_avg_rate</italic>), represented low behavior rate. An example of itemsets is {<italic>jdate</italic>_156,<italic>cool_heatIndex</italic>, <italic>low_avg_rate</italic>}. An example of a sequence is shown in <xref ref-type="table" rid="T1"><bold>Table&#xa0;1</bold></xref>. Each sequence represents six consecutive days (<italic>n</italic> = 6), consisting of six ordered itemsets, where each itemset includes the heat index level and the movement rate level, which represent the behavior for a day.</p>
<table-wrap id="T1" position="float">
<label>Table&#xa0;1</label>
<caption>
<p>Sample of sequences for cow ID 105 in Trial 1 during period <inline-formula>
<mml:math display="inline" id="im3"><mml:mrow><mml:msub><mml:mi>P</mml:mi><mml:mn>1</mml:mn></mml:msub></mml:mrow></mml:math></inline-formula>.</p>
</caption>
<table frame="hsides">
<thead>
<tr>
<th valign="middle" align="left">Sequence identifier (SID)</th>
<th valign="middle" align="left">Julian day</th>
<th valign="middle" align="left">Heat index</th>
<th valign="middle" align="left">Average rate</th>
<th valign="middle" align="left">Sequences</th>
</tr>
</thead>
<tbody>
<tr>
<td valign="middle" rowspan="6" align="left">1</td>
<td valign="middle" align="left">189</td>
<td valign="middle" align="left">Cool</td>
<td valign="middle" align="left">High</td>
<td valign="middle" rowspan="6" align="left">&#x2329;{ <inline-formula>
<mml:math display="inline" id="im4"><mml:mrow><mml:mi>j</mml:mi><mml:mi>d</mml:mi><mml:mi>a</mml:mi><mml:mi>t</mml:mi><mml:mi>e</mml:mi><mml:mo>_</mml:mo><mml:mn>189</mml:mn><mml:mo>,</mml:mo><mml:mo>&#xa0;</mml:mo><mml:mi>c</mml:mi><mml:mi>o</mml:mi><mml:mi>o</mml:mi><mml:mi>l</mml:mi><mml:mo>_</mml:mo><mml:mi>h</mml:mi><mml:mi>e</mml:mi><mml:mi>a</mml:mi><mml:mi>t</mml:mi><mml:mi>I</mml:mi><mml:mi>n</mml:mi><mml:mi>d</mml:mi><mml:mi>e</mml:mi><mml:mi>x</mml:mi><mml:mo>,</mml:mo><mml:mo>&#xa0;</mml:mo><mml:mi>h</mml:mi><mml:mi>i</mml:mi><mml:mi>g</mml:mi><mml:mi>h</mml:mi><mml:mo>_</mml:mo><mml:mi>a</mml:mi><mml:mi>v</mml:mi><mml:mi>g</mml:mi><mml:mo>_</mml:mo><mml:mi>r</mml:mi><mml:mi>a</mml:mi><mml:mi>t</mml:mi><mml:mi>e</mml:mi></mml:mrow></mml:math></inline-formula>},<break/>{ <inline-formula>
<mml:math display="inline" id="im5"><mml:mrow><mml:mi>j</mml:mi><mml:mi>d</mml:mi><mml:mi>a</mml:mi><mml:mi>t</mml:mi><mml:mi>e</mml:mi><mml:mo>_</mml:mo><mml:mn>190</mml:mn><mml:mo>,</mml:mo><mml:mo>&#xa0;</mml:mo><mml:mi>m</mml:mi><mml:mi>e</mml:mi><mml:mi>d</mml:mi><mml:mi>i</mml:mi><mml:mi>u</mml:mi><mml:mi>m</mml:mi><mml:mo>_</mml:mo><mml:mi>h</mml:mi><mml:mi>e</mml:mi><mml:mi>a</mml:mi><mml:mi>t</mml:mi><mml:mi>I</mml:mi><mml:mi>n</mml:mi><mml:mi>d</mml:mi><mml:mi>e</mml:mi><mml:mi>x</mml:mi><mml:mo>,</mml:mo><mml:mo>&#xa0;</mml:mo><mml:mi>l</mml:mi><mml:mi>o</mml:mi><mml:mi>w</mml:mi><mml:mo>_</mml:mo><mml:mi>a</mml:mi><mml:mi>v</mml:mi><mml:mi>g</mml:mi><mml:mo>_</mml:mo><mml:mi>r</mml:mi><mml:mi>a</mml:mi><mml:mi>t</mml:mi><mml:mi>e</mml:mi></mml:mrow></mml:math></inline-formula>},<break/>{ <inline-formula>
<mml:math display="inline" id="im6"><mml:mrow><mml:mi>j</mml:mi><mml:mi>d</mml:mi><mml:mi>a</mml:mi><mml:mi>t</mml:mi><mml:mi>e</mml:mi><mml:mo>_</mml:mo><mml:mn>191</mml:mn><mml:mo>,</mml:mo><mml:mo>&#xa0;</mml:mo><mml:mi>h</mml:mi><mml:mi>i</mml:mi><mml:mi>g</mml:mi><mml:mi>h</mml:mi><mml:mo>_</mml:mo><mml:mi>h</mml:mi><mml:mi>e</mml:mi><mml:mi>a</mml:mi><mml:mi>t</mml:mi><mml:mi>I</mml:mi><mml:mi>n</mml:mi><mml:mi>d</mml:mi><mml:mi>e</mml:mi><mml:mi>x</mml:mi><mml:mo>,</mml:mo><mml:mo>&#xa0;</mml:mo><mml:mi>l</mml:mi><mml:mi>o</mml:mi><mml:mi>w</mml:mi><mml:mo>_</mml:mo><mml:mi>a</mml:mi><mml:mi>v</mml:mi><mml:mi>g</mml:mi><mml:mo>_</mml:mo><mml:mi>r</mml:mi><mml:mi>a</mml:mi><mml:mi>t</mml:mi><mml:mi>e</mml:mi></mml:mrow></mml:math></inline-formula>},<break/>{ <inline-formula>
<mml:math display="inline" id="im7"><mml:mrow><mml:mi>j</mml:mi><mml:mi>d</mml:mi><mml:mi>a</mml:mi><mml:mi>t</mml:mi><mml:mi>e</mml:mi><mml:mo>_</mml:mo><mml:mn>192</mml:mn><mml:mo>,</mml:mo><mml:mo>&#xa0;</mml:mo><mml:mi>h</mml:mi><mml:mi>i</mml:mi><mml:mi>g</mml:mi><mml:mi>h</mml:mi><mml:mo>_</mml:mo><mml:mi>h</mml:mi><mml:mi>e</mml:mi><mml:mi>a</mml:mi><mml:mi>t</mml:mi><mml:mi>I</mml:mi><mml:mi>n</mml:mi><mml:mi>d</mml:mi><mml:mi>e</mml:mi><mml:mi>x</mml:mi><mml:mo>,</mml:mo><mml:mo>&#xa0;</mml:mo><mml:mi>l</mml:mi><mml:mi>o</mml:mi><mml:mi>w</mml:mi><mml:mo>_</mml:mo><mml:mi>a</mml:mi><mml:mi>v</mml:mi><mml:mi>g</mml:mi><mml:mo>_</mml:mo><mml:mi>r</mml:mi><mml:mi>a</mml:mi><mml:mi>t</mml:mi><mml:mi>e</mml:mi></mml:mrow></mml:math></inline-formula>},<break/>{ <inline-formula>
<mml:math display="inline" id="im8"><mml:mrow><mml:mi>j</mml:mi><mml:mi>d</mml:mi><mml:mi>a</mml:mi><mml:mi>t</mml:mi><mml:mi>e</mml:mi><mml:mo>_</mml:mo><mml:mn>193</mml:mn><mml:mo>,</mml:mo><mml:mo>&#xa0;</mml:mo><mml:mi>h</mml:mi><mml:mi>i</mml:mi><mml:mi>g</mml:mi><mml:mi>h</mml:mi><mml:mo>_</mml:mo><mml:mi>h</mml:mi><mml:mi>e</mml:mi><mml:mi>a</mml:mi><mml:mi>t</mml:mi><mml:mi>I</mml:mi><mml:mi>n</mml:mi><mml:mi>d</mml:mi><mml:mi>e</mml:mi><mml:mi>x</mml:mi><mml:mo>,</mml:mo><mml:mo>&#xa0;</mml:mo><mml:mi>m</mml:mi><mml:mi>e</mml:mi><mml:mi>d</mml:mi><mml:mi>i</mml:mi><mml:mi>u</mml:mi><mml:mi>m</mml:mi><mml:mo>_</mml:mo><mml:mi>a</mml:mi><mml:mi>v</mml:mi><mml:mi>g</mml:mi><mml:mo>_</mml:mo><mml:mi>r</mml:mi><mml:mi>a</mml:mi><mml:mi>t</mml:mi><mml:mi>e</mml:mi></mml:mrow></mml:math></inline-formula>},<break/>{ <inline-formula>
<mml:math display="inline" id="im9"><mml:mrow><mml:mi>j</mml:mi><mml:mi>d</mml:mi><mml:mi>a</mml:mi><mml:mi>t</mml:mi><mml:mi>e</mml:mi><mml:mo>_</mml:mo><mml:mn>194</mml:mn><mml:mo>,</mml:mo><mml:mo>&#xa0;</mml:mo><mml:mi>h</mml:mi><mml:mi>i</mml:mi><mml:mi>g</mml:mi><mml:mi>h</mml:mi><mml:mo>_</mml:mo><mml:mi>h</mml:mi><mml:mi>e</mml:mi><mml:mi>a</mml:mi><mml:mi>t</mml:mi><mml:mi>I</mml:mi><mml:mi>n</mml:mi><mml:mi>d</mml:mi><mml:mi>e</mml:mi><mml:mi>x</mml:mi><mml:mo>,</mml:mo><mml:mo>&#xa0;</mml:mo><mml:mi>l</mml:mi><mml:mi>o</mml:mi><mml:mi>w</mml:mi><mml:mo>_</mml:mo><mml:mi>a</mml:mi><mml:mi>v</mml:mi><mml:mi>g</mml:mi><mml:mo>_</mml:mo><mml:mi>r</mml:mi><mml:mi>a</mml:mi><mml:mi>t</mml:mi><mml:mi>e</mml:mi></mml:mrow></mml:math></inline-formula>}&#x232a;</td>
</tr>
<tr>
<td valign="middle" align="left">190</td>
<td valign="middle" align="left">Medium</td>
<td valign="middle" align="left">Low</td>
</tr>
<tr>
<td valign="middle" align="left">191</td>
<td valign="middle" align="left">High</td>
<td valign="middle" align="left">Low</td>
</tr>
<tr>
<td valign="middle" align="left">192</td>
<td valign="middle" align="left">High</td>
<td valign="middle" align="left">Low</td>
</tr>
<tr>
<td valign="middle" align="left">193</td>
<td valign="middle" align="left">High</td>
<td valign="middle" align="left">Medium</td>
</tr>
<tr>
<td valign="middle" align="left">194</td>
<td valign="middle" align="left">High</td>
<td valign="middle" align="left">Low</td>
</tr>
<tr>
<td valign="middle" rowspan="6" align="left">2</td>
<td valign="middle" align="left">204</td>
<td valign="middle" align="left">Medium</td>
<td valign="middle" align="left">Slight</td>
<td valign="middle" rowspan="6" align="left">&#x2329;{ <inline-formula>
<mml:math display="inline" id="im10"><mml:mrow><mml:mi>j</mml:mi><mml:mi>d</mml:mi><mml:mi>a</mml:mi><mml:mi>t</mml:mi><mml:mi>e</mml:mi><mml:mo>_</mml:mo><mml:mn>204</mml:mn><mml:mo>,</mml:mo><mml:mo>&#xa0;</mml:mo><mml:mi>m</mml:mi><mml:mi>e</mml:mi><mml:mi>d</mml:mi><mml:mi>i</mml:mi><mml:mi>u</mml:mi><mml:mi>m</mml:mi><mml:mo>_</mml:mo><mml:mi>h</mml:mi><mml:mi>e</mml:mi><mml:mi>a</mml:mi><mml:mi>t</mml:mi><mml:mi>I</mml:mi><mml:mi>n</mml:mi><mml:mi>d</mml:mi><mml:mi>e</mml:mi><mml:mi>x</mml:mi><mml:mo>,</mml:mo><mml:mo>&#xa0;</mml:mo><mml:mi>s</mml:mi><mml:mi>l</mml:mi><mml:mi>i</mml:mi><mml:mi>g</mml:mi><mml:mi>h</mml:mi><mml:mi>t</mml:mi><mml:mo>_</mml:mo><mml:mi>a</mml:mi><mml:mi>v</mml:mi><mml:mi>g</mml:mi><mml:mo>_</mml:mo><mml:mi>r</mml:mi><mml:mi>a</mml:mi><mml:mi>t</mml:mi><mml:mi>e</mml:mi></mml:mrow></mml:math></inline-formula>},<break/>{ <inline-formula>
<mml:math display="inline" id="im11"><mml:mrow><mml:mi>j</mml:mi><mml:mi>d</mml:mi><mml:mi>a</mml:mi><mml:mi>t</mml:mi><mml:mi>e</mml:mi><mml:mo>_</mml:mo><mml:mn>205</mml:mn><mml:mo>,</mml:mo><mml:mo>&#xa0;</mml:mo><mml:mi>m</mml:mi><mml:mi>e</mml:mi><mml:mi>d</mml:mi><mml:mi>i</mml:mi><mml:mi>u</mml:mi><mml:mi>m</mml:mi><mml:mo>_</mml:mo><mml:mi>h</mml:mi><mml:mi>e</mml:mi><mml:mi>a</mml:mi><mml:mi>t</mml:mi><mml:mi>I</mml:mi><mml:mi>n</mml:mi><mml:mi>d</mml:mi><mml:mi>e</mml:mi><mml:mi>x</mml:mi><mml:mo>,</mml:mo><mml:mo>&#xa0;</mml:mo><mml:mi>s</mml:mi><mml:mi>l</mml:mi><mml:mi>i</mml:mi><mml:mi>g</mml:mi><mml:mi>h</mml:mi><mml:mi>t</mml:mi><mml:mo>_</mml:mo><mml:mi>a</mml:mi><mml:mi>v</mml:mi><mml:mi>g</mml:mi><mml:mo>_</mml:mo><mml:mi>r</mml:mi><mml:mi>a</mml:mi><mml:mi>t</mml:mi><mml:mi>e</mml:mi></mml:mrow></mml:math></inline-formula>},<break/>{ <inline-formula>
<mml:math display="inline" id="im12"><mml:mrow><mml:mi>j</mml:mi><mml:mi>d</mml:mi><mml:mi>a</mml:mi><mml:mi>t</mml:mi><mml:mi>e</mml:mi><mml:mo>_</mml:mo><mml:mn>206</mml:mn><mml:mo>,</mml:mo><mml:mo>&#xa0;</mml:mo><mml:mi>h</mml:mi><mml:mi>i</mml:mi><mml:mi>g</mml:mi><mml:mi>h</mml:mi><mml:mo>_</mml:mo><mml:mi>h</mml:mi><mml:mi>e</mml:mi><mml:mi>a</mml:mi><mml:mi>t</mml:mi><mml:mi>I</mml:mi><mml:mi>n</mml:mi><mml:mi>d</mml:mi><mml:mi>e</mml:mi><mml:mi>x</mml:mi><mml:mo>,</mml:mo><mml:mo>&#xa0;</mml:mo><mml:mi>s</mml:mi><mml:mi>l</mml:mi><mml:mi>i</mml:mi><mml:mi>g</mml:mi><mml:mi>h</mml:mi><mml:mi>t</mml:mi><mml:mo>_</mml:mo><mml:mi>a</mml:mi><mml:mi>v</mml:mi><mml:mi>g</mml:mi><mml:mo>_</mml:mo><mml:mi>r</mml:mi><mml:mi>a</mml:mi><mml:mi>t</mml:mi><mml:mi>e</mml:mi></mml:mrow></mml:math></inline-formula>},<break/>{ <inline-formula>
<mml:math display="inline" id="im13"><mml:mrow><mml:mi>j</mml:mi><mml:mi>d</mml:mi><mml:mi>a</mml:mi><mml:mi>t</mml:mi><mml:mi>e</mml:mi><mml:mo>_</mml:mo><mml:mn>207</mml:mn><mml:mo>,</mml:mo><mml:mo>&#xa0;</mml:mo><mml:mi>h</mml:mi><mml:mi>i</mml:mi><mml:mi>g</mml:mi><mml:mi>h</mml:mi><mml:mo>_</mml:mo><mml:mi>h</mml:mi><mml:mi>e</mml:mi><mml:mi>a</mml:mi><mml:mi>t</mml:mi><mml:mi>I</mml:mi><mml:mi>n</mml:mi><mml:mi>d</mml:mi><mml:mi>e</mml:mi><mml:mi>x</mml:mi><mml:mo>,</mml:mo><mml:mo>&#xa0;</mml:mo><mml:mi>s</mml:mi><mml:mi>l</mml:mi><mml:mi>i</mml:mi><mml:mi>g</mml:mi><mml:mi>h</mml:mi><mml:mi>t</mml:mi><mml:mo>_</mml:mo><mml:mi>a</mml:mi><mml:mi>v</mml:mi><mml:mi>g</mml:mi><mml:mo>_</mml:mo><mml:mi>r</mml:mi><mml:mi>a</mml:mi><mml:mi>t</mml:mi><mml:mi>e</mml:mi></mml:mrow></mml:math></inline-formula>},<break/>{ <inline-formula>
<mml:math display="inline" id="im14"><mml:mrow><mml:mi>j</mml:mi><mml:mi>d</mml:mi><mml:mi>a</mml:mi><mml:mi>t</mml:mi><mml:mi>e</mml:mi><mml:mo>_</mml:mo><mml:mn>208</mml:mn><mml:mo>,</mml:mo><mml:mo>&#xa0;</mml:mo><mml:mi>h</mml:mi><mml:mi>i</mml:mi><mml:mi>g</mml:mi><mml:mi>h</mml:mi><mml:mo>_</mml:mo><mml:mi>h</mml:mi><mml:mi>e</mml:mi><mml:mi>a</mml:mi><mml:mi>t</mml:mi><mml:mi>I</mml:mi><mml:mi>n</mml:mi><mml:mi>d</mml:mi><mml:mi>e</mml:mi><mml:mi>x</mml:mi><mml:mo>,</mml:mo><mml:mo>&#xa0;</mml:mo><mml:mi>s</mml:mi><mml:mi>l</mml:mi><mml:mi>i</mml:mi><mml:mi>g</mml:mi><mml:mi>h</mml:mi><mml:mi>t</mml:mi><mml:mo>_</mml:mo><mml:mi>a</mml:mi><mml:mi>v</mml:mi><mml:mi>g</mml:mi><mml:mo>_</mml:mo><mml:mi>r</mml:mi><mml:mi>a</mml:mi><mml:mi>t</mml:mi><mml:mi>e</mml:mi></mml:mrow></mml:math></inline-formula>},<break/>{ <inline-formula>
<mml:math display="inline" id="im15"><mml:mrow><mml:mi>j</mml:mi><mml:mi>d</mml:mi><mml:mi>a</mml:mi><mml:mi>t</mml:mi><mml:mi>e</mml:mi><mml:mo>_</mml:mo><mml:mn>209</mml:mn><mml:mo>,</mml:mo><mml:mo>&#xa0;</mml:mo><mml:mi>h</mml:mi><mml:mi>i</mml:mi><mml:mi>g</mml:mi><mml:mi>h</mml:mi><mml:mo>_</mml:mo><mml:mi>h</mml:mi><mml:mi>e</mml:mi><mml:mi>a</mml:mi><mml:mi>t</mml:mi><mml:mi>I</mml:mi><mml:mi>n</mml:mi><mml:mi>d</mml:mi><mml:mi>e</mml:mi><mml:mi>x</mml:mi><mml:mo>,</mml:mo><mml:mo>&#xa0;</mml:mo><mml:mi>l</mml:mi><mml:mi>o</mml:mi><mml:mi>w</mml:mi><mml:mo>_</mml:mo><mml:mi>a</mml:mi><mml:mi>v</mml:mi><mml:mi>g</mml:mi><mml:mo>_</mml:mo><mml:mi>r</mml:mi><mml:mi>a</mml:mi><mml:mi>t</mml:mi><mml:mi>e</mml:mi></mml:mrow></mml:math></inline-formula>}&#x232a;</td>
</tr>
<tr>
<td valign="middle" align="left">205</td>
<td valign="middle" align="left">Medium</td>
<td valign="middle" align="left">Slight</td>
</tr>
<tr>
<td valign="middle" align="left">206</td>
<td valign="middle" align="left">High</td>
<td valign="middle" align="left">Slight</td>
</tr>
<tr>
<td valign="middle" align="left">207</td>
<td valign="middle" align="left">High</td>
<td valign="middle" align="left">Slight</td>
</tr>
<tr>
<td valign="middle" align="left">208</td>
<td valign="middle" align="left">High</td>
<td valign="middle" align="left">Slight</td>
</tr>
<tr>
<td valign="middle" align="left">209</td>
<td valign="middle" align="left">High</td>
<td valign="middle" align="left">Low</td>
</tr>
<tr>
<td valign="middle" rowspan="6" align="left">3</td>
<td valign="middle" align="left">235</td>
<td valign="middle" align="left">Medium</td>
<td valign="middle" align="left">Low</td>
<td valign="middle" rowspan="6" align="left">&#x2329;{ <inline-formula>
<mml:math display="inline" id="im16"><mml:mrow><mml:mi>j</mml:mi><mml:mi>d</mml:mi><mml:mi>a</mml:mi><mml:mi>t</mml:mi><mml:mi>e</mml:mi><mml:mo>_</mml:mo><mml:mn>235</mml:mn><mml:mo>,</mml:mo><mml:mo>&#xa0;</mml:mo><mml:mi>m</mml:mi><mml:mi>e</mml:mi><mml:mi>d</mml:mi><mml:mi>i</mml:mi><mml:mi>u</mml:mi><mml:mi>m</mml:mi><mml:mo>_</mml:mo><mml:mi>h</mml:mi><mml:mi>e</mml:mi><mml:mi>a</mml:mi><mml:mi>t</mml:mi><mml:mi>I</mml:mi><mml:mi>n</mml:mi><mml:mi>d</mml:mi><mml:mi>e</mml:mi><mml:mi>x</mml:mi><mml:mo>,</mml:mo><mml:mo>&#xa0;</mml:mo><mml:mi>l</mml:mi><mml:mi>o</mml:mi><mml:mi>w</mml:mi><mml:mo>_</mml:mo><mml:mi>a</mml:mi><mml:mi>v</mml:mi><mml:mi>g</mml:mi><mml:mo>_</mml:mo><mml:mi>r</mml:mi><mml:mi>a</mml:mi><mml:mi>t</mml:mi><mml:mi>e</mml:mi></mml:mrow></mml:math></inline-formula>},<break/>{ <inline-formula>
<mml:math display="inline" id="im17"><mml:mrow><mml:mi>j</mml:mi><mml:mi>d</mml:mi><mml:mi>a</mml:mi><mml:mi>t</mml:mi><mml:mi>e</mml:mi><mml:mo>_</mml:mo><mml:mn>236</mml:mn><mml:mo>,</mml:mo><mml:mo>&#xa0;</mml:mo><mml:mi>h</mml:mi><mml:mi>i</mml:mi><mml:mi>g</mml:mi><mml:mi>h</mml:mi><mml:mo>_</mml:mo><mml:mi>h</mml:mi><mml:mi>e</mml:mi><mml:mi>a</mml:mi><mml:mi>t</mml:mi><mml:mi>I</mml:mi><mml:mi>n</mml:mi><mml:mi>d</mml:mi><mml:mi>e</mml:mi><mml:mi>x</mml:mi><mml:mo>,</mml:mo><mml:mo>&#xa0;</mml:mo><mml:mi>l</mml:mi><mml:mi>o</mml:mi><mml:mi>w</mml:mi><mml:mo>_</mml:mo><mml:mi>a</mml:mi><mml:mi>v</mml:mi><mml:mi>g</mml:mi><mml:mo>_</mml:mo><mml:mi>r</mml:mi><mml:mi>a</mml:mi><mml:mi>t</mml:mi><mml:mi>e</mml:mi></mml:mrow></mml:math></inline-formula>},<break/>{ <inline-formula>
<mml:math display="inline" id="im18"><mml:mrow><mml:mi>j</mml:mi><mml:mi>d</mml:mi><mml:mi>a</mml:mi><mml:mi>t</mml:mi><mml:mi>e</mml:mi><mml:mo>_</mml:mo><mml:mn>237</mml:mn><mml:mo>,</mml:mo><mml:mo>&#xa0;</mml:mo><mml:mi>h</mml:mi><mml:mi>i</mml:mi><mml:mi>g</mml:mi><mml:mi>h</mml:mi><mml:mo>_</mml:mo><mml:mi>h</mml:mi><mml:mi>e</mml:mi><mml:mi>a</mml:mi><mml:mi>t</mml:mi><mml:mi>I</mml:mi><mml:mi>n</mml:mi><mml:mi>d</mml:mi><mml:mi>e</mml:mi><mml:mi>x</mml:mi><mml:mo>,</mml:mo><mml:mo>&#xa0;</mml:mo><mml:mi>s</mml:mi><mml:mi>l</mml:mi><mml:mi>i</mml:mi><mml:mi>g</mml:mi><mml:mi>h</mml:mi><mml:mi>t</mml:mi><mml:mo>_</mml:mo><mml:mi>a</mml:mi><mml:mi>v</mml:mi><mml:mi>g</mml:mi><mml:mo>_</mml:mo><mml:mi>r</mml:mi><mml:mi>a</mml:mi><mml:mi>t</mml:mi><mml:mi>e</mml:mi></mml:mrow></mml:math></inline-formula>},<break/>{ <inline-formula>
<mml:math display="inline" id="im19"><mml:mrow><mml:mi>j</mml:mi><mml:mi>d</mml:mi><mml:mi>a</mml:mi><mml:mi>t</mml:mi><mml:mi>e</mml:mi><mml:mo>_</mml:mo><mml:mn>238</mml:mn><mml:mo>,</mml:mo><mml:mo>&#xa0;</mml:mo><mml:mi>h</mml:mi><mml:mi>i</mml:mi><mml:mi>g</mml:mi><mml:mi>h</mml:mi><mml:mo>_</mml:mo><mml:mi>h</mml:mi><mml:mi>e</mml:mi><mml:mi>a</mml:mi><mml:mi>t</mml:mi><mml:mi>I</mml:mi><mml:mi>n</mml:mi><mml:mi>d</mml:mi><mml:mi>e</mml:mi><mml:mi>x</mml:mi><mml:mo>,</mml:mo><mml:mo>&#xa0;</mml:mo><mml:mi>m</mml:mi><mml:mi>e</mml:mi><mml:mi>d</mml:mi><mml:mi>i</mml:mi><mml:mi>u</mml:mi><mml:mi>m</mml:mi><mml:mo>_</mml:mo><mml:mi>a</mml:mi><mml:mi>v</mml:mi><mml:mi>g</mml:mi><mml:mo>_</mml:mo><mml:mi>r</mml:mi><mml:mi>a</mml:mi><mml:mi>t</mml:mi><mml:mi>e</mml:mi></mml:mrow></mml:math></inline-formula>},<break/>{ <inline-formula>
<mml:math display="inline" id="im20"><mml:mrow><mml:mi>j</mml:mi><mml:mi>d</mml:mi><mml:mi>a</mml:mi><mml:mi>t</mml:mi><mml:mi>e</mml:mi><mml:mo>_</mml:mo><mml:mn>239</mml:mn><mml:mo>,</mml:mo><mml:mo>&#xa0;</mml:mo><mml:mi>h</mml:mi><mml:mi>i</mml:mi><mml:mi>g</mml:mi><mml:mi>h</mml:mi><mml:mo>_</mml:mo><mml:mi>h</mml:mi><mml:mi>e</mml:mi><mml:mi>a</mml:mi><mml:mi>t</mml:mi><mml:mi>I</mml:mi><mml:mi>n</mml:mi><mml:mi>d</mml:mi><mml:mi>e</mml:mi><mml:mi>x</mml:mi><mml:mo>,</mml:mo><mml:mo>&#xa0;</mml:mo><mml:mi>l</mml:mi><mml:mi>o</mml:mi><mml:mi>w</mml:mi><mml:mo>_</mml:mo><mml:mi>a</mml:mi><mml:mi>v</mml:mi><mml:mi>g</mml:mi><mml:mo>_</mml:mo><mml:mi>r</mml:mi><mml:mi>a</mml:mi><mml:mi>t</mml:mi><mml:mi>e</mml:mi></mml:mrow></mml:math></inline-formula>},<break/>{ <inline-formula>
<mml:math display="inline" id="im21"><mml:mrow><mml:mi>j</mml:mi><mml:mi>d</mml:mi><mml:mi>a</mml:mi><mml:mi>t</mml:mi><mml:mi>e</mml:mi><mml:mo>_</mml:mo><mml:mn>240</mml:mn><mml:mo>,</mml:mo><mml:mo>&#xa0;</mml:mo><mml:mi>h</mml:mi><mml:mi>i</mml:mi><mml:mi>g</mml:mi><mml:mi>h</mml:mi><mml:mo>_</mml:mo><mml:mi>h</mml:mi><mml:mi>e</mml:mi><mml:mi>a</mml:mi><mml:mi>t</mml:mi><mml:mi>I</mml:mi><mml:mi>n</mml:mi><mml:mi>d</mml:mi><mml:mi>e</mml:mi><mml:mi>x</mml:mi><mml:mo>,</mml:mo><mml:mo>&#xa0;</mml:mo><mml:mi>l</mml:mi><mml:mi>o</mml:mi><mml:mi>w</mml:mi><mml:mo>_</mml:mo><mml:mi>a</mml:mi><mml:mi>v</mml:mi><mml:mi>g</mml:mi><mml:mo>_</mml:mo><mml:mi>r</mml:mi><mml:mi>a</mml:mi><mml:mi>t</mml:mi><mml:mi>e</mml:mi></mml:mrow></mml:math></inline-formula>}&#x232a;</td>
</tr>
<tr>
<td valign="middle" align="left">236</td>
<td valign="middle" align="left">High</td>
<td valign="middle" align="left">Low</td>
</tr>
<tr>
<td valign="middle" align="left">237</td>
<td valign="middle" align="left">High</td>
<td valign="middle" align="left">Slight</td>
</tr>
<tr>
<td valign="middle" align="left">238</td>
<td valign="middle" align="left">High</td>
<td valign="middle" align="left">Medium</td>
</tr>
<tr>
<td valign="middle" align="left">239</td>
<td valign="middle" align="left">High</td>
<td valign="middle" align="left">Low</td>
</tr>
<tr>
<td valign="middle" align="left">240</td>
<td valign="middle" align="left">High</td>
<td valign="middle" align="left">Low</td>
</tr>
</tbody>
</table>
</table-wrap>
</sec>
<sec id="s3_1_2">
<label>3.1.2</label>
<title>Definition 2 (horizontal sequence database)</title>
<p>The sequence database in this study is a collection of all information about daily heat index and behavior during the experiment. More formally, the definition of database is as follows:</p>
<p><italic>A sequence database SDB is a list of sequences SDB</italic> = &lt;<italic>s</italic><sub>1</sub>,<italic>s</italic><sub>2</sub>,.,<italic>s<sub>p</sub></italic>&gt; <italic>having sequence identifiers (SIDs) 1,2,&#x2026;,p.</italic></p>
<p><xref ref-type="table" rid="T1"><bold>Table&#xa0;1</bold></xref> presents a portion of the sequence database <italic>SDB</italic>, containing three sequences for cow ID 105 in Trial 1 of our experiment. In this work, we use <inline-formula>
<mml:math display="inline" id="im22"><mml:mrow><mml:mi>s</mml:mi><mml:mo>&#x2208;</mml:mo><mml:mi>S</mml:mi><mml:mi>D</mml:mi><mml:mi>B</mml:mi></mml:mrow></mml:math></inline-formula> to denote that s belongs to SDB.</p>
</sec>
<sec id="s3_1_3">
<label>3.1.3</label>
<title>Definition 3 (subsequence)</title>
<p>A subsequence is a smaller part of a sequence. More formally, the definition of a subsequence is defined as follows:</p>
<p><italic>A sequence s<sub>a</sub></italic> = &lt;<italic>A</italic><sub>1</sub>, <italic>A</italic><sub>2</sub>, &#x2026; ,<italic>A<sub>n</sub></italic>&gt; <italic>is said to be contained in a sequence s<sub>b</sub></italic> = &lt;<italic>B</italic><sub>1</sub>, <italic>B</italic><sub>2</sub>, &#x2026; ,<italic>B<sub>m</sub></italic>&gt; <italic>if and only if there exist integers</italic> 1 &#x2264; <italic>j</italic><sub>1</sub> &lt; <italic>j</italic><sub>2</sub> &lt; &#xb7;&#xb7;&#xb7; &lt; <italic>j<sub>n</sub></italic> &#x2264; <italic>m such that</italic><inline-formula>
<mml:math display="inline" id="im23"><mml:mrow><mml:msub><mml:mi>A</mml:mi><mml:mn>1</mml:mn></mml:msub><mml:mo>&#x2286;</mml:mo><mml:msub><mml:mi>B</mml:mi><mml:mrow><mml:msub><mml:mi>j</mml:mi><mml:mn>1</mml:mn></mml:msub></mml:mrow></mml:msub></mml:mrow></mml:math></inline-formula>, <inline-formula>
<mml:math display="inline" id="im24"><mml:mrow><mml:msub><mml:mi>A</mml:mi><mml:mn>2</mml:mn></mml:msub><mml:mo>&#x2286;</mml:mo><mml:msub><mml:mi>B</mml:mi><mml:mrow><mml:msub><mml:mi>j</mml:mi><mml:mn>2</mml:mn></mml:msub></mml:mrow></mml:msub><mml:mo>,</mml:mo><mml:mtext>...</mml:mtext><mml:mo>,</mml:mo><mml:msub><mml:mi>A</mml:mi><mml:mi>n</mml:mi></mml:msub><mml:mo>&#x2286;</mml:mo><mml:msub><mml:mi>B</mml:mi><mml:mrow><mml:msub><mml:mi>j</mml:mi><mml:mi>n</mml:mi></mml:msub></mml:mrow></mml:msub></mml:mrow></mml:math></inline-formula><italic>(denoted as</italic><inline-formula>
<mml:math display="inline" id="im25"><mml:mrow><mml:msub><mml:mi>s</mml:mi><mml:mi>a</mml:mi></mml:msub><mml:mo>&#x2291;</mml:mo><mml:msub><mml:mi>s</mml:mi><mml:mi>b</mml:mi></mml:msub></mml:mrow></mml:math></inline-formula>).</p>
<p>For example, sequence <italic>s<sub>a</sub></italic> = &lt;{<italic>high_heatIndex</italic>},{<italic>low_avg_rate</italic>}&gt; is a subsequence of <italic>s<sub>b</sub></italic> = &lt;{<italic>high_heatIndex</italic>},{<italic>high_heatIndex</italic>},{<italic>high_heatIndex</italic>, <italic>low_avg_rate</italic>}&gt; because the first item in <italic>s<sub>a</sub></italic> is shown in <italic>s<sub>b</sub></italic>, the second itemset in <italic>s<sub>a</sub></italic> is subset of the third itemset of <italic>s<sub>b</sub></italic>.</p>
</sec>
<sec id="s3_1_4">
<label>3.14</label>
<title>Definition 4 (support)</title>
<p>The <italic>support</italic> of a sequence refers to the frequency or occurrence of a particular sequence within a database. It is a measure that helps to identify how commonly a sequence appears across all sequences in the database. More formally, the definition of support follows:</p>
<p><italic>The support of a sequence s<sub>a</sub> in a sequence database SDB is defined as the number of sequences</italic><inline-formula>
<mml:math display="inline" id="im26"><mml:mrow><mml:mi>s</mml:mi><mml:mo>&#x2208;</mml:mo><mml:mo>&#xa0;</mml:mo><mml:mi>S</mml:mi><mml:mi>D</mml:mi><mml:mi>B</mml:mi></mml:mrow></mml:math></inline-formula><italic>such that</italic><inline-formula>
<mml:math display="inline" id="im27"><mml:mrow><mml:msub><mml:mi>s</mml:mi><mml:mi>a</mml:mi></mml:msub><mml:mo>&#x2291;</mml:mo><mml:mi>s</mml:mi></mml:mrow></mml:math></inline-formula><italic>and is denoted by</italic><inline-formula>
<mml:math display="inline" id="im28"><mml:mrow><mml:mi>s</mml:mi><mml:mi>u</mml:mi><mml:msub><mml:mi>p</mml:mi><mml:mrow><mml:mi>S</mml:mi><mml:mi>D</mml:mi><mml:mi>B</mml:mi></mml:mrow></mml:msub><mml:mrow><mml:mo stretchy="false">(</mml:mo><mml:mrow><mml:msub><mml:mi>s</mml:mi><mml:mi>a</mml:mi></mml:msub></mml:mrow><mml:mo stretchy="false">)</mml:mo></mml:mrow></mml:mrow></mml:math></inline-formula>.</p>
<p>In other word, <inline-formula>
<mml:math display="inline" id="im29"><mml:mrow><mml:mi>s</mml:mi><mml:mi>u</mml:mi><mml:msub><mml:mi>p</mml:mi><mml:mrow><mml:mi>S</mml:mi><mml:mi>D</mml:mi><mml:mi>B</mml:mi></mml:mrow></mml:msub><mml:mrow><mml:mo stretchy="false">(</mml:mo><mml:mrow><mml:msub><mml:mi>s</mml:mi><mml:mi>a</mml:mi></mml:msub></mml:mrow><mml:mo stretchy="false">)</mml:mo></mml:mrow><mml:mo>=</mml:mo><mml:mrow><mml:mo>|</mml:mo><mml:mrow><mml:mo>{</mml:mo><mml:mi>s</mml:mi><mml:mo>|</mml:mo><mml:msub><mml:mi>s</mml:mi><mml:mi>a</mml:mi></mml:msub><mml:mo>&#x2291;</mml:mo><mml:mi>s</mml:mi><mml:mo>&#x2227;</mml:mo><mml:mi>s</mml:mi><mml:mo>&#x2208;</mml:mo><mml:mi>S</mml:mi><mml:mi>D</mml:mi><mml:mi>B</mml:mi><mml:mo>}</mml:mo></mml:mrow><mml:mo>|</mml:mo></mml:mrow></mml:mrow></mml:math></inline-formula>.</p>
<p>For example, consider the sequence <italic>s<sub>a</sub></italic> as follows:</p>
<disp-formula>
<mml:math display="block" id="M1"><mml:mrow><mml:msub><mml:mi>s</mml:mi><mml:mi>a</mml:mi></mml:msub><mml:mo>=</mml:mo><mml:mrow><mml:mo>&#x2329;</mml:mo><mml:mrow><mml:mrow><mml:mo>{</mml:mo><mml:mrow><mml:mi>h</mml:mi><mml:mi>i</mml:mi><mml:mi>g</mml:mi><mml:mi>h</mml:mi><mml:mo>_</mml:mo><mml:mi>h</mml:mi><mml:mi>e</mml:mi><mml:mi>a</mml:mi><mml:mi>t</mml:mi><mml:mi>I</mml:mi><mml:mi>n</mml:mi><mml:mi>d</mml:mi><mml:mi>e</mml:mi><mml:mi>x</mml:mi></mml:mrow><mml:mo>}</mml:mo></mml:mrow><mml:mo>,</mml:mo><mml:mo>&#xa0;</mml:mo><mml:mrow><mml:mo>{</mml:mo><mml:mrow><mml:mi>h</mml:mi><mml:mi>i</mml:mi><mml:mi>g</mml:mi><mml:mi>h</mml:mi><mml:mo>_</mml:mo><mml:mi>h</mml:mi><mml:mi>e</mml:mi><mml:mi>a</mml:mi><mml:mi>t</mml:mi><mml:mi>I</mml:mi><mml:mi>n</mml:mi><mml:mi>d</mml:mi><mml:mi>e</mml:mi><mml:mi>x</mml:mi></mml:mrow><mml:mo>}</mml:mo></mml:mrow><mml:mo>,</mml:mo><mml:mo>&#xa0;</mml:mo><mml:mrow><mml:mo>{</mml:mo><mml:mrow><mml:mi>h</mml:mi><mml:mi>i</mml:mi><mml:mi>g</mml:mi><mml:mi>h</mml:mi><mml:mo>_</mml:mo><mml:mi>h</mml:mi><mml:mi>e</mml:mi><mml:mi>a</mml:mi><mml:mi>t</mml:mi><mml:mi>I</mml:mi><mml:mi>n</mml:mi><mml:mi>d</mml:mi><mml:mi>e</mml:mi><mml:mi>x</mml:mi><mml:mo>,</mml:mo><mml:mi>l</mml:mi><mml:mi>o</mml:mi><mml:mi>w</mml:mi><mml:mo>_</mml:mo><mml:mi>a</mml:mi><mml:mi>v</mml:mi><mml:mi>g</mml:mi><mml:mo>_</mml:mo><mml:mi>r</mml:mi><mml:mi>a</mml:mi><mml:mi>t</mml:mi><mml:mi>e</mml:mi></mml:mrow><mml:mo>}</mml:mo></mml:mrow></mml:mrow><mml:mo>&#x232a;</mml:mo></mml:mrow></mml:mrow></mml:math>
</disp-formula>
<p>Sequence <italic>s<sub>a</sub></italic> is the subsequence of sequences <italic>SID</italic> = 1, <italic>SID</italic> = 2 and <italic>SID</italic> = 3 in <xref ref-type="table" rid="T1"><bold>Table&#xa0;1</bold></xref>; thus, <inline-formula>
<mml:math display="inline" id="im30"><mml:mrow><mml:mi>s</mml:mi><mml:mi>u</mml:mi><mml:msub><mml:mi>p</mml:mi><mml:mrow><mml:mi>S</mml:mi><mml:mi>D</mml:mi><mml:mi>B</mml:mi></mml:mrow></mml:msub><mml:mrow><mml:mo stretchy="false">(</mml:mo><mml:mrow><mml:msub><mml:mi>s</mml:mi><mml:mi>a</mml:mi></mml:msub></mml:mrow><mml:mo stretchy="false">)</mml:mo></mml:mrow><mml:mo>=</mml:mo><mml:mn>3</mml:mn></mml:mrow></mml:math></inline-formula>.</p>
</sec>
<sec id="s3_1_5">
<label>3.1.5</label>
<title>Definition 5 (frequent sequential pattern discovery)</title>
<p>To ensure that only the most frequent sequences are considered, a minimum support threshold, <italic>minsup</italic>, is used to define them. A <italic>frequent sequential pattern</italic> is a sequence such that its support is greater than or equal to <italic>minsup</italic>. In other words, the goal is to identify the frequent subsequences that occur across many different sequences in the database. More formally, the definition of frequent sequential pattern is as follows:</p>
<p><italic>Let minsup be a threshold provided by the user and SDB be a sequence database. A sequence s is a frequent sequential pattern if</italic><inline-formula>
<mml:math display="inline" id="im31"><mml:mrow><mml:mi>s</mml:mi><mml:mi>u</mml:mi><mml:msub><mml:mi>p</mml:mi><mml:mrow><mml:mi>S</mml:mi><mml:mi>D</mml:mi><mml:mi>B</mml:mi></mml:mrow></mml:msub><mml:mrow><mml:mo stretchy="false">(</mml:mo><mml:mi>s</mml:mi><mml:mo stretchy="false">)</mml:mo></mml:mrow><mml:mo>&#x2265;</mml:mo><mml:mi>m</mml:mi><mml:mi>i</mml:mi><mml:mi>n</mml:mi><mml:mi>s</mml:mi><mml:mi>u</mml:mi><mml:mi>p</mml:mi></mml:mrow></mml:math></inline-formula>.</p>
</sec>
</sec>
<sec id="s3_2">
<label>3.2</label>
<title>Data preprocessing</title>
<sec id="s3_2_1">
<label>3.2.1</label>
<title>Weather data</title>
<p>The raw weather 5-minute data containing air temperature and relative humidity were averaged hourly. Hourly Heat Index (<italic>HI</italic>) was computed using the following equations from the United States National Weather Service (<ext-link ext-link-type="uri" xlink:href="https://www.wpc.ncep.noaa.gov/html/heatindex_equation.shtml">https://www.wpc.ncep.noaa.gov/html/heatindex_equation.shtml</ext-link>), where T represents the hourly average air temperature in degrees Fahrenheit and RH represents the hourly average relative humidity:</p>
<disp-formula id="eq1"><label>(1)</label>
<mml:math display="block" id="M2"><mml:mrow><mml:mn>0.5</mml:mn><mml:mo>&#xa0;</mml:mo><mml:mo>*</mml:mo><mml:mo>&#xa0;</mml:mo><mml:mrow><mml:mo>{</mml:mo><mml:mrow><mml:mi>T</mml:mi><mml:mo>&#xa0;</mml:mo><mml:mo>+</mml:mo><mml:mo>&#xa0;</mml:mo><mml:mn>61.0</mml:mn><mml:mo>&#xa0;</mml:mo><mml:mo>+</mml:mo><mml:mo>&#xa0;</mml:mo><mml:mrow><mml:mo stretchy="false">[</mml:mo><mml:mrow><mml:mrow><mml:mo stretchy="false">(</mml:mo><mml:mrow><mml:mi>T</mml:mi><mml:mo>&#x2212;</mml:mo><mml:mn>68.0</mml:mn></mml:mrow><mml:mo stretchy="false">)</mml:mo></mml:mrow><mml:mo>*</mml:mo><mml:mn>1.2</mml:mn></mml:mrow><mml:mo stretchy="false">]</mml:mo></mml:mrow><mml:mo>&#xa0;</mml:mo><mml:mo>+</mml:mo><mml:mo>&#xa0;</mml:mo><mml:mrow><mml:mo stretchy="false">(</mml:mo><mml:mrow><mml:mi>R</mml:mi><mml:mi>H</mml:mi><mml:mo>*</mml:mo><mml:mn>0.094</mml:mn></mml:mrow><mml:mo stretchy="false">)</mml:mo></mml:mrow></mml:mrow><mml:mo>}</mml:mo></mml:mrow></mml:mrow></mml:math>
</disp-formula>
<p>Then, the <italic>HI</italic> is equal to the average of the result from <xref ref-type="disp-formula" rid="eq1">Equation 1</xref> and air temperature. If <italic>HI</italic> exceeded 80 F, the following equation is applied.</p>
<p>If <italic>HI</italic> &gt; 80, the regression equation of Rothfusz in 1990 is used, as shown below:</p>
<disp-formula id="eq2"><label>(2)</label>
<mml:math display="block" id="M3"><mml:mrow><mml:mi>H</mml:mi><mml:mi>I</mml:mi><mml:mo>=</mml:mo><mml:mo>&#xa0;</mml:mo><mml:mo>&#x2212;</mml:mo><mml:mn>42.379</mml:mn><mml:mo>&#xa0;</mml:mo><mml:mo>+</mml:mo><mml:mo>&#xa0;</mml:mo><mml:mn>2.04901523</mml:mn><mml:mo>*</mml:mo><mml:mi>T</mml:mi><mml:mo>&#xa0;</mml:mo><mml:mo>+</mml:mo><mml:mo>&#xa0;</mml:mo><mml:mn>10.14333127</mml:mn><mml:mo>*</mml:mo><mml:mi>R</mml:mi><mml:mi>H</mml:mi><mml:mo>&#xa0;</mml:mo><mml:mo>&#x2212;</mml:mo><mml:mo>&#xa0;</mml:mo><mml:mn>0.22475541</mml:mn><mml:mo>*</mml:mo><mml:mi>T</mml:mi><mml:mo>*</mml:mo><mml:mi>R</mml:mi><mml:mi>H</mml:mi><mml:mo>&#xa0;</mml:mo><mml:mo>&#x2212;</mml:mo><mml:mo>&#xa0;</mml:mo><mml:mn>0.00683783</mml:mn><mml:mo>*</mml:mo><mml:msup><mml:mi>T</mml:mi><mml:mn>2</mml:mn></mml:msup><mml:mo>&#xa0;</mml:mo><mml:mo>&#x2212;</mml:mo><mml:mo>&#xa0;</mml:mo><mml:mn>0.05481717</mml:mn><mml:mo>*</mml:mo><mml:mi>R</mml:mi><mml:msup><mml:mi>H</mml:mi><mml:mn>2</mml:mn></mml:msup><mml:mo>+</mml:mo><mml:mo>&#xa0;</mml:mo><mml:mn>0.00122874</mml:mn><mml:mo>*</mml:mo><mml:msup><mml:mi>T</mml:mi><mml:mn>2</mml:mn></mml:msup><mml:mo>*</mml:mo><mml:mi>R</mml:mi><mml:mi>H</mml:mi><mml:mo>&#xa0;</mml:mo><mml:mo>+</mml:mo><mml:mo>&#xa0;</mml:mo><mml:mn>0.00085282</mml:mn><mml:mo>*</mml:mo><mml:mi>T</mml:mi><mml:mo>*</mml:mo><mml:mi>R</mml:mi><mml:msup><mml:mi>H</mml:mi><mml:mn>2</mml:mn></mml:msup><mml:mo>&#xa0;</mml:mo><mml:mo>&#x2212;</mml:mo><mml:mo>&#xa0;</mml:mo><mml:mn>0.00000199</mml:mn><mml:mo>*</mml:mo><mml:msup><mml:mi>T</mml:mi><mml:mn>2</mml:mn></mml:msup><mml:mo>*</mml:mo><mml:mi>R</mml:mi><mml:msup><mml:mi>H</mml:mi><mml:mn>2</mml:mn></mml:msup></mml:mrow></mml:math>
</disp-formula>
<p>If <inline-formula>
<mml:math display="inline" id="im32"><mml:mrow><mml:mi>R</mml:mi><mml:mi>H</mml:mi><mml:mo>&lt;</mml:mo><mml:mn>13</mml:mn><mml:mo>%</mml:mo><mml:mo>&#xa0;</mml:mo><mml:mi>a</mml:mi><mml:mi>n</mml:mi><mml:mi>d</mml:mi><mml:mo>&#xa0;</mml:mo><mml:mo stretchy="false">(</mml:mo><mml:mi>T</mml:mi><mml:mo>&#xa0;</mml:mo><mml:mo>&gt;</mml:mo><mml:mo>&#xa0;</mml:mo><mml:mn>80</mml:mn><mml:mo>&#xa0;</mml:mo><mml:mi>a</mml:mi><mml:mi>n</mml:mi><mml:mi>d</mml:mi><mml:mo>&#xa0;</mml:mo><mml:mi>T</mml:mi><mml:mo>&#xa0;</mml:mo><mml:mo>&lt;</mml:mo><mml:mo>&#xa0;</mml:mo><mml:mn>112</mml:mn><mml:mo stretchy="false">)</mml:mo></mml:mrow></mml:math></inline-formula>, then the following is subtracted from <xref ref-type="disp-formula" rid="eq2">Equation 2</xref>:</p>
<disp-formula>
<mml:math display="block" id="M4"><mml:mrow><mml:mfrac><mml:mrow><mml:mn>13</mml:mn><mml:mo>&#x2212;</mml:mo><mml:mi>R</mml:mi><mml:mi>H</mml:mi></mml:mrow><mml:mn>4</mml:mn></mml:mfrac><mml:mo>&#xd7;</mml:mo><mml:msqrt><mml:mrow><mml:mfrac><mml:mrow><mml:mn>17</mml:mn><mml:mo>&#x2212;</mml:mo><mml:mi>A</mml:mi><mml:mi>B</mml:mi><mml:mi>S</mml:mi><mml:mrow><mml:mo stretchy="false">(</mml:mo><mml:mrow><mml:mi>T</mml:mi><mml:mo>&#x2212;</mml:mo><mml:mn>95</mml:mn></mml:mrow><mml:mo stretchy="false">)</mml:mo></mml:mrow></mml:mrow><mml:mrow><mml:mn>17</mml:mn></mml:mrow></mml:mfrac></mml:mrow></mml:msqrt></mml:mrow></mml:math>
</disp-formula>
<p>If <inline-formula>
<mml:math display="inline" id="im33"><mml:mrow><mml:mi>R</mml:mi><mml:mi>H</mml:mi><mml:mo>&#xa0;</mml:mo><mml:mo>&gt;</mml:mo><mml:mo>&#xa0;</mml:mo><mml:mn>85</mml:mn><mml:mo>%</mml:mo><mml:mo>&#xa0;</mml:mo><mml:mi>a</mml:mi><mml:mi>n</mml:mi><mml:mi>d</mml:mi><mml:mo>&#xa0;</mml:mo><mml:mo stretchy="false">(</mml:mo><mml:mi>T</mml:mi><mml:mo>&#xa0;</mml:mo><mml:mo>&gt;</mml:mo><mml:mo>&#xa0;</mml:mo><mml:mn>80</mml:mn><mml:mo>&#xa0;</mml:mo><mml:mi>a</mml:mi><mml:mi>n</mml:mi><mml:mi>d</mml:mi><mml:mo>&#xa0;</mml:mo><mml:mi>T</mml:mi><mml:mo>&#xa0;</mml:mo><mml:mo>&lt;</mml:mo><mml:mo>&#xa0;</mml:mo><mml:mn>87</mml:mn><mml:mo stretchy="false">)</mml:mo></mml:mrow></mml:math></inline-formula>, then the following is added to <xref ref-type="disp-formula" rid="eq2">Equation 2</xref>:</p>
<disp-formula>
<mml:math display="block" id="M5"><mml:mrow><mml:mfrac><mml:mrow><mml:mi>R</mml:mi><mml:mi>H</mml:mi><mml:mo>&#x2212;</mml:mo><mml:mn>85</mml:mn></mml:mrow><mml:mrow><mml:mn>10</mml:mn></mml:mrow></mml:mfrac><mml:mo>&#xd7;</mml:mo><mml:mfrac><mml:mrow><mml:mn>87</mml:mn><mml:mo>&#x2212;</mml:mo><mml:mi>T</mml:mi></mml:mrow><mml:mn>5</mml:mn></mml:mfrac></mml:mrow></mml:math>
</disp-formula>
<p>The <italic>HI</italic> was then converted to Celsius for this paper. The equation to convert from Fahrenheit (&#xb0;<italic>F</italic>) to Celsius (&#xb0;<italic>C</italic>) is as follows:</p>
<disp-formula>
<mml:math display="block" id="M6"><mml:mrow><mml:mtext>&#xb0;C</mml:mtext><mml:mo>=</mml:mo><mml:mrow><mml:mo stretchy="false">(</mml:mo><mml:mrow><mml:mtext>&#xb0;F</mml:mtext><mml:mo>&#x2212;</mml:mo><mml:mn>32</mml:mn></mml:mrow><mml:mo stretchy="false">)</mml:mo></mml:mrow><mml:mo>&#xd7;</mml:mo><mml:mfrac><mml:mi>5</mml:mi><mml:mn>9</mml:mn></mml:mfrac></mml:mrow></mml:math>
</disp-formula>
</sec>
<sec id="s3_2_2">
<label>3.2.2</label>
<title>Behavior data and periods</title>
<p>We utilized three different metrics to define animal behavior, movement rate, activity and distance travelled from water. These metrics were calculated from the tracking data. Rate was calculated by dividing the spatial distance between successive positions by the temporal interval between the successive positions. Rate measures were then averaged hourly. Distance to water was the Euclidean distance between a position and the pasture&#x2019;s only water source using the extract feature of ArcMap (<ext-link ext-link-type="uri" xlink:href="https://www.esri.com/en-us/arcgis/products/arcgis-desktop/resources">https://www.esri.com/en-us/arcgis/products/arcgis-desktop/resources</ext-link>). Distances were averaged hourly. Activity was calculated using rate and criteria described by <xref ref-type="bibr" rid="B2">Augustine and Derner (2013)</xref> and <xref ref-type="bibr" rid="B33">Nyamuryekung&#x2019;e et&#xa0;al. (2020)</xref>. Cattle activity can have value 0 and 1. Cattle were considered inactive when rate was less than 2.34 m/min for each position. A value of 0 was assigned for activity when rate was less than 2.34 m/min, and a value of 1 for activity when rate was greater than 2.34 m/min. If there were less than 3 positions recorded during an hour (poor GPS performance), the hourly average activity was not calculated and not used. If there were 3 or more positions per hour, activities were averaged each hour.</p>
<p>Using all the rate and activity data in Trial 1, we selected two periods to define typical grazing and grazing periods (<xref ref-type="fig" rid="f1"><bold>Figure&#xa0;1</bold></xref>). Period <italic>P</italic><sub>1</sub> is from 5:00 AM to 8:00 AM and 5:00 PM to 8:00 PM, which focuses on the two major grazing bouts of cattle on rangeland (<xref ref-type="bibr" rid="B22">Kilgour et&#xa0;al., 2012</xref>). Period <italic>P</italic><sub>2</sub> is from 5:00 AM to 8:00 PM, which cover all activities during the day, when activity and movement are usually higher compared to night.</p>
<fig id="f1" position="float">
<label>Figure 1</label>
<caption>
<p>The average movement rate and the percentage of activity by hour for all animals during Trial 1, showing two common peaks in the morning and evening grazing bouts.</p>
</caption>
<graphic mimetype="image" mime-subtype="tiff" xlink:href="fanim-06-1640550-g001.tif">
<alt-text content-type="machine-generated">Line graph showing the average rate and activity percentage over 24 hours. The blue line represents the average rate in meters per minute, and the green line denotes activity percentage. Peaks occur in the morning and evening grazing bouts.</alt-text>
</graphic>
</fig>
<p>These variables were selected because they may be useful for monitoring common behaviors cattle show during periods of heat stress (reduced feed intake, increased water intake and decreased activity) (<xref ref-type="bibr" rid="B1">Alves et&#xa0;al., 2020</xref>). Changes in movement rate during the primary grazing bouts may reflect changes in forage intake. Decreased distance travelled from water may reflect increased visits to water and more time spent near water, which may occur in response to increased water intake. Our activity measure should reflect changes in cattle activity.</p>
</sec>
<sec id="s3_2_3">
<label>3.2.3</label>
<title>Database for sequence pattern mining</title>
<p>Hourly averages of movement rate, activity, and distance travelled from water were averaged within each period (<italic>P</italic><sub>1</sub> and <italic>P</italic><sub>2</sub>) for the data mining analysis. The other hourly averages were not used in data mining. For each day, the <italic>HI</italic> and behavior metrics were categorized into three (cool, medium and high) and four levels (low, slight, medium, and high), respectively, using k-means clustering method outlined in Section 3.3.1. Experimental data were then segmented into six-day intervals, with a sliding window of one day. For example, <xref ref-type="fig" rid="f2"><bold>Figure&#xa0;2</bold></xref> illustrates two segments in which the first segment contains data from Julian dates 156 (June 5<sup>th</sup>, 2019) to 161 (June 10<sup>th</sup>, 2019) and the second segment contains data from Julian dates 157 (June 6<sup>th</sup>, 2019) to 162 (June 11<sup>th</sup>, 2019). For the purpose of applying algorithm, Julian dates are used instead of dates in the day, month and year format. When using movement rate (representing cattle behavior) and <italic>HI</italic>, the set of items (Definition 1) is <italic>I = {jdate_156, jdate_157,&#x2026;, jdate_259, jdate_260, cool_heatIndex, medium_heatIndex, high_heatIndex, low_avg_rate, slight_avg_rate, medium_avg_rate, high_avg_rate}</italic>. An itemset consisting of three items: a Julian date encoded as <italic>jdate_index</italic>, where <inline-formula>
<mml:math display="inline" id="im34"><mml:mrow><mml:mi>i</mml:mi><mml:mi>n</mml:mi><mml:mi>d</mml:mi><mml:mi>e</mml:mi><mml:mi>x</mml:mi><mml:mo>&#x2208;</mml:mo><mml:mrow><mml:mo>{</mml:mo><mml:mrow><mml:mn>156</mml:mn><mml:mo>,</mml:mo><mml:mn>157</mml:mn><mml:mo>,</mml:mo><mml:mo>&#x2026;</mml:mo><mml:mo>,</mml:mo><mml:mn>260</mml:mn></mml:mrow><mml:mo>}</mml:mo></mml:mrow></mml:mrow></mml:math></inline-formula>; the <italic>HI</italic> level encoded as <italic>low_heatIndex</italic>, <italic>medium_heatIndex</italic>, and <italic>high_heatIndex</italic>; and the movement rate level encoded as <italic>low_avg_rate</italic>, <italic>slight_avg_rate</italic>, <italic>medium_avg_rate</italic>, and <italic>high_avg_rate</italic>. Formally, based on Definition 1, the sequence formed from weather and movement rate data is an ordered list of information spanning six continuous days (<italic>n</italic> = 6). Each day&#x2019;s information is represented as an itemset. The sequence database, which treats movement rate as behavior, includes all sequences with movement rate levels. In the same way, the sequence databases using activity and distance travelled from water as behavior metric are constructed using activity levels and distance travelled from water levels, respectively.</p>
<fig id="f2" position="float">
<label>Figure 2</label>
<caption>
<p>Segmentation of data into six-day intervals with a sliding window one day. The first and second segments contain weather and behavior data from Julian dates from 156 to 161 and 157 to 162, respectively.</p>
</caption>
<graphic mimetype="image" mime-subtype="tiff" xlink:href="fanim-06-1640550-g002.tif">
<alt-text content-type="machine-generated">Timeline showing Julian dates. The first segment, marked in blue, covers dates 156 to 157. The second segment, marked in orange, covers dates 157 to 158.</alt-text>
</graphic>
</fig>
</sec>
</sec>
<sec id="s3_3">
<label>3.3</label>
<title>Data mining approach</title>
<p>Given the availability of both weather and GPS datasets, the weather data was first processed using the method described in Section 3.2.1 to compute the HI. The GPS data was then used to calculate three behavioral metrics: movement rate, activity level, and distance traveled from water&#x2014;each representing cattle behavior in Section 3.2.2.</p>
<p>In this section, the clustering method described in Section 3.3.1 is applied separately to the HI dataset and to each of the three behavioral datasets. As a result, for each individual cattle and each day, an HI level and a corresponding behavioral level are assigned. This process generates separate databases for each behavioral metric, which are then used for sequence pattern mining, described in Section 3.2.3.</p>
<p>Subsequently, the CM-SPAM algorithm from the SPMF data mining library in Section 3.3.2 is applied to each cattle&#x2019;s behavioral database to extract frequent sequential patterns, revealing relationships between heat stress and reductions in behavior.</p>
<p>Finally, Section 3.3.3 details the analysis of detected continuous patterns by comparing behavior during hot weather with behavior observed during the preceding cool weather day.</p>
<sec id="s3_3_1">
<label>3.3.1</label>
<title>Clustering for weather data and behavior data</title>
<p>To categorize the weather for each day, we applied K-means clustering method (<xref ref-type="bibr" rid="B37">Tan et&#xa0;al., 2016</xref>). This is an unsupervised learning technique that partitions the data into k groups based on their distance from centroids. Given <italic>k</italic>, the process is described as follows:</p>
<list list-type="bullet">
<list-item>
<p>Step 1: Randomly select <italic>k</italic> centroids and partition the data points into <italic>k</italic> non-empty non-overlapping subsets.</p></list-item>
<list-item>
<p>Step 2: Calculate the centroids of the clusters from the current partition, with each centroid representing the mean of its the mean point of the cluster.</p></list-item>
<list-item>
<p>Step 3: Assign each data point to the cluster with the nearest centroid.</p></list-item>
<list-item>
<p>Step 4: If no new assignment occurs, the algorithm stops. Otherwise, go to step 2.</p></list-item>
</list>
<p>In our experiment, we set <italic>k</italic> = 3 to represent three weather levels, hot, medium and cool. In addition, to handle sudden weather changes such as storms that lead to a very low value of HI, we utilized k-means clustering method with constraint, ensuring each cluster contains at least five data points (<xref ref-type="bibr" rid="B12">Bradley et&#xa0;al., 2000</xref>). The cluster size constraint is met by formulating the assignment step 3 as a Minimum Cost Flow (MCF) problem (<xref ref-type="bibr" rid="B10">Bertsekas, 1991</xref>) and the MCF algorithm is used to ensure that each cluster receives the required minimum number of points. This constraint prevents the creation of a cluster solely based on the extreme low HI values, ensuring that the cluster representing cool weather is more representative of typical cool weather conditions, rather than being influenced by anomalous values.</p>
<p>In the same way, to categorize the cattle behavior, movement rate, activity and distance travelled from water, into four levels: high, medium, slight or low, we utilized the k-means clustering method to divide the daily average of each behavior metric into four distinct clusters. For this analysis, we set <italic>k</italic> = 4 and included the constraint that each group must have at least five data points.</p>
</sec>
<sec id="s3_3_2">
<label>3.3.2</label>
<title>CM-SPAM algorithm</title>
<p>Mining frequent sequential patterns is a challenging and computationally expensive task due to the exponential growth in the number of subsequences. For example, considering a sequence containing q items, it can have up to 2<italic><sup>q</sup></italic>-1 distinct subsequences, all of which could potentially be candidates for frequent sequential patterns (<xref ref-type="bibr" rid="B16">Fournier-Viger et&#xa0;al., 2017</xref>). Alternatively, when considering the total number of k-sequences (sequences contains k items) present in <italic>n</italic> itemsets is <inline-formula>
<mml:math display="inline" id="im35"><mml:mrow><mml:mrow><mml:mo stretchy="false">(</mml:mo><mml:mrow><mml:mfrac><mml:mi>n</mml:mi><mml:mi>k</mml:mi></mml:mfrac></mml:mrow><mml:mo stretchy="false">)</mml:mo></mml:mrow></mml:mrow></mml:math></inline-formula> (<xref ref-type="bibr" rid="B37">Tan et&#xa0;al., 2016</xref>). In this study, we apply an unsupervised Co-occurrence Map Sequential Pattern Mining (CM-SPAM) algorithm (<xref ref-type="bibr" rid="B15">Fournier-Viger et&#xa0;al., 2014</xref>) for discovering all frequent sequential patterns. It is one of the most advantageous techniques and has been applied in various fields, such as discovering frequent nucleotide patterns related to COVID 19 (<xref ref-type="bibr" rid="B29">Nawaz et&#xa0;al., 2021</xref>) and identifying frequent API call patterns in malware behavior analysis (<xref ref-type="bibr" rid="B28">Nawaz et&#xa0;al., 2022</xref>; <xref ref-type="bibr" rid="B34">Pekta&#x15f;, 2018</xref>).</p>
<p>CM-SPAM is a sequential pattern mining algorithm built on the SPAM algorithm (<xref ref-type="bibr" rid="B3">Ayres et&#xa0;al., 2002</xref>). It utilizes a depth-first search algorithm to discover patterns through the following steps:</p>
<list list-type="bullet">
<list-item>
<p>Step 1: First, the database is scanned to identify sequences containing single items such as &lt;{<italic>high_heatIndex</italic>}&gt;, &lt;{<italic>low_avg_rate</italic>}&gt;, and &lt;{<italic>medium_avg_rate</italic>}&gt;. The frequent single-item sequences, whose support is higher than a given threshold, are referred to as 1-sequences.</p></list-item>
<list-item>
<p>Step 2: The algorithm recursively performs two operations, s-extensions and i-extensions, to generate larger subsequences as follows:</p>
<list list-type="bullet">
<list-item>
<p>Order of items: To begin the extension process, it assumes that all items are ordered in either decreasing or increasing lexicographical order (denoted as <inline-formula>
<mml:math display="inline" id="im36"><mml:mo>&#x227b;</mml:mo></mml:math></inline-formula>) such as <inline-formula>
<mml:math display="inline" id="im37"><mml:mrow><mml:mi>m</mml:mi><mml:mi>e</mml:mi><mml:mi>d</mml:mi><mml:mi>i</mml:mi><mml:mi>u</mml:mi><mml:mi>m</mml:mi><mml:mo>_</mml:mo><mml:mi>a</mml:mi><mml:mi>v</mml:mi><mml:mi>g</mml:mi><mml:mo>_</mml:mo><mml:mi>r</mml:mi><mml:mi>a</mml:mi><mml:mi>t</mml:mi><mml:mi>e</mml:mi><mml:mo>&#x227b;</mml:mo><mml:mi>l</mml:mi><mml:mi>o</mml:mi><mml:mi>w</mml:mi><mml:mo>_</mml:mo><mml:mi>a</mml:mi><mml:mi>v</mml:mi><mml:mi>g</mml:mi><mml:mo>_</mml:mo><mml:mi>r</mml:mi><mml:mi>a</mml:mi><mml:mi>t</mml:mi><mml:mi>e</mml:mi><mml:mo>&#x227b;</mml:mo><mml:mi>h</mml:mi><mml:mi>i</mml:mi><mml:mi>g</mml:mi><mml:mi>h</mml:mi><mml:mo>_</mml:mo><mml:mi>h</mml:mi><mml:mi>e</mml:mi><mml:mi>a</mml:mi><mml:mi>t</mml:mi><mml:mi>I</mml:mi><mml:mi>n</mml:mi><mml:mi>d</mml:mi><mml:mi>e</mml:mi><mml:mi>x</mml:mi><mml:mo>.</mml:mo></mml:mrow></mml:math></inline-formula> Note that the specific order does not affect the final result, but is used to explore the potential sequential patterns and avoid considering the same pattern multiple times.</p></list-item>
<list-item>
<p>s-extensions: Given a sequence <inline-formula>
<mml:math display="inline" id="im38"><mml:mrow><mml:msub><mml:mi>s</mml:mi><mml:mi>a</mml:mi></mml:msub><mml:mo>=</mml:mo><mml:msub><mml:mi>I</mml:mi><mml:mn>1</mml:mn></mml:msub><mml:mo>,</mml:mo><mml:msub><mml:mi>I</mml:mi><mml:mn>2</mml:mn></mml:msub><mml:mo>,</mml:mo><mml:mo>&#x2026;</mml:mo><mml:mo>,</mml:mo><mml:msub><mml:mi>I</mml:mi><mml:mi>n</mml:mi></mml:msub></mml:mrow></mml:math></inline-formula> and an item <italic>x</italic>, an s-extension of sequence <italic>s<sub>a</sub></italic> is formed as <inline-formula>
<mml:math display="inline" id="im39"><mml:mrow><mml:msub><mml:mi>s</mml:mi><mml:mi>b</mml:mi></mml:msub><mml:mo>=</mml:mo><mml:msub><mml:mi>I</mml:mi><mml:mn>1</mml:mn></mml:msub><mml:mo>,</mml:mo><mml:msub><mml:mi>I</mml:mi><mml:mn>2</mml:mn></mml:msub><mml:mo>,</mml:mo><mml:mo>&#x2026;</mml:mo><mml:mo>,</mml:mo><mml:msub><mml:mi>I</mml:mi><mml:mi>h</mml:mi></mml:msub><mml:mo>,</mml:mo><mml:mrow><mml:mo>{</mml:mo><mml:mi>x</mml:mi><mml:mo>}</mml:mo></mml:mrow></mml:mrow></mml:math></inline-formula>;</p></list-item>
<list-item>
<p>i-extensions: Given a sequence <inline-formula>
<mml:math display="inline" id="im40"><mml:mrow><mml:msub><mml:mi>s</mml:mi><mml:mi>a</mml:mi></mml:msub><mml:mo>=</mml:mo><mml:msub><mml:mi>I</mml:mi><mml:mn>1</mml:mn></mml:msub><mml:mo>,</mml:mo><mml:msub><mml:mi>I</mml:mi><mml:mn>2</mml:mn></mml:msub><mml:mo>,</mml:mo><mml:mo>&#x2026;</mml:mo><mml:mo>,</mml:mo><mml:msub><mml:mi>I</mml:mi><mml:mi>n</mml:mi></mml:msub></mml:mrow></mml:math></inline-formula> and an item <italic>x</italic>, an i-extension of sequence <italic>s<sub>a</sub></italic> is formed as <inline-formula>
<mml:math display="inline" id="im41"><mml:mrow><mml:msub><mml:mi>s</mml:mi><mml:mi>b</mml:mi></mml:msub><mml:mo>=</mml:mo><mml:msub><mml:mi>I</mml:mi><mml:mn>1</mml:mn></mml:msub><mml:mo>,</mml:mo><mml:msub><mml:mi>I</mml:mi><mml:mn>2</mml:mn></mml:msub><mml:mo>,</mml:mo><mml:mo>&#x2026;</mml:mo><mml:mo>,</mml:mo><mml:msub><mml:mi>I</mml:mi><mml:mi>h</mml:mi></mml:msub><mml:mo>&#x222a;</mml:mo><mml:mo>&#x200b;</mml:mo><mml:mrow><mml:mo>{</mml:mo><mml:mi>x</mml:mi><mml:mo>}</mml:mo></mml:mrow></mml:mrow></mml:math></inline-formula> such that x is the last item in <italic>I<sub>h</sub></italic> according to the lexicographical order <inline-formula>
<mml:math display="inline" id="im42"><mml:mo>&#x227b;</mml:mo></mml:math></inline-formula>.</p></list-item>
</list></list-item>
</list>
<p>For example, given a sequence <inline-formula>
<mml:math display="inline" id="im43"><mml:mrow><mml:msub><mml:mi>s</mml:mi><mml:mi>a</mml:mi></mml:msub><mml:mo>=</mml:mo><mml:mo>&#x2329;</mml:mo><mml:mrow><mml:mo>{</mml:mo><mml:mrow><mml:mi>h</mml:mi><mml:mi>i</mml:mi><mml:mi>g</mml:mi><mml:mi>h</mml:mi><mml:mo>_</mml:mo><mml:mi>h</mml:mi><mml:mi>e</mml:mi><mml:mi>a</mml:mi><mml:mi>t</mml:mi><mml:mi>I</mml:mi><mml:mi>n</mml:mi><mml:mi>d</mml:mi><mml:mi>e</mml:mi><mml:mi>x</mml:mi></mml:mrow><mml:mo>}</mml:mo></mml:mrow><mml:mo>&#x232a;</mml:mo></mml:mrow></mml:math></inline-formula> with item <italic>low_avg_rate</italic>, an s-extension is <inline-formula>
<mml:math display="inline" id="im44"><mml:mrow><mml:mo>&#x2329;</mml:mo><mml:mrow><mml:mo>{</mml:mo><mml:mrow><mml:mi>h</mml:mi><mml:mi>i</mml:mi><mml:mi>g</mml:mi><mml:mi>h</mml:mi><mml:mo>_</mml:mo><mml:mi>h</mml:mi><mml:mi>e</mml:mi><mml:mi>a</mml:mi><mml:mi>t</mml:mi><mml:mi>I</mml:mi><mml:mi>n</mml:mi><mml:mi>d</mml:mi><mml:mi>e</mml:mi><mml:mi>x</mml:mi></mml:mrow><mml:mo>}</mml:mo></mml:mrow><mml:mo>,</mml:mo><mml:mrow><mml:mo>{</mml:mo><mml:mrow><mml:mi>l</mml:mi><mml:mi>o</mml:mi><mml:mi>w</mml:mi><mml:mo>_</mml:mo><mml:mi>a</mml:mi><mml:mi>v</mml:mi><mml:mi>g</mml:mi><mml:mo>_</mml:mo><mml:mi>r</mml:mi><mml:mi>a</mml:mi><mml:mi>t</mml:mi><mml:mi>e</mml:mi></mml:mrow><mml:mo>}</mml:mo></mml:mrow><mml:mo>&#x232a;</mml:mo></mml:mrow></mml:math></inline-formula> and an i-extension is <inline-formula>
<mml:math display="inline" id="im45"><mml:mrow><mml:mo>&#x2329;</mml:mo><mml:mrow><mml:mo>{</mml:mo><mml:mrow><mml:mi>h</mml:mi><mml:mi>i</mml:mi><mml:mi>g</mml:mi><mml:mi>h</mml:mi><mml:mo>_</mml:mo><mml:mi>h</mml:mi><mml:mi>e</mml:mi><mml:mi>a</mml:mi><mml:mi>t</mml:mi><mml:mi>I</mml:mi><mml:mi>n</mml:mi><mml:mi>d</mml:mi><mml:mi>e</mml:mi><mml:mi>x</mml:mi><mml:mo>,</mml:mo><mml:mi>l</mml:mi><mml:mi>o</mml:mi><mml:mi>w</mml:mi><mml:mo>_</mml:mo><mml:mi>a</mml:mi><mml:mi>v</mml:mi><mml:mi>g</mml:mi><mml:mo>_</mml:mo><mml:mi>r</mml:mi><mml:mi>a</mml:mi><mml:mi>t</mml:mi><mml:mi>e</mml:mi></mml:mrow><mml:mo>}</mml:mo></mml:mrow><mml:mo>&#x232a;</mml:mo></mml:mrow></mml:math></inline-formula>.</p>
<p>Using the s-extensions and i-extensions, the algorithm generates (k+1)-sequences from one or more frequent k-sequence. If a sequence can no longer be extended, the algorithm backtracks and continues generating other patterns using another sequence.</p>
<p>In this study, the SPMF data mining library (<ext-link ext-link-type="uri" xlink:href="https://www.philippe-fournier-viger.com/spmf/">https://www.philippe-fournier-viger.com/spmf/</ext-link>), an open-source Java library, is utilized to call the CM-SPAM algorithm (<xref ref-type="bibr" rid="B16">Fournier-Viger et&#xa0;al., 2017</xref>). Four parameters are configured. First, minimum support threshold (<italic>minsup</italic>) is determined. If <italic>minsup</italic> threshold is too low, it may result in an overwhelming number of patterns, which may slow down the algorithm. Conversely, if <italic>minsup</italic> threshold is set too high, too few patterns may be identified. In this work, conducted over two different periods <italic>P</italic><sub>1</sub> and <italic>P</italic><sub>2</sub>, because the length of period <italic>P</italic><sub>1</sub> is shorter than <italic>P</italic><sub>2</sub>, the setup of <italic>minsup</italic> is 20% for period <italic>P</italic><sub>1</sub> and 25% for period <italic>P</italic><sub>2</sub> It means that a pattern is considered frequent in <italic>P</italic><sub>1</sub>, it must appear in at least 20% of sequences in the dataset from <italic>P</italic><sub>1</sub>, and a pattern is considered frequent in <italic>P</italic><sub>2</sub>, it must appear in at least 25% of sequences in the dataset from <italic>P</italic><sub>2</sub>. The value of <italic>minsup</italic> varies among different problems; however, these values should not be too low, because they have been used in discovering sequential pattern mining in COVID-19 genome using CM-SPAM (<xref ref-type="bibr" rid="B29">Nawaz et&#xa0;al., 2021</xref>). Second, the minimum number of items required in a pattern is set to three in this study. This is because we aim to identify continuous patterns spanning at least two days, which includes the weather level on the first day and both the weather and behavior levels on the second day. The third parameter is required items, which ensure the detection of a decrease in animal behavior. Required items that the frequent pattern must contain are low level values of each metric (e.g. <italic>low_avg_rate</italic>). Finally, the max gap parameter specifies whether gaps between item sets (meaning day&#x2019;s information) are allowed in sequential patterns. We have set it to be one to prevent any gap between item sets, meaning that the frequent sequential pattern identified in our experiment corresponds to continuous days.</p>
</sec>
<sec id="s3_3_3">
<label>3.3.3</label>
<title>Examining the continuous patterns</title>
<p>To investigate the influence of continuous patterns on animal behavior in comparison to cool days, we calculated three values: (1) the frequency of decrease in the behavior metric between the closest cool weather day <italic>d</italic> before a pattern <italic>s</italic> begins and the last day <italic>d<sub>last</sub></italic> of that pattern, (2) the average decrease in the behavior metric from <italic>d</italic> and <italic>d<sub>last</sub></italic>&#x200b; across patterns, and (3) the average difference in the behavior metric between <italic>d</italic> and <italic>d<sub>last</sub></italic>&#x200b; for each pattern. Because the hot weather can last for several days (Trial 1), day <italic>d</italic> is defined as either: (1) the closest cool day&#x2014;the nearest day within the week before the pattern start day on which the cool-level HI occurred; or (2) the closest medium weather day&#x2014;the nearest day before the pattern start day on which the medium-level HI occurred.</p>
<p>Let <italic>CP</italic> be the set of continuous patterns found in data of a cow, and |<italic>CP</italic>| be the number of patterns in <italic>CP</italic>. Let <inline-formula>
<mml:math display="inline" id="im46"><mml:mrow><mml:msubsup><mml:mi>B</mml:mi><mml:mi>d</mml:mi><mml:mi>s</mml:mi></mml:msubsup></mml:mrow></mml:math></inline-formula> and <inline-formula>
<mml:math display="inline" id="im47"><mml:mrow><mml:msubsup><mml:mi>B</mml:mi><mml:mrow><mml:msub><mml:mi>d</mml:mi><mml:mrow><mml:mi>l</mml:mi><mml:mi>a</mml:mi><mml:mi>s</mml:mi><mml:mi>t</mml:mi></mml:mrow></mml:msub></mml:mrow><mml:mi>s</mml:mi></mml:msubsup></mml:mrow></mml:math></inline-formula> represent the behavior metrics on day <italic>d</italic> and <italic>d<sub>last</sub></italic> related to continuous pattern <inline-formula>
<mml:math display="inline" id="im48"><mml:mrow><mml:mi>s</mml:mi><mml:mo>&#x2208;</mml:mo><mml:mi>C</mml:mi><mml:mi>P</mml:mi></mml:mrow></mml:math></inline-formula> (as defined above). Let <italic>C</italic> be the set of patterns <inline-formula>
<mml:math display="inline" id="im49"><mml:mrow><mml:mi>s</mml:mi><mml:mo>&#x2208;</mml:mo><mml:mi>C</mml:mi><mml:mi>P</mml:mi></mml:mrow></mml:math></inline-formula> such that <inline-formula>
<mml:math display="inline" id="im50"><mml:mrow><mml:msubsup><mml:mi>B</mml:mi><mml:mi>d</mml:mi><mml:mi>s</mml:mi></mml:msubsup><mml:mo>&gt;</mml:mo><mml:msubsup><mml:mi>B</mml:mi><mml:mrow><mml:msub><mml:mi>d</mml:mi><mml:mrow><mml:mi>l</mml:mi><mml:mi>a</mml:mi><mml:mi>s</mml:mi><mml:mi>t</mml:mi></mml:mrow></mml:msub></mml:mrow><mml:mi>s</mml:mi></mml:msubsup></mml:mrow></mml:math></inline-formula>, and let |<italic>C</italic>| be the number of patterns in <italic>C</italic>.</p>
<p>The <italic>frequency of decrease in the behavior metric</italic> for a cow is defined as follows:</p>
<disp-formula>
<mml:math display="block" id="M7"><mml:mrow><mml:mfrac><mml:mrow><mml:mrow><mml:mo>|</mml:mo><mml:mi>C</mml:mi><mml:mo>|</mml:mo></mml:mrow></mml:mrow><mml:mrow><mml:mrow><mml:mo>|</mml:mo><mml:mrow><mml:mi>C</mml:mi><mml:mi>P</mml:mi></mml:mrow><mml:mo>|</mml:mo></mml:mrow></mml:mrow></mml:mfrac></mml:mrow></mml:math>
</disp-formula>
<p>The <italic>average decrease in the behavior metric</italic> between days <italic>d</italic> and <italic>d<sub>last</sub></italic> for a cow is defined as follows:</p>
<disp-formula id="eq3"><label>(3)</label>
<mml:math display="block" id="M8"><mml:mrow><mml:mfrac><mml:mrow><mml:msub><mml:mo>&#x2211;</mml:mo><mml:mrow><mml:mi>s</mml:mi><mml:mo>&#x2208;</mml:mo><mml:mi>C</mml:mi></mml:mrow></mml:msub><mml:mo stretchy="false">(</mml:mo><mml:msubsup><mml:mi>B</mml:mi><mml:mi>d</mml:mi><mml:mi>s</mml:mi></mml:msubsup><mml:mo>&#x2212;</mml:mo><mml:msubsup><mml:mi>B</mml:mi><mml:mrow><mml:msub><mml:mi>d</mml:mi><mml:mrow><mml:mi>l</mml:mi><mml:mi>a</mml:mi><mml:mi>s</mml:mi><mml:mi>t</mml:mi></mml:mrow></mml:msub></mml:mrow><mml:mi>s</mml:mi></mml:msubsup><mml:mo stretchy="false">)</mml:mo></mml:mrow><mml:mrow><mml:mrow><mml:mo>|</mml:mo><mml:mi>C</mml:mi><mml:mo>|</mml:mo></mml:mrow></mml:mrow></mml:mfrac></mml:mrow></mml:math>
</disp-formula>
<p>The <italic>average difference in the behavior metric</italic> between days d and <italic>d<sub>last</sub></italic> for a cow is defined as follows:</p>
<disp-formula id="eq4"><label>(4)</label>
<mml:math display="block" id="M9"><mml:mrow><mml:mfrac><mml:mrow><mml:msub><mml:mo>&#x2211;</mml:mo><mml:mrow><mml:mi>s</mml:mi><mml:mo>&#x2208;</mml:mo><mml:mi>C</mml:mi><mml:mi>P</mml:mi></mml:mrow></mml:msub><mml:mo stretchy="false">(</mml:mo><mml:msubsup><mml:mi>B</mml:mi><mml:mi>d</mml:mi><mml:mi>s</mml:mi></mml:msubsup><mml:mo>&#x2212;</mml:mo><mml:msubsup><mml:mi>B</mml:mi><mml:mrow><mml:msub><mml:mi>d</mml:mi><mml:mrow><mml:mi>l</mml:mi><mml:mi>a</mml:mi><mml:mi>s</mml:mi><mml:mi>t</mml:mi></mml:mrow></mml:msub></mml:mrow><mml:mi>s</mml:mi></mml:msubsup><mml:mo stretchy="false">)</mml:mo></mml:mrow><mml:mrow><mml:mrow><mml:mo>|</mml:mo><mml:mrow><mml:mi>C</mml:mi><mml:mi>P</mml:mi></mml:mrow><mml:mo>|</mml:mo></mml:mrow></mml:mrow></mml:mfrac></mml:mrow></mml:math>
</disp-formula>
<p>The difference between <xref ref-type="disp-formula" rid="eq3">Equation 3</xref> and <xref ref-type="disp-formula" rid="eq4">Equation 4</xref> is that <xref ref-type="disp-formula" rid="eq3">Equation 3</xref> calculates the average decrease when the behavior metric on day <italic>d<sub>last</sub></italic> is lower than that on day <italic>d</italic>, whereas <xref ref-type="disp-formula" rid="eq4">Equation 4</xref> computes the overall difference in behavior metric between days <italic>d</italic> and <italic>d<sub>last</sub></italic>.</p>
<p>In this study, this exploration was applied to the behavior metric (rate, m/min) that most successfully detects the continuous pattern.</p>
</sec>
<sec id="s3_3_4">
<label>3.3.4</label>
<title>Binomial probability</title>
<p>To determine whether the detected patterns are unlikely due to chance, we apply binomial probability to Trial 1 and Trial 2. The binomial probability is calculated using the following equation:</p>
<disp-formula>
<mml:math display="block" id="M10"><mml:mrow><mml:mi>P</mml:mi><mml:mrow><mml:mo stretchy="false">(</mml:mo><mml:mrow><mml:mi>X</mml:mi><mml:mo>=</mml:mo><mml:mi>k</mml:mi></mml:mrow><mml:mo stretchy="false">)</mml:mo></mml:mrow><mml:mo>=</mml:mo><mml:mfrac><mml:mrow><mml:mi>n</mml:mi><mml:mo>!</mml:mo></mml:mrow><mml:mrow><mml:mrow><mml:mo stretchy="false">(</mml:mo><mml:mrow><mml:mi>n</mml:mi><mml:mo>&#x2212;</mml:mo><mml:mi>k</mml:mi></mml:mrow><mml:mo stretchy="false">)</mml:mo></mml:mrow><mml:mo>!</mml:mo><mml:mi>k</mml:mi><mml:mo>!</mml:mo></mml:mrow></mml:mfrac><mml:msup><mml:mi>p</mml:mi><mml:mi>k</mml:mi></mml:msup><mml:msup><mml:mrow><mml:mrow><mml:mo stretchy="false">(</mml:mo><mml:mrow><mml:mn>1</mml:mn><mml:mo>&#x2212;</mml:mo><mml:mi>p</mml:mi></mml:mrow><mml:mo stretchy="false">)</mml:mo></mml:mrow></mml:mrow><mml:mrow><mml:mi>n</mml:mi><mml:mo>&#x2212;</mml:mo><mml:mi>k</mml:mi></mml:mrow></mml:msup></mml:mrow></mml:math>
</disp-formula>
<p>where:</p>
<p><italic>n</italic>: total number of <italic>m</italic> continuous hot days across all animals.</p>
<p><italic>k</italic>: total occurrences of the <italic>m</italic>-day continuous pattern detected across all animals in our study.</p>
<p><italic>p</italic> = 0.25: The probability of an <italic>m</italic>-day continuous pattern, based on the assumption that on a last day of a pattern, the animal behavior is equally likely to be one of four levels (low, slight, medium, high), and the animal behavior is associated with &#x201c;low&#x201d; movement rate on the day.</p>
<p>In this study, we analyze the most successfully detected frequent continuous patterns for Trial 1 and Trial 2.</p>
</sec>
</sec>
</sec>
<sec id="s4" sec-type="results">
<label>4</label>
<title>Results</title>
<sec id="s4_1">
<label>4.1</label>
<title>K-means weather clusters for trials 1 and 2</title>
<p>Based on the cluster method, the temperature of hot weather periods in Trial 1 was greater than or equal to 30&#xb0;C (<xref ref-type="fig" rid="f3"><bold>Figure&#xa0;3</bold></xref>). The medium weather period varied between 27&#xb0;<italic>C</italic> to 30&#xb0;<italic>C</italic>. The cool weather was below 27&#xb0;<italic>C</italic>. Two notable temperature drops occur on Julian dates 212 and 225 (<xref ref-type="fig" rid="f3"><bold>Figure&#xa0;3</bold></xref>).</p>
<fig id="f3" position="float">
<label>Figure 3</label>
<caption>
<p>Three weather levels (hot, medium, and cool weather days) calculated using the K-means clustering method with the constraint across days in Trial 1.</p>
</caption>
<graphic mimetype="image" mime-subtype="tiff" xlink:href="fanim-06-1640550-g003.tif">
<alt-text content-type="machine-generated">Line graph depicting maximum heat index in degrees Celsius over Julian dates from June to September. Symbols indicate medium weather (purple plus), cool weather (green triangle), and hot weather (red circle).</alt-text>
</graphic>
</fig>
<p>In Trial 2, the weather threshold calculated from the cluster method was slightly lower than in Trial 1. The hot weather is defined as 29.5&#xb0;<italic>C</italic> or higher (<xref ref-type="fig" rid="f4"><bold>Figure&#xa0;4</bold></xref>). The medium weather ranges from 26&#xb0;<italic>C</italic> to 29.5&#xb0;<italic>C</italic>. The cool weather was below 26&#xb0;<italic>C</italic>.</p>
<fig id="f4" position="float">
<label>Figure 4</label>
<caption>
<p>Three weather levels (hot, medium, and cool weather days) calculated using the K-means clustering method with the constraint across days in Trial 2.</p>
</caption>
<graphic mimetype="image" mime-subtype="tiff" xlink:href="fanim-06-1640550-g004.tif">
<alt-text content-type="machine-generated">Line chart displaying maximum heat index in degrees Celsius from July to September. Hot days are marked with red circles, medium with purple pluses, and cool days with green triangles.</alt-text>
</graphic>
</fig>
</sec>
<sec id="s4_2">
<label>4.2</label>
<title>CM-SPAM algorithm for pattern recognition of behavior and weather data for Trial 1</title>
<p>The following describes different continuous patterns that were identified and detected in this work.</p>
<list list-type="bullet">
<list-item>
<p>A four-day continuous pattern with regard to a behavior metric A is described as: &#x201c;The first day features a high <italic>HI</italic>, the second day also has a high <italic>HI</italic>, the third day continues with a high <italic>HI</italic>, and the fourth day shows a low average of A along with a high <italic>HI</italic>&#x201d;.</p></list-item>
<list-item>
<p>A three-day continuous pattern with regard to a behavior metric A is described as: &#x201c;The first day has a high <italic>HI</italic>, the second day also has a high <italic>HI</italic>, and the third day presents a low average of A alongside a high <italic>HI</italic>&#x201d;.</p></list-item>
<list-item>
<p>A two-day continuous pattern with regard to a behavior metric A is described as: &#x201c;The first day experiences a high <italic>HI</italic>, and the second day shows a low average of A with a high <italic>HI</italic>&#x201d;.</p></list-item>
</list>
<p>During period <italic>P</italic><sub>1</sub> (5:00 AM to 8:00 AM and 5:00 PM to 8:00 PM), by utilizing average daily rate, CM-SPAM successfully identifies the pattern between hot weather and low movement rate, with 90.91% of animals exhibiting the three-day continuous pattern. Among these, 54.55% animals show four-day continuous patterns (<xref ref-type="fig" rid="f5"><bold>Figures&#xa0;5</bold></xref>&#x2013;<xref ref-type="fig" rid="f8"><bold>8</bold></xref>). Only two animals (9.09%) do not display any four-day or three-day continuous patterns. In contrast, when the algorithm analyses the average daily activity metric, which is another cattle behavior metric, it fails to detect relationship between hot weather and low average daily activity. The majority of animals (95.45%) show no four-day or three-day continuous patterns related to hot weather and low in activity. Only one animal demonstrates the three-day continuous pattern (<xref ref-type="fig" rid="f9"><bold>Figure&#xa0;9</bold></xref>). When CM-SPAM is applied to average daily distance to water (the third cattle behavior metric), only one animal showed four-day continuous pattern. More cows (31.82%) displayed a three-day continuous pattern, while 68.18% of cows did not show any four-day or three-day continuous patterns linked to hot weather and low in distance to water (<xref ref-type="fig" rid="f10"><bold>Figure&#xa0;10</bold></xref>) (<xref ref-type="table" rid="T2"><bold>Table&#xa0;2</bold></xref>).</p>
<fig id="f5" position="float">
<label>Figure 5</label>
<caption>
<p>Average movement rate of cows with three-day continuous patterns and the average rate of cows without continuous patterns (three-day and four-day) in period <inline-formula>
<mml:math display="inline" id="im51"><mml:mrow><mml:msub><mml:mi>P</mml:mi><mml:mn>1</mml:mn></mml:msub></mml:mrow></mml:math></inline-formula> of Trial 1. Daily maximum heat index helps identify periods of hot weather.</p>
</caption>
<graphic mimetype="image" mime-subtype="tiff" xlink:href="fanim-06-1640550-g005.tif">
<alt-text content-type="machine-generated">Line graph showing the average movement rates of animals and maximum heat index from June to September. The purple line shows movement without continuous patterns, the blue line with three-day patterns, and the green line represents the maximum heat index. Weather days are indicated: medium (pink plus), cool (green triangles), and hot (red circles). The movement rate is on the right Y-axis (m/min), heat index on the left Y-axis (&#xb0;C), and dates on the X-axis. Peaks and fluctuations are visible in all parameters.</alt-text>
</graphic>
</fig>
<fig id="f6" position="float">
<label>Figure 6</label>
<caption>
<p>Average movement rate of cows with four-day continuous patterns and the average rate of cows without continuous patterns (both three-day and four-day) in period <inline-formula>
<mml:math display="inline" id="im52"><mml:mrow><mml:msub><mml:mi>P</mml:mi><mml:mn>1</mml:mn></mml:msub></mml:mrow></mml:math></inline-formula> of Trial 1. Daily maximum heat index helps identify periods of hot weather.</p>
</caption>
<graphic mimetype="image" mime-subtype="tiff" xlink:href="fanim-06-1640550-g006.tif">
<alt-text content-type="machine-generated">Line graph showing animal movement rates on different weather days from June to September. Blue crosses and purple diamonds indicate movement with and without continuous patterns, respectively. The green line represents maximum heat index. Red circles, purple pluses, and green triangles denote hot, medium, and cool weather days.</alt-text>
</graphic>
</fig>
<fig id="f7" position="float">
<label>Figure 7</label>
<caption>
<p>Three-day continuous patterns using the movement rate metric for cow 105 in Trial 1 during period <inline-formula>
<mml:math display="inline" id="im53"><mml:mrow><mml:msub><mml:mi>P</mml:mi><mml:mn>1</mml:mn></mml:msub></mml:mrow></mml:math></inline-formula>, with detected patterns highlighted.</p>
</caption>
<graphic mimetype="image" mime-subtype="tiff" xlink:href="fanim-06-1640550-g007.tif">
<alt-text content-type="machine-generated">Line graph showing maximum heat index (in Celsius) on the left and average daily movement rate (in meters per minute) on the right plotted over time from June to September. Data points include various weather and movement rate categories, indicated with different symbols and colors. Yellow bars highlight specific patterns.</alt-text>
</graphic>
</fig>
<fig id="f8" position="float">
<label>Figure 8</label>
<caption>
<p>Four-day continuous patterns using movement rate metric for cow ID 105 in Trial 1 during period <inline-formula>
<mml:math display="inline" id="im54"><mml:mrow><mml:msub><mml:mi>P</mml:mi><mml:mn>1</mml:mn></mml:msub></mml:mrow></mml:math></inline-formula>, with detected patterns highlighted.</p>
</caption>
<graphic mimetype="image" mime-subtype="tiff" xlink:href="fanim-06-1640550-g008.tif">
<alt-text content-type="machine-generated">Graph depicting maximum heat index in degrees Celsius versus Julian dates from June to September. Different colored markers indicate weather days: hot (red circles), medium (pink crosses), and cool (yellow triangles). Line represents average daily movement rate in meters per minute, with different colors for rates: low (pink squares), slight (yellow triangles), medium (green diamonds), and high (blue diamonds). Yellow vertical bands show pattern appearance.</alt-text>
</graphic>
</fig>
<fig id="f9" position="float">
<label>Figure 9</label>
<caption>
<p>Three-day continuous patterns using activity metric for cow ID 704 in Trial 1 during period <inline-formula>
<mml:math display="inline" id="im55"><mml:mrow><mml:msub><mml:mi>P</mml:mi><mml:mn>1</mml:mn></mml:msub></mml:mrow></mml:math></inline-formula>, with detected patterns highlighted.</p>
</caption>
<graphic mimetype="image" mime-subtype="tiff" xlink:href="fanim-06-1640550-g009.tif">
<alt-text content-type="machine-generated">Graph showing maximum heat index in degrees Celsius and average daily activity from June to September. Symbols denote high, medium, slight, and low average daily activity. Lines represent maximum heat index and average daily activity, with yellow areas indicating pattern appearances.</alt-text>
</graphic>
</fig>
<fig id="f10" position="float">
<label>Figure 10</label>
<caption>
<p>Three-day continuous pattern using distance traveled from water metric for cow ID 229 in Trial 1 during period <inline-formula>
<mml:math display="inline" id="im56"><mml:mrow><mml:msub><mml:mi>P</mml:mi><mml:mn>1</mml:mn></mml:msub></mml:mrow></mml:math></inline-formula>, with detected patterns highlighted.</p>
</caption>
<graphic mimetype="image" mime-subtype="tiff" xlink:href="fanim-06-1640550-g010.tif">
<alt-text content-type="machine-generated">Line graph showing the relationship between maximum heat index in degrees Celsius and average daily distance traveled from water in meters over time from June to September. Various markers indicate slight, medium, high, and low distances from water, with temperature days categorized into hot, medium, and cool. Yellow bars represent pattern appearances.</alt-text>
</graphic>
</fig>
<table-wrap id="T2" position="float">
<label>Table&#xa0;2</label>
<caption>
<p>Percentage of cows with patterns during period <inline-formula>
<mml:math display="inline" id="im57"><mml:mrow><mml:msub><mml:mi>P</mml:mi><mml:mn>1</mml:mn></mml:msub></mml:mrow></mml:math></inline-formula> in Trial 1 for the behavioral metrics: average daily movement rate, average daily activity and average daily distance travelled from water.</p>
</caption>
<table frame="hsides">
<thead>
<tr>
<th valign="middle" align="left">Patterns</th>
<th valign="middle" align="left">Average daily movement rate</th>
<th valign="middle" align="left">Average daily activity</th>
<th valign="middle" align="left">Average daily distance traveled from water</th>
</tr>
</thead>
<tbody>
<tr>
<td valign="middle" align="left">Four-day continuous pattern</td>
<td valign="middle" align="center">54.55%<break/>Animal ID:<break/>63,73,105,207,229,230,231,253,337,754,790,939</td>
<td valign="middle" align="center">0%</td>
<td valign="middle" align="center">4.55%<break/>Animal ID:<break/>229</td>
</tr>
<tr>
<td valign="middle" align="left">Three-day continuous pattern</td>
<td valign="middle" align="center">90.91%<break/>Animal ID: 31,63,73,105,137,143,207,211,229,230,231,253,265,327,337,635,704,754,790,939</td>
<td valign="middle" align="center">4.55%<break/>Animal ID:<break/>704</td>
<td valign="middle" align="center">31.82%<break/>Animal ID:<break/>73,143,211,229,231,265,790</td>
</tr>
<tr>
<td valign="middle" align="left">No Four-day and Three-day continuous patterns</td>
<td valign="middle" align="center">9.09%<break/>Animal ID: 547,947</td>
<td valign="middle" align="center">95.45%<break/>Animal ID:<break/>31,63,137,143,207,211,229,230,231,253,265,327,337,547,635,754,790,939,73,105,947</td>
<td valign="middle" align="center">68.18%<break/>Animal ID:<break/>31,63,105,137,207,230,704,253,327,337,547,754,939,947,635</td>
</tr>
</tbody>
</table>
<table-wrap-foot>
<fn>
<p>Identification numbers (ID) of cows that display patterns in Trial 1 are listed. Note: cows that have four-day patterns also have three-day patterns.</p></fn>
</table-wrap-foot>
</table-wrap>
<p>In period <italic>P</italic><sub>2</sub> (5:00 AM to 8:00 PM), 54.55% of the cows displayed three-day continuous patterns related to their average daily rate, with 13.64% of them showing four-day continuous pattern. Meanwhile, 45.45% of animals do not exhibit either four-day or three-day continuous pattern. When analysing daily average activity and average daily distance to water, the results are similar to those in the period <italic>P</italic><sub>1</sub>. The algorithm did not identify a connection between hot weather and a decrease in this behavior, and 95.45% of the cows did not show any three-day or four-day continuous patterns when considering average daily activity. For daily distance travelled to water, 31.82% of animals displayed three-day continuous patterns (<xref ref-type="table" rid="T3"><bold>Table&#xa0;3</bold></xref>).</p>
<table-wrap id="T3">
<label>Table&#xa0;3</label>
<caption>
<p>Percentage of cows with patterns during period <inline-formula>
<mml:math display="inline" id="im58"><mml:mrow><mml:msub><mml:mi>P</mml:mi><mml:mn>2</mml:mn></mml:msub></mml:mrow></mml:math></inline-formula> of Trial 1 using the behavioral metrics average daily movement rate, average daily activity and average daily distance travel from water. Identification numbers (ID) of cows displaying patterns are listed.</p>
</caption>
<table frame="hsides">
<thead>
<tr>
<th valign="middle" align="left">Patterns</th>
<th valign="middle" align="left">Average daily movement rate</th>
<th valign="middle" align="left">Average daily activity</th>
<th valign="middle" align="left">Average daily distance traveled from water</th>
</tr>
</thead>
<tbody>
<tr>
<td valign="middle" align="left">Four-day continuous pattern</td>
<td valign="middle" align="center">13.64%<break/>Animal ID:<break/>137,231,790</td>
<td valign="middle" align="center">0%</td>
<td valign="middle" align="center">0%</td>
</tr>
<tr>
<td valign="middle" align="left">Three-day continuous pattern</td>
<td valign="middle" align="center">54.55%<break/>Animal ID:<break/>73,105,137,143,207,211,230,231,253,635,790,939</td>
<td valign="middle" align="center">4.55%<break/>Animal ID:<break/>704</td>
<td valign="middle" align="center">31.82%<break/>Animal ID:<break/>73,143,207,231,265,754,790</td>
</tr>
<tr>
<td valign="middle" align="left">No Four-day and Three-day continuous patterns</td>
<td valign="middle" align="center">45.45%<break/>Animal ID:<break/>31,265,547,754,63,327,337,704,947,229</td>
<td valign="middle" align="center">95.45%<break/>Animal ID:<break/>73,230,231,635,31,63,105,137,143,207,211,229,253,265,327,337,547,754,790,939,947</td>
<td valign="middle" align="center">68.18%<break/>Animal ID:<break/>31,63,105,137,211,230,327,337,635,704,947,229,253,547,939</td>
</tr>
</tbody>
</table>
<table-wrap-foot>
<fn>
<p>Cows that have four-day continuous patterns also have three-day continuous patterns.</p></fn>
</table-wrap-foot>
</table-wrap>
<p>When the three-day continuous patterns were detected using movement rate during period <italic>P</italic><sub>1</sub> for 20 cows out of 22 cows, the frequency of decreases in rate had minimum, maximum and mean values of 53%, 100% and 87%, respectively (<xref ref-type="table" rid="T4"><bold>Table&#xa0;4</bold></xref>). The average decrease in movement rate from the last cool day within a week before a three-day continuous pattern began or the last medium weather day to the last hot day in the pattern among 20 cows ranged from 2.17 (m/min) to 8.0 (m/min), with a mean of 4.57 (m/min). The minimum, maximum and mean values of average difference in rates during hot days and the previous cool day within a week or the closest medium weather day are 0.61 (m/min), 8.0 (m/min) and 3.93 (m/min), respectively. For the 12 cows exhibiting four-day continuous pattern in period <italic>P</italic><sub>1</sub> using movement rate, the minimum frequency of decreases in rate was slightly higher than that of three-day continuous pattern (55%), with four cows showing 100% frequency of decrease and a mean frequency of 82%. The minimum, maximum and mean values of average decrease in movement rate from the previous cool day within a week before a four-day continuous pattern started or the last medium weather day to the end of the hot period in the pattern were slightly higher compared to the three-day continuous pattern, with values of 2.38 (m/min), 8.64 (m/min) and 5.43 (m/min), respectively. Similarly, the minimum, maximum and mean values for the average differences between the four-day continuous hot days and the cool day within a week or the closest medium weather day were slightly higher than those for three-day continuous pattern, with values of 1.26 (m/min), 8.37 (m/min) and 4.37 (m/min) (<xref ref-type="table" rid="T4"><bold>Table&#xa0;4</bold></xref>).</p>
<table-wrap id="T4" position="float">
<label>Table&#xa0;4</label>
<caption>
<p>Comparison of movement rate changes between the closest cool day within seven days or the closest medium weather day before the first day of the three-day (or four-day) continuous pattern and the third day (or fourth day) of the three-day (or four-day) continuous pattern during period <inline-formula>
<mml:math display="inline" id="im59"><mml:mrow><mml:msub><mml:mi>P</mml:mi><mml:mn>1</mml:mn></mml:msub></mml:mrow></mml:math></inline-formula> in Trial 1, including minimum, maximum and mean values for the frequency of decreased movement rates, average of movement rate decrease (prior to until the end), and overall movement rate difference (prior to versus hot period) for animals with three-day (or four-day) continuous patterns, along with the number of animals <inline-formula>
<mml:math display="inline" id="im60"><mml:mi>n</mml:mi></mml:math></inline-formula> having the minimum and maximum values.</p>
</caption>
<table frame="hsides">
<thead>
<tr>
<th valign="middle" align="left">Comparison metrics</th>
<th valign="middle" align="left">Measures</th>
<th valign="middle" align="left">Three-day continuous pattern</th>
<th valign="middle" align="left">Four-day continuous pattern</th>
</tr>
</thead>
<tbody>
<tr>
<td valign="middle" rowspan="3" align="left">Frequency of Decrease in Movement Rate</td>
<td valign="middle" align="left">Minimum</td>
<td valign="middle" align="left">53% (<italic>n</italic>=1)</td>
<td valign="middle" align="left">55% (<italic>n</italic>=2)</td>
</tr>
<tr>
<td valign="middle" align="left">Maximum</td>
<td valign="middle" align="left">100% (<italic>n</italic>=9)</td>
<td valign="middle" align="left">100% (<italic>n</italic>=4)</td>
</tr>
<tr>
<td valign="middle" align="left">Mean</td>
<td valign="middle" align="left">87%</td>
<td valign="middle" align="left">82%</td>
</tr>
<tr>
<td valign="middle" rowspan="3" align="left">Average Decrease in Movement Rate (m/min)</td>
<td valign="middle" align="left">Minimum</td>
<td valign="middle" align="left">Min: 2.17 (<italic>n</italic>=1)</td>
<td valign="middle" align="left">2.38 (<italic>n</italic>=1)</td>
</tr>
<tr>
<td valign="middle" align="left">Maximum</td>
<td valign="middle" align="left">Max: 8.0 (<italic>n</italic>=1)</td>
<td valign="middle" align="left">8.64 (<italic>n</italic>=1)</td>
</tr>
<tr>
<td valign="middle" align="left">Mean</td>
<td valign="middle" align="left">4.57</td>
<td valign="middle" align="left">5.43</td>
</tr>
<tr>
<td valign="middle" rowspan="3" align="left">Average Difference in Movement Rate (m/min)</td>
<td valign="middle" align="left">Minimum</td>
<td valign="middle" align="left">0.61 (<italic>n</italic>=1)</td>
<td valign="middle" align="left">1.26 (<italic>n</italic>=1)</td>
</tr>
<tr>
<td valign="middle" align="left">Maximum</td>
<td valign="middle" align="left">8.0 (<italic>n</italic>=1)</td>
<td valign="middle" align="left">8.37 (<italic>n</italic>=1)</td>
</tr>
<tr>
<td valign="middle" align="left">Mean</td>
<td valign="middle" align="left">3.93</td>
<td valign="middle" align="left">4.37</td>
</tr>
</tbody>
</table>
</table-wrap>
<p>The binomial probability was calculated during <italic>P</italic><sub>1</sub> period, based on the movement rate behavior metric over the three-day continuous patterns. With <italic>m</italic> = 3, <italic>n</italic> = 622, <italic>k</italic> = 214, we find that <inline-formula>
<mml:math display="inline" id="im61"><mml:mrow><mml:mi>P</mml:mi><mml:mrow><mml:mo stretchy="false">(</mml:mo><mml:mrow><mml:mi>X</mml:mi><mml:mo>=</mml:mo><mml:mn>214</mml:mn></mml:mrow><mml:mo stretchy="false">)</mml:mo></mml:mrow><mml:mo>&lt;</mml:mo><mml:mn>0.0001</mml:mn></mml:mrow></mml:math></inline-formula>.</p>
</sec>
<sec id="s4_3">
<label>4.3</label>
<title>CM-SPAM algorithm for pattern recognition of behavior and weather data for trial 2</title>
<p>Because the frequency of hot weather in Trial 2 is lower than in Trial 1, and the duration of dataset in Trial 2 is shorter than in Trial 1 (less than one month), two-day continuous patterns are included in the results. In period <italic>P</italic><sub>1</sub> (5:00 AM to 8:00 AM and 5:00 PM to 8:00 PM), utilizing average daily rate, CM-SPAM algorithm identified 71.43% of animals exhibited a two-day continuous pattern between hot weather and low in movement rate levels. Among these, 42.86% show three-day continuous pattern. Meanwhile, 28.57% of animals did not display any continuous patterns (two-day, three-day or four-day) related to hot weather and low movement rate (<xref ref-type="fig" rid="f11"><bold>Figures&#xa0;11</bold></xref>&#x2013;<xref ref-type="fig" rid="f14"><bold>14</bold></xref>). When considering average daily activity as a behavior metric, 28.57% of animals show a two-day continuous pattern, while the rest did not show any connection between hot weather and low activity (<xref ref-type="fig" rid="f15"><bold>Figure&#xa0;15</bold></xref>). CM-SPAM is unable to detect any pattern linking hot weather and distance travelled to water, with 100% of animals showing no relationship (<xref ref-type="table" rid="T5"><bold>Table&#xa0;5</bold></xref>).</p>
<fig id="f11" position="float">
<label>Figure 11</label>
<caption>
<p>Average movement rates of cows with two-day continuous patterns and the average rates of cows without continuous patterns (two-day, three-day and four-day) in period <inline-formula>
<mml:math display="inline" id="im62"><mml:mrow><mml:msub><mml:mi>P</mml:mi><mml:mn>1</mml:mn></mml:msub></mml:mrow></mml:math></inline-formula> of Trial 2. Daily maximum heat index helps identify hot periods.</p>
</caption>
<graphic mimetype="image" mime-subtype="tiff" xlink:href="fanim-06-1640550-g011.tif">
<alt-text content-type="machine-generated">Line graph depicting average movement rates of animals with and without continuous patterns against maximum heat index, from July to September. Blue lines indicate two-day continuous patterns, purple lines show patterns without four, three, and two-day continuity. Color-coded dots mark weather conditions: red for hot, purple for medium, and green for cool days. Dual y-axes display maximum heat index in degrees Celsius and average movement rate in meters per minute.</alt-text>
</graphic>
</fig>
<fig id="f12" position="float">
<label>Figure 12</label>
<caption>
<p>Average movement rates of cows with three-day continuous patterns and the average rates of cows without continuous patterns (two-day, three-day and four-day) in period <inline-formula>
<mml:math display="inline" id="im63"><mml:mrow><mml:msub><mml:mi>P</mml:mi><mml:mn>1</mml:mn></mml:msub></mml:mrow></mml:math></inline-formula> of Trial 2. Daily maximum heat index helps identify periods of hot weather.</p>
</caption>
<graphic mimetype="image" mime-subtype="tiff" xlink:href="fanim-06-1640550-g012.tif">
<alt-text content-type="machine-generated">Line graph showing the relationship between animal movement rates and heat index from July to September. Blue lines with crosses indicate movement with three-day patterns, and purple lines with diamonds indicate movement without continuous patterns. Green lines and icons represent the maximum heat index, with varying colors for hot, medium, and cool weather days. The x-axis shows Julian dates, and the y-axis shows the maximum heat index and average movement rate.</alt-text>
</graphic>
</fig>
<fig id="f13" position="float">
<label>Figure 13</label>
<caption>
<p>Three-day continuous patterns using the movement rate metric for cow ID 9128 in Trial 2 during period <inline-formula>
<mml:math display="inline" id="im64"><mml:mrow><mml:msub><mml:mi>P</mml:mi><mml:mn>1</mml:mn></mml:msub></mml:mrow></mml:math></inline-formula>, with detected patterns highlighted.</p>
</caption>
<graphic mimetype="image" mime-subtype="tiff" xlink:href="fanim-06-1640550-g013.tif">
<alt-text content-type="machine-generated">Line chart showing maximum heat index and average daily movement rate from July to September. Movement rates are categorized as slight, low, medium, and high, with colored markers. Yellow bands indicate pattern appearances. Weather days are marked as hot, medium, or cool.</alt-text>
</graphic>
</fig>
<fig id="f14" position="float">
<label>Figure 14</label>
<caption>
<p>Two-day continuous patterns using movement rate metric for cow ID 9128 in Trial 2 during period <inline-formula>
<mml:math display="inline" id="im65"><mml:mrow><mml:msub><mml:mi>P</mml:mi><mml:mn>1</mml:mn></mml:msub></mml:mrow></mml:math></inline-formula>, with detected patterns highlighted.</p>
</caption>
<graphic mimetype="image" mime-subtype="tiff" xlink:href="fanim-06-1640550-g014.tif">
<alt-text content-type="machine-generated">Line graph displaying maximum heat index and average daily movement rates from July to September. Different symbols and colors represent slight, low, medium, and high movement rates. Vertical bands indicate pattern occurrences. The X-axis shows Julian dates, while the Y-axis presents heat index in degrees Celsius and movement rate in meters per minute.</alt-text>
</graphic>
</fig>
<fig id="f15" position="float">
<label>Figure 15</label>
<caption>
<p>Two-day continuous patterns using activity metric for cow ID 67 in Trial 2 during period <inline-formula>
<mml:math display="inline" id="im66"><mml:mrow><mml:msub><mml:mi>P</mml:mi><mml:mn>1</mml:mn></mml:msub></mml:mrow></mml:math></inline-formula>, with detected patterns highlighted.</p>
</caption>
<graphic mimetype="image" mime-subtype="tiff" xlink:href="fanim-06-1640550-g015.tif">
<alt-text content-type="machine-generated">Line graph depicting maximum heat index and average daily activity from July to September. Heat index in Celsius is on the left, with various weather conditions marked by colored symbols. Average daily activity is shown on the right. Patterns are marked by vertical bars.</alt-text>
</graphic>
</fig>
<table-wrap id="T5" position="float">
<label>Table&#xa0;5</label>
<caption>
<p>Percentage of cows with patterns during <inline-formula>
<mml:math display="inline" id="im67"><mml:mrow><mml:msub><mml:mi>P</mml:mi><mml:mn>1</mml:mn></mml:msub></mml:mrow></mml:math></inline-formula> in Trial 2 for the behavior metrics: average daily movement rate, average daily activity and average daily distance travelled. Identification numbers (ID) of cows that display patterns in Trial 2 are listed.</p>
</caption>
<table frame="hsides">
<thead>
<tr>
<th valign="middle" align="left">Patterns</th>
<th valign="middle" align="left">Average daily movement rate</th>
<th valign="middle" align="left">Average daily activity</th>
<th valign="middle" align="left">Average daily distance traveled from water</th>
</tr>
</thead>
<tbody>
<tr>
<td valign="middle" align="left">Four-day continuous pattern</td>
<td valign="middle" align="center">0%</td>
<td valign="middle" align="center">0%</td>
<td valign="middle" align="center">0%</td>
</tr>
<tr>
<td valign="middle" align="left">Three-day continuous pattern</td>
<td valign="middle" align="center">42.86%<break/>Animal ID:<break/>67,515,9128</td>
<td valign="middle" align="center">0%</td>
<td valign="middle" align="center">0%</td>
</tr>
<tr>
<td valign="middle" align="left">Two-day continuous pattern</td>
<td valign="middle" align="center">71.43%<break/>Animal ID:<break/>67,515,9128, 996,830</td>
<td valign="middle" align="center">28.57%<break/>Animal ID:<break/>67,685</td>
<td valign="middle" align="center">0%</td>
</tr>
<tr>
<td valign="middle" align="left">No Four-day, Three-day and Two-day continuous patterns</td>
<td valign="middle" align="center">28.57%<break/>Animal ID:<break/>685,51</td>
<td valign="middle" align="center">71.43%<break/>Animal ID:<break/>515,9128, 51,996,830</td>
<td valign="middle" align="center">100%<break/>Animal ID:<break/>67,685,515,996,9128,51,830</td>
</tr>
</tbody>
</table>
<table-wrap-foot>
<fn>
<p>Cows that have three-day continuous patterns also have two-day continuous patterns.</p></fn>
</table-wrap-foot>
</table-wrap>
<p>During period <italic>P</italic><sub>2</sub> (5:00 AM to 8:00 PM), no three-day continuous patterns were observed when using three behavior metrics. When average daily rate is used to represent the behavior, 42.86% of animals showed a two-day continuous pattern, while 57.14% of animals did not exhibit any continuous patterns (two-day, three-day or four-day) associated with hot weather and low movement rate. Similarly, CM-SPAM detected that 42.86% of animals showed two-day continuous pattern between hot weather and low activity, while the remaining animals showed no continuous patterns. Like in period <italic>P</italic><sub>1</sub>, CM-SPAM did not detect any continuous patterns between hot weather and reduced distance travelled to water, with 100% of animals showing no relationship (<xref ref-type="table" rid="T6"><bold>Table&#xa0;6</bold></xref>).</p>
<table-wrap id="T6" position="float">
<label>Table&#xa0;6</label>
<caption>
<p>Percentage of cows with patterns during period <inline-formula>
<mml:math display="inline" id="im68"><mml:mrow><mml:msub><mml:mi>P</mml:mi><mml:mn>2</mml:mn></mml:msub></mml:mrow></mml:math></inline-formula> of Trial 2 using the behavior metrics: average daily movement rate, average daily activity and average daily distance travelled from water. Identification numbers (ID) of cows displaying patterns are listed.</p>
</caption>
<table frame="hsides">
<thead>
<tr>
<th valign="middle" align="left">Patterns</th>
<th valign="middle" align="center">Average daily movement rate</th>
<th valign="middle" align="center">Average daily activity</th>
<th valign="middle" align="center">Average daily distance travel from water</th>
</tr>
</thead>
<tbody>
<tr>
<td valign="middle" align="left">Four-day continuous pattern</td>
<td valign="middle" align="center">0%</td>
<td valign="middle" align="center">0%</td>
<td valign="middle" align="center">0%</td>
</tr>
<tr>
<td valign="middle" align="left">Three-day continuous pattern</td>
<td valign="middle" align="center">0%</td>
<td valign="middle" align="center">0%</td>
<td valign="middle" align="center">0%</td>
</tr>
<tr>
<td valign="middle" align="left">Two-day continuous pattern</td>
<td valign="middle" align="center">42.86%<break/>Animal ID:<break/>67,515,830</td>
<td valign="middle" align="center">42.86%<break/>Animal ID:<break/>685,515,9128</td>
<td valign="middle" align="center">0%</td>
</tr>
<tr>
<td valign="middle" align="left">No Four-day, Three-day and Two-day continuous pattern</td>
<td valign="middle" align="center">57.14%<break/>Animal ID:<break/>685,9128,51,996</td>
<td valign="middle" align="center">57.14%<break/>Animal ID:<break/>67,51,996,830</td>
<td valign="middle" align="center">100%<break/>Animal ID:<break/>67,685,515,9128,51,996,830</td>
</tr>
</tbody>
</table>
<table-wrap-foot>
<fn>
<p>Cows that have three-day continuous patterns also have two-day continuous patterns.</p></fn>
</table-wrap-foot>
</table-wrap>
<p>When the two-day continuous patterns were detected using movement rate during period <italic>P</italic><sub>1</sub> for five cows out of seven cows, the frequency of decreased rates varied from 78% to 100%, with a mean of 92%. The minimum, maximum and mean values of average decrease in movement rate from the previous cool day within a week before a two-day continuous pattern started or the closest medium weather day to the end of the hot day in the pattern were 1.4 (m/min), 5.52 (m/min) and 3.76 (m/min), respectively. Among five cows, the average difference in movement rate from the cool day to rates during the hot period ranged from 1.4 (m/min) to 5.52 (m/min), with a mean of 3.18 (m/min). For the three cows showing the three-day continuous pattern in period <italic>P</italic><sub>1</sub> using movement rate, the minimum, maximum and mean values for frequency of decrease were 75%, 100% and 92%, respectively. The average decrease in movement rate (the closest cool day within a week before a three-day continuous pattern began or the last medium weather day to the end of the hot day in the pattern) ranged from 1.4 (m/min) to 5.18 (m/min), with a mean of 3.78 (m/min). The minimum, maximum and mean values for the average difference for three-day continuous pattern from the previous cool day within a week before a three-day continuous pattern started or the closest medium weather day were 1.4 (m/min), 5.18 (m/min) and 3.23 (m/min), respectively (<xref ref-type="table" rid="T7"><bold>Table&#xa0;7</bold></xref>).</p>
<table-wrap id="T7" position="float">
<label>Table&#xa0;7</label>
<caption>
<p>Comparison of movement rate changes between the closest cool day within seven days or the closest medium weather day before the first day of the two-day (or three-day) continuous pattern and the second day (or third day) of the two-day (or three-day) continuous pattern during period <inline-formula>
<mml:math display="inline" id="im69"><mml:mrow><mml:msub><mml:mi>P</mml:mi><mml:mn>1</mml:mn></mml:msub></mml:mrow></mml:math></inline-formula> in Trial 2, including minimum, maximum and mean values for the frequency of decreased movement rate, average of movement rate decrease (prior to until the end), and overall movement rate differences (prior to versus hot period) for animals with two-day (or three-day) continuous patterns, along with the number of animals <inline-formula>
<mml:math display="inline" id="im70"><mml:mi>n</mml:mi></mml:math></inline-formula> having the minimum and maximum values.</p>
</caption>
<table frame="hsides">
<thead>
<tr>
<th valign="middle" align="left">Comparison metrics</th>
<th valign="middle" align="left">Measures</th>
<th valign="middle" align="left">Two-day continuous pattern</th>
<th valign="middle" align="left">Three-day continuous pattern</th>
</tr>
</thead>
<tbody>
<tr>
<td valign="middle" rowspan="3" align="left">Frequency of Decrease in Movement Rate</td>
<td valign="middle" align="left">Minimum</td>
<td valign="middle" align="left">78% (<italic>n</italic>=1)</td>
<td valign="middle" align="left">75% (<italic>n</italic>=1)</td>
</tr>
<tr>
<td valign="middle" align="left">Maximum</td>
<td valign="middle" align="left">100% (<italic>n</italic>=3)</td>
<td valign="middle" align="left">100% (<italic>n</italic>=2)</td>
</tr>
<tr>
<td valign="middle" align="left">Mean</td>
<td valign="middle" align="left">92%</td>
<td valign="middle" align="left">92%</td>
</tr>
<tr>
<td valign="middle" rowspan="3" align="left">Average Decrease in Movement Rate (m/min)</td>
<td valign="middle" align="left">Minimum</td>
<td valign="middle" align="left">1.4 (<italic>n</italic>=1)</td>
<td valign="middle" align="left">1.4 (<italic>n</italic>=1)</td>
</tr>
<tr>
<td valign="middle" align="left">Maximum</td>
<td valign="middle" align="left">5.52 (<italic>n</italic>=1)</td>
<td valign="middle" align="left">5.18 (<italic>n</italic>=1)</td>
</tr>
<tr>
<td valign="middle" align="left">Mean</td>
<td valign="middle" align="left">3.76</td>
<td valign="middle" align="left">3.78</td>
</tr>
<tr>
<td valign="middle" rowspan="3" align="left">Average Difference in Movement Rate (m/min)</td>
<td valign="middle" align="left">Minimum</td>
<td valign="middle" align="left">1.4 (<italic>n</italic>=1)</td>
<td valign="middle" align="left">1.4 (<italic>n</italic>=1)</td>
</tr>
<tr>
<td valign="middle" align="left">Maximum</td>
<td valign="middle" align="left">5.52 (<italic>n</italic>=1)</td>
<td valign="middle" align="left">5.18 (<italic>n</italic>=1)</td>
</tr>
<tr>
<td valign="middle" align="left">Mean</td>
<td valign="middle" align="left">3.18</td>
<td valign="middle" align="left">3.23</td>
</tr>
</tbody>
</table>
</table-wrap>
<p>The binomial probability was calculated during <italic>P</italic><sub>1</sub> period, based on the movement rate behavior metric over the two-day continuous patterns. With <inline-formula>
<mml:math display="inline" id="im71"><mml:mrow><mml:mi>m</mml:mi><mml:mo>=</mml:mo><mml:mn>2</mml:mn></mml:mrow></mml:math></inline-formula>, <inline-formula>
<mml:math display="inline" id="im72"><mml:mrow><mml:mi>n</mml:mi><mml:mo>=</mml:mo><mml:mn>105</mml:mn></mml:mrow></mml:math></inline-formula>, <inline-formula>
<mml:math display="inline" id="im73"><mml:mrow><mml:mi>k</mml:mi><mml:mo>=</mml:mo><mml:mn>49</mml:mn></mml:mrow></mml:math></inline-formula>, we find that <inline-formula>
<mml:math display="inline" id="im74"><mml:mrow><mml:mi>P</mml:mi><mml:mrow><mml:mo stretchy="false">(</mml:mo><mml:mrow><mml:mi>X</mml:mi><mml:mo>=</mml:mo><mml:mn>49</mml:mn></mml:mrow><mml:mo stretchy="false">)</mml:mo></mml:mrow><mml:mo>&lt;</mml:mo><mml:mn>0.0001</mml:mn></mml:mrow></mml:math></inline-formula>.</p>
</sec>
</sec>
<sec id="s5" sec-type="discussion">
<label>5</label>
<title>Discussion</title>
<p>In this study, CM-SPAM was applied to two separate summer trials conducted at the same pasture in different years, 2019 and 2021. Among three behavior metrics, the CM-SPAM algorithm successfully identified a frequent sequential pattern between hot weather and a decrease in movement rate in period <inline-formula>
<mml:math display="inline" id="im75"><mml:mrow><mml:msub><mml:mi>P</mml:mi><mml:mn>1</mml:mn></mml:msub></mml:mrow></mml:math></inline-formula>. The three-day continuous pattern showed that three consecutive hot days led to a decrease in movement rate on the third day during the morning and evening grazing bouts. <xref ref-type="bibr" rid="B19">Hahn (1999)</xref> describes how heat wave episodes (several days of hot weather) affected the ability of feedlot steers to maintain homeothermy. With several days of hot weather, many feedlot steers in the midwestern US succumbed to heat stress. <xref ref-type="bibr" rid="B6">Beatty et&#xa0;al. (2006)</xref> found that cattle exposed to sustained hot temperatures and high humidity levels in controlled climate rooms displayed increased respiration rates and core body temperature after several days. In addition, changes in blood chemistry (imbalance of acid-base and blood electrolytes) of the cattle occurred as a result of sustained high Temperature Humidity Index (THI). Heat index used in our study is similar, or identical, to THI. Although impacts of sustained hot weather are known to adversely affect feedlot cattle (<xref ref-type="bibr" rid="B19">Hahn, 1999</xref>) and cattle being transported in ships (<xref ref-type="bibr" rid="B30">Norris et&#xa0;al., 2003</xref>), little research has been conducted on the effect of consecutive days of hot weather (heat wave) on cattle grazing rangelands. This study uses data mining techniques to show that cattle behavior is affected by consecutive days of hot weather. Cattle in this study moved slower during the primary grazing bouts after two or more days of hot weather (high THI). <xref ref-type="bibr" rid="B21">Islam et&#xa0;al. (2021)</xref> suggested that GPS tracking could be used to remotely monitor cattle for heat stress. More time spent near shade and reduced activity might indicate that thermal conditions might be approaching levels that could adversely affect cattle. <xref ref-type="bibr" rid="B32">Nyamuryekung&#x2019;e et&#xa0;al. (2021)</xref> reported that cattle moved slower during hot weather, but did not examine the effects of consecutive days of hot weather. <xref ref-type="bibr" rid="B42">Wade et&#xa0;al. (2024)</xref> found that the distance travelled by sheep each day decreased during a period of hot weather lasting three days.</p>
<p>Using period <inline-formula>
<mml:math display="inline" id="im76"><mml:mrow><mml:msub><mml:mi>P</mml:mi><mml:mn>1</mml:mn></mml:msub></mml:mrow></mml:math></inline-formula> (morning and evening grazing bouts) is more effective in detecting the relationship between hot weather and a change in behavior compared to period <inline-formula>
<mml:math display="inline" id="im77"><mml:mrow><mml:msub><mml:mi>P</mml:mi><mml:mn>2</mml:mn></mml:msub></mml:mrow></mml:math></inline-formula> (daylight) in both trials. Especially in Trial 1, most animals exhibited a three-day continuous pattern reduced movement rate during period <inline-formula>
<mml:math display="inline" id="im78"><mml:mrow><mml:msub><mml:mi>P</mml:mi><mml:mn>1</mml:mn></mml:msub></mml:mrow></mml:math></inline-formula>, when hot weather persisted for three days. This could be because period <inline-formula>
<mml:math display="inline" id="im79"><mml:mrow><mml:msub><mml:mi>P</mml:mi><mml:mn>1</mml:mn></mml:msub></mml:mrow></mml:math></inline-formula> focuses on the two primary grazing bouts rather than all activity during daylight. Cattle typically reduce feed intake as a response to heat stress (<xref ref-type="bibr" rid="B1">Alves et&#xa0;al., 2020</xref>). The slower movement rates during the primary grazing bouts may reflect decreased grazing intensity and possibly reduced forage intake that would be expected as a response to high cumulative head.</p>
<p>In contrast to our expectations, we did not see reductions in activity or distance travelled from water after consecutive days of hot weather. It is unlikely that the cattle during the study period experienced heat stress. Temperature and humidity levels during the study were likely not great enough to induce heat stress. Instead, the cattle appeared to change at least some of their behaviors during grazing after 2 or more consecutive hot weather. The cattle were still moving during the early morning and evening periods (typical grazing bouts), but at slower rates. Our method for determining activity was based on a threshold of moving or resting over a 10-minute period. Cattle slowed down, but not perhaps the reduced rate was not enough to cross the threshold level and impact calculated activity levels. Distance travelled from water was evaluated as an indirect indicator of water intake. However, this metric may not be sensitive enough to monitor drinking activity. Cattle locations were recorded at 10-min intervals, but the typical time cattle spend drinking at the tank is only 1 or 2 minutes (<xref ref-type="bibr" rid="B39">Tobin et&#xa0;al., 2021b</xref>). Cattle may have drank multiple time while spending time near water, that our GPS tracking might not detect. More direct measures of remotely monitoring water intake such as flow meters or rumen boluses may be needed to evaluate the impact of consecutive days of hot weather on water intake for cattle grazing rangelands.</p>
<p>Compared to Trial 1 where most of animals (90.91%) showed a three-day continuous pattern, only about half of animals (42.86%) shows three-day continuous pattern in Trial 2. This may be because hot weather occurred less frequently in Trial 2 compared to Trial 1. During four months of Trial 1, the breaks between hot days was often shorter than during trial 2 (<xref ref-type="fig" rid="f3"><bold>Figures&#xa0;3</bold></xref>, <xref ref-type="fig" rid="f4"><bold>4</bold></xref>).</p>
<p>Movement rate was a more efficient metric than activity and distance travelled from water when analysing the relationship between cattle behavioral changes and continuous hot weather in both trials. In Trial 1, during the hot weather from Julian dates 236 to 244, animals with three-day and four-day continuous patterns had a consistently low average movement rates compared to animals without any these patterns (<xref ref-type="fig" rid="f5"><bold>Figures&#xa0;5</bold></xref>, <xref ref-type="fig" rid="f6"><bold>6</bold></xref>). It should be note that, in the summary comparison between <xref ref-type="fig" rid="f5"><bold>Figures&#xa0;5</bold></xref> and <xref ref-type="fig" rid="f6"><bold>6</bold></xref>, the average movement rate of animals without patterns appears to be lower than that of animals with patterns. However, this does not impact our analysis because out method was applied to individual animals. The key focus of the comparison is not on the absolute values of movement rates, but rather changes and consistency of behavior (movement rate) of individual animals. This property, observed during the hot weather periods, indicates that animals that were not designated as having a pattern did not meet the minimum support threshold of 0.2 during period <inline-formula>
<mml:math display="inline" id="im80"><mml:mrow><mml:msub><mml:mi>P</mml:mi><mml:mn>1</mml:mn></mml:msub></mml:mrow></mml:math></inline-formula>. In other words, the three-day or four-day continuous pattern did not occur frequently enough to be detected as having a pattern, which explains the difference between the two groups. When examining individual cows, such as cow ID 105, which exhibited three-day (<xref ref-type="fig" rid="f7"><bold>Figure&#xa0;7</bold></xref>) and four-day (<xref ref-type="fig" rid="f8"><bold>Figure&#xa0;8</bold></xref>) continuous pattern, the movement rate metric identified these patterns frequently throughout the hot weather periods. On the other hand, when using the activity metric for cow ID 704 (<xref ref-type="fig" rid="f9"><bold>Figure&#xa0;9</bold></xref>), the three-day continuous pattern was more variable. For cow ID 229 (<xref ref-type="fig" rid="f10"><bold>Figure&#xa0;10</bold></xref>), the distance travelled from water metric did not reveal any connections between hot weather in July and cow behavior. During the longest seven-day continuous hot weather in Trial 2 from Julian dates 214 to 220, animals with two-day and three-day continuous patterns also exhibited consistently low average movement rates compared to those without any continuous patterns (<xref ref-type="fig" rid="f11"><bold>Figures&#xa0;11</bold></xref>, <xref ref-type="fig" rid="f12"><bold>12</bold></xref>). Once again, the key point is the consistency of individual animal responses between the two groups. When examining individual cows, for example cow ID 9128, using movement rate metric, three-day and two-day continuous patterns (<xref ref-type="fig" rid="f13"><bold>Figures&#xa0;13</bold></xref>, <xref ref-type="fig" rid="f14"><bold>14</bold></xref>) were frequently observed across the hot weather period. However, using activity metric for cow ID 67 (<xref ref-type="fig" rid="f15"><bold>Figure&#xa0;15</bold></xref>), the two-day continuous pattern did not appear across all hot weather such as the hot period at the end of August.</p>
<p>Evaluation of changes in individual animals rather than using absolute metric values for detection of livestock behaviors has been recommended in several studies. <xref ref-type="bibr" rid="B40">Tobin et&#xa0;al. (2024)</xref> reported that individual sheep and individual accelerometers varied and that algorithms that evaluated changes of individuals would account for these sources of variation. <xref ref-type="bibr" rid="B14">Chang et&#xa0;al. (2022)</xref> reported that the accuracy of detecting cattle rumination improved 86% to 98% when using an individual animal model compared to a generic model for all animals. Using data mining, <xref ref-type="bibr" rid="B41">Trieu et&#xa0;al. (2025)</xref> was able to detect bovine ephemeral fever by evaluating the accelerometer streams of individual heifers and cows. In this study, the data mining approach must evaluate the changes in movement rates and other behavior metrics on an individual basis, because measured rates, activity and distances travelled from water vary among cows in both cool and hot weather. We are not aware of any studies that have used this data mining approach to study cumulative impacts of consecutive days of hot weather on cattle movements and activity. Data mining may be useful to identify patterns in cattle behavior that may be difficult to identify using traditional statistical techniques. The use of data mining for evaluating patterns in cattle behavior and responses to variable weather conditions deserves further exploration.</p>
<p>The mean values for both average decrease movement rates prior to and at the end of the hot period and the average difference in movement rate (before and during hot periods) that occurred in Trial 2 were lower than those in Trial 1. This is likely because Trail 2 had a shorter duration, and the length of hot weather periods were shorter. Cows may have varying tolerances to hot weather, and the movement rate often decreased by around 4 to 5 m/min with a maximum of 8 m/min during consecutive days of hot weather and patterns were detected (Trial 1). The mean value in frequency of decreased movement rates for three-day continuous pattern is higher than or equal to that of two-day and four-day continuous patterns. Additionally, the mean values for both the average decrease and the average difference in longer continuous patterns are slightly higher than in shorter ones. In Trial 1, the four-day continuous pattern shows a higher mean for both the average decrease in rate (prior to until the last day) and difference (average decrease in rate) compared to the three-day continuous pattern. Similarly, in Trial 2, the three-day continuous pattern shows a slightly higher mean values for decrease and difference than the two-day continuous pattern (<xref ref-type="table" rid="T4"><bold>Tables&#xa0;4</bold></xref>, <xref ref-type="table" rid="T7"><bold>7</bold></xref>). The smaller sample size in Trial 2 compared to Trial 1 also could potentially affect differences in movement rates between the two studies. However, the very low binomial probability values observed in both Trials 1 and 2 during period <inline-formula>
<mml:math display="inline" id="im81"><mml:mrow><mml:msub><mml:mi>P</mml:mi><mml:mn>1</mml:mn></mml:msub></mml:mrow></mml:math></inline-formula> based on movement rate behavior indicate that the detected continuous patterns in our work are unlikely to have occurred by chance and are therefore considered statistically significant. As a result, these findings support our identification of frequent sequential patterns between consecutive day of hot weather conditions and cattle behavior. When considering both trials, these findings suggest that continued hot weather (long heat waves) may have a greater impact on grazing cattle than shorter heat waves.</p>
</sec>
<sec id="s6" sec-type="conclusions">
<label>6</label>
<title>Conclusion</title>
<p>In this study, GPS tracking and weather data were utilized to examine how hot weather affects cattle behaviors. K-means clustering was applied to categorize weather conditions into three levels (cool, medium, hot), while metrics from GPS tracking (movement rate, activity, and distance travelled from water) were categorized into four levels (low, slight, medium, high). CM-SPAM algorithm in data mining was applied to identify the relationship and successfully detected that consecutive hot days negatively affect cattle behavior, particularly reducing movement rate during the typical morning and evening grazing bouts. The data mining algorithm identified long-term responses, including two-day, three-day, or four-day continuous patterns in cattle movement in response to consecutive hot weather. Movement rates during the morning and evening grazing bouts decreased during 2 to 4 days consecutive days of hot weather. Data mining approaches may be a useful tool for evaluating behavioral impacts of heat waves. Ranchers should be aware that consecutive days of hot weather may have a greater impact on cattle behavior than a single day of hot conditions.</p>
</sec>
</body>
<back>
<sec id="s7" sec-type="data-availability">
<title>Data availability statement</title>
<p>The raw data supporting the conclusions of this article will be made available by the authors, without undue reservation.</p>
</sec>
<sec id="s8" sec-type="ethics-statement">
<title>Ethics statement</title>
<p>The protocol for this study was approved by the New Mexico State University Institutional Animal Care and Use Committee (approval number 2019-021). The study was conducted in accordance with the local legislation and institutional requirements.</p>
</sec>
<sec id="s9" sec-type="author-contributions">
<title>Author contributions</title>
<p>LT: Conceptualization, Data curation, Formal analysis, Investigation, Methodology, Resources, Validation, Visualization, Writing &#x2013; original draft, Writing &#x2013; review &amp; editing. DB: Conceptualization, Data curation, Funding acquisition, Investigation, Methodology, Project administration, Resources, Supervision, Validation, Visualization, Writing &#x2013; original draft, Writing &#x2013; review &amp; editing. HC: Conceptualization, Formal analysis, Investigation, Methodology, Resources, Validation, Visualization, Writing &#x2013; original draft, Writing &#x2013; review &amp; editing. TCS: Conceptualization, Funding acquisition, Project administration, Supervision, Writing &#x2013; original draft, Writing &#x2013; review &amp; editing. CT: Data curation, Investigation, Methodology, Resources, Writing &#x2013; original draft, Writing &#x2013; review &amp; editing. CO: Data curation, Investigation, Resources, Writing &#x2013; original draft.</p>
</sec>
<sec id="s11" sec-type="COI-statement">
<title>Conflict of interest</title>
<p>The authors declare that the research was conducted in the absence of any commercial or financial relationships that could be construed as a potential conflict of interest.</p>
</sec>
<sec id="s12" sec-type="ai-statement">
<title>Generative AI statement</title>
<p>The author(s) declare that no Generative AI was used in the creation of this manuscript.</p>
<p>Any alternative text (alt text) provided alongside figures in this article has been generated by Frontiers with the support of artificial intelligence and reasonable efforts have been made to ensure accuracy, including review by the authors wherever possible. If you identify any issues, please contact us.</p>
</sec>
<sec id="s13" sec-type="disclaimer">
<title>Publisher&#x2019;s note</title>
<p>All claims expressed in this article are solely those of the authors and do not necessarily represent those of their affiliated organizations, or those of the publisher, the editors and the reviewers. Any product that may be evaluated in this article, or claim that may be made by its manufacturer, is not guaranteed or endorsed by the publisher.</p>
</sec>
<ref-list>
<title>References</title>
<ref id="B1">
<mixed-citation publication-type="journal">
<person-group person-group-type="author">
<name><surname>Alves</surname> <given-names>J. R. A.</given-names></name>
<name><surname>de Andrade</surname> <given-names>T. A. A.</given-names></name>
<name><surname>de Medeiros Assis</surname> <given-names>D.</given-names></name>
<name><surname>Gurj&#xe3;o</surname> <given-names>T. A.</given-names></name>
<name><surname>de Melo</surname> <given-names>L. R. B.</given-names></name>
<name><surname>de Souza</surname> <given-names>B. B.</given-names></name>
</person-group> (<year>2020</year>). 
<article-title>Productive and reproductive performance, behavior and physiology of cattle under heat stress conditions</article-title>. <source>J. Anim. Behav. Biometeorol.</source> <volume>5</volume>, <fpage>91</fpage>&#x2013;<lpage>96</lpage>. doi:&#xa0;<pub-id pub-id-type="doi">10.31893/2318-1265jabb.v5n3p91-96</pub-id>
</mixed-citation>
</ref>
<ref id="B2">
<mixed-citation publication-type="journal">
<person-group person-group-type="author">
<name><surname>Augustine</surname> <given-names>D. J.</given-names></name>
<name><surname>Derner</surname> <given-names>J. D.</given-names></name>
</person-group> (<year>2013</year>). 
<article-title>Assessing herbivore foraging behavior with GPS collars in a semiarid grassland</article-title>. <source>Sensors</source> <volume>13</volume>, <fpage>3711</fpage>&#x2013;<lpage>3723</lpage>. doi:&#xa0;<pub-id pub-id-type="doi">10.3390/s130303711</pub-id>, PMID: <pub-id pub-id-type="pmid">23503296</pub-id>
</mixed-citation>
</ref>
<ref id="B3">
<mixed-citation publication-type="confproc">
<person-group person-group-type="author">
<name><surname>Ayres</surname> <given-names>J.</given-names></name>
<name><surname>Flannick</surname> <given-names>J.</given-names></name>
<name><surname>Gehrke</surname> <given-names>J.</given-names></name>
<name><surname>Yiu</surname> <given-names>T.</given-names></name>
</person-group> (<year>2002</year>). &#x201c;
<article-title>Sequential pattern mining using a bitmap representation</article-title>,&#x201d; in <conf-name>Proceedings of the Eighth ACM SIGKDD International Conference on Knowledge Discovery and Data Mining</conf-name>. <publisher-loc>New York, NY:</publisher-loc>
<publisher-name>Association for Computing Machinery</publisher-name>. <fpage>429</fpage>&#x2013;<lpage>435</lpage>.
</mixed-citation>
</ref>
<ref id="B4">
<mixed-citation publication-type="book">
<person-group person-group-type="author">
<name><surname>Bailey</surname> <given-names>D. W.</given-names></name>
</person-group> (<year>2016</year>). &#x201c;
<article-title>Grazing and animal distribution</article-title>,&#x201d; in <source>Animal welfare in Extensive Production Systems. The Animal Welfare Series</source> (
<publisher-name>5M Publishing</publisher-name>, <publisher-loc>Sheffield (UK</publisher-loc>), <fpage>53</fpage>&#x2013;<lpage>77</lpage>.
</mixed-citation>
</ref>
<ref id="B5">
<mixed-citation publication-type="journal">
<person-group person-group-type="author">
<name><surname>Bailey</surname> <given-names>D. W.</given-names></name>
<name><surname>Trotter</surname> <given-names>M. G.</given-names></name>
<name><surname>Knight</surname> <given-names>C. W.</given-names></name>
<name><surname>Thomas</surname> <given-names>M. G.</given-names></name>
</person-group> (<year>2018</year>). 
<article-title>Use of GPS tracking collars and accelerometers for rangeland livestock production research</article-title>. <source>Trans. Anim. Sci.</source> <volume>2</volume>, <fpage>81</fpage>&#x2013;<lpage>88</lpage>. doi:&#xa0;<pub-id pub-id-type="doi">10.1093/tas/txx006</pub-id>, PMID: <pub-id pub-id-type="pmid">32704691</pub-id>
</mixed-citation>
</ref>
<ref id="B6">
<mixed-citation publication-type="journal">
<person-group person-group-type="author">
<name><surname>Beatty</surname> <given-names>D. T.</given-names></name>
<name><surname>Barnes</surname> <given-names>A.</given-names></name>
<name><surname>Taylor</surname> <given-names>E.</given-names></name>
<name><surname>Pethick</surname> <given-names>D.</given-names></name>
<name><surname>McCarthy</surname> <given-names>M.</given-names></name>
<name><surname>Maloney</surname> <given-names>S. K.</given-names></name>
</person-group> (<year>2006</year>). 
<article-title>Physiological responses of Bos taurus and Bos indicus cattle to prolonged, continuous heat and humidity</article-title>. <source>J. Anim. Sci.</source> <volume>84</volume>, <fpage>972</fpage>&#x2013;<lpage>985</lpage>. doi:&#xa0;<pub-id pub-id-type="doi">10.2527/2006.844972x</pub-id>, PMID: <pub-id pub-id-type="pmid">16543576</pub-id>
</mixed-citation>
</ref>
<ref id="B7">
<mixed-citation publication-type="journal">
<person-group person-group-type="author">
<name><surname>Becker</surname> <given-names>C. A.</given-names></name>
<name><surname>Aghalari</surname> <given-names>A.</given-names></name>
<name><surname>Marufuzzaman</surname> <given-names>M.</given-names></name>
<name><surname>Stone</surname> <given-names>A. E.</given-names></name>
</person-group> (<year>2021</year>). 
<article-title>Predicting dairy cattle heat stress using machine learning techniques</article-title>. <source>J. Dairy. Sci.</source> <volume>104</volume>, <fpage>501</fpage>&#x2013;<lpage>524</lpage>. doi:&#xa0;<pub-id pub-id-type="doi">10.3168/jds.2020-18653</pub-id>, PMID: <pub-id pub-id-type="pmid">33131806</pub-id>
</mixed-citation>
</ref>
<ref id="B8">
<mixed-citation publication-type="journal">
<person-group person-group-type="author">
<name><surname>Becker</surname> <given-names>C. A.</given-names></name>
<name><surname>Collier</surname> <given-names>R. J.</given-names></name>
<name><surname>Stone</surname> <given-names>A. E.</given-names></name>
</person-group> (<year>2020</year>). 
<article-title>Invited review: Physiological and behavioral effects of heat stress in dairy cows</article-title>. <source>J. Dairy. Sci.</source> <volume>103</volume>, <fpage>6751</fpage>&#x2013;<lpage>6770</lpage>. doi:&#xa0;<pub-id pub-id-type="doi">10.3168/jds.2019-17929</pub-id>, PMID: <pub-id pub-id-type="pmid">32448584</pub-id>
</mixed-citation>
</ref>
<ref id="B9">
<mixed-citation publication-type="journal">
<person-group person-group-type="author">
<name><surname>Berman</surname> <given-names>A.</given-names></name>
</person-group> (<year>2019</year>). 
<article-title>An overview of heat stress relief with global warming in perspective</article-title>. <source>Int. J. Biometeorol.</source> <volume>63</volume>, <fpage>493</fpage>&#x2013;<lpage>498</lpage>. doi:&#xa0;<pub-id pub-id-type="doi">10.1007/s00484-019-01680-7</pub-id>, PMID: <pub-id pub-id-type="pmid">30739158</pub-id>
</mixed-citation>
</ref>
<ref id="B10">
<mixed-citation publication-type="book">
<person-group person-group-type="author">
<name><surname>Bertsekas</surname> <given-names>D. P.</given-names></name>
</person-group> (<year>1991</year>). <source>Linear network optimization</source>.  
<publisher-name>MIT Press</publisher-name>, <publisher-loc>Cambridge</publisher-loc>.
</mixed-citation>
</ref>
<ref id="B11">
<mixed-citation publication-type="book">
<person-group person-group-type="author">
<name><surname>Bishop</surname> <given-names>C. M.</given-names></name>
<name><surname>Nasrabadi</surname> <given-names>N. M.</given-names></name>
</person-group> (<year>2006</year>). <source>Pattern recognition and machine learning</source> Vol. <volume>4</volume> (
<publisher-name>New York: Springer</publisher-name>).
</mixed-citation>
</ref>
<ref id="B12">
<mixed-citation publication-type="journal">
<person-group person-group-type="author">
<name><surname>Bradley</surname> <given-names>P. S.</given-names></name>
<name><surname>Bennett</surname> <given-names>K. P.</given-names></name>
<name><surname>Demiriz</surname> <given-names>A.</given-names></name>
</person-group> (<year>2000</year>). 
<article-title>Constrained k-means clustering</article-title>. <source>Microsoft. Res. Redmond.</source> <volume>20</volume>, <fpage>0</fpage>.
</mixed-citation>
</ref>
<ref id="B13">
<mixed-citation publication-type="journal">
<person-group person-group-type="author">
<name><surname>Branco</surname> <given-names>T.</given-names></name>
<name><surname>de Moura</surname> <given-names>D. J.</given-names></name>
<name><surname>de Alencar N&#xe4;&#xe4;s</surname> <given-names>I.</given-names></name>
<name><surname>da Silva Lima</surname> <given-names>N. D.</given-names></name>
<name><surname>Klein</surname> <given-names>D. R.</given-names></name>
<name><surname>Oliveira</surname> <given-names>S.R. de M.</given-names></name>
</person-group> (<year>2021</year>). 
<article-title>The sequential behavior pattern analysis of broiler chickens exposed to heat stress</article-title>. <source>AgriEngineering</source> <volume>3</volume>, <fpage>447</fpage>&#x2013;<lpage>457</lpage>. doi:&#xa0;<pub-id pub-id-type="doi">10.3390/agriengineering3030030</pub-id>
</mixed-citation>
</ref>
<ref id="B14">
<mixed-citation publication-type="journal">
<person-group person-group-type="author">
<name><surname>Chang</surname> <given-names>A. Z.</given-names></name>
<name><surname>Fogarty</surname> <given-names>E. S.</given-names></name>
<name><surname>Moraes</surname> <given-names>L. E.</given-names></name>
<name><surname>Garc&#xed;a-Guerra</surname> <given-names>A.</given-names></name>
<name><surname>Swain</surname> <given-names>D. L.</given-names></name>
<name><surname>Trotter</surname> <given-names>M. G.</given-names></name>
</person-group> (<year>2022</year>). 
<article-title>Detection of rumination in cattle using an accelerometer ear-tag: A comparison of analytical methods and individual animal and generic models</article-title>. <source>Comput. Electron. Agric.</source> <volume>192</volume>, <elocation-id>106595</elocation-id>. doi:&#xa0;<pub-id pub-id-type="doi">10.1016/j.compag.2021.106595</pub-id>
</mixed-citation>
</ref>
<ref id="B15">
<mixed-citation publication-type="book">
<person-group person-group-type="author">
<name><surname>Fournier-Viger</surname> <given-names>P.</given-names></name>
<name><surname>Gomariz</surname> <given-names>A.</given-names></name>
<name><surname>Campos</surname> <given-names>M.</given-names></name>
<name><surname>Thomas</surname> <given-names>R.</given-names></name>
</person-group> (<year>2014</year>). &#x201c;
<article-title>Fast vertical mining of sequential patterns using co-occurrence information</article-title>,&#x201d; in <source>Advances in Knowledge Discovery and Data Mining: 18th Pacific-Asia Conference, PAKDD 2014, Tainan, Taiwan, May 13-16, 2014. Proceedings, Part I 18</source>. Eds. 
<person-group person-group-type="editor">
<name><surname>T.</surname> <given-names>B.</given-names></name>
<name><surname>Z.</surname> <given-names>Z.-H.</given-names></name>
<name><surname>C.</surname> <given-names>A. L. P.</given-names></name>
<name><surname>K.</surname> <given-names>H.-Y.</given-names></name>
<name><surname>Tseng</surname> <given-names>V. S.</given-names></name>
<name><surname>Ho</surname></name>
</person-group>
<publisher-name>Cham</publisher-name>, <publisher-loc>Springer</publisher-loc>. <fpage>40</fpage>&#x2013;<lpage>52</lpage>. doi:&#xa0;<pub-id pub-id-type="doi">10.1007/978-3-319-06608-0_4</pub-id>
</mixed-citation>
</ref>
<ref id="B16">
<mixed-citation publication-type="journal">
<person-group person-group-type="author">
<name><surname>Fournier-Viger</surname> <given-names>P.</given-names></name>
<name><surname>Lin</surname> <given-names>J. C.-W.</given-names></name>
<name><surname>Kiran</surname> <given-names>R. U.</given-names></name>
<name><surname>Koh</surname> <given-names>Y. S.</given-names></name>
<name><surname>Thomas</surname> <given-names>R.</given-names></name>
</person-group> (<year>2017</year>). 
<article-title>A survey of sequential pattern mining</article-title>. <source>Data Sci. Pattern Recogn.</source> <volume>1</volume>, <fpage>54</fpage>&#x2013;<lpage>77</lpage>.
</mixed-citation>
</ref>
<ref id="B17">
<mixed-citation publication-type="journal">
<person-group person-group-type="author">
<name><surname>Gonzalez-Rivas</surname> <given-names>P. A.</given-names></name>
<name><surname>Chauhan</surname> <given-names>S. S.</given-names></name>
<name><surname>Ha</surname> <given-names>M.</given-names></name>
<name><surname>Fegan</surname> <given-names>N.</given-names></name>
<name><surname>Dunshea</surname> <given-names>F. R.</given-names></name>
<name><surname>Warner</surname> <given-names>R. D.</given-names></name>
</person-group> (<year>2020</year>). 
<article-title>Effects of heat stress on animal physiology, metabolism, and meat quality: A review</article-title>. <source>Meat. Sci.</source> <volume>162</volume>, <elocation-id>108025</elocation-id>. doi:&#xa0;<pub-id pub-id-type="doi">10.1016/j.meatsci.2019.108025</pub-id>, PMID: <pub-id pub-id-type="pmid">31841730</pub-id>
</mixed-citation>
</ref>
<ref id="B18">
<mixed-citation publication-type="journal">
<person-group person-group-type="author">
<name><surname>Gorczyca</surname> <given-names>M. T.</given-names></name>
<name><surname>Gebremedhin</surname> <given-names>K. G.</given-names></name>
</person-group> (<year>2020</year>). 
<article-title>Ranking of environmental heat stressors for dairy cows using machine learning algorithms</article-title>. <source>Comput. Electron. Agric.</source> <volume>168</volume>, <fpage>105124</fpage>. doi:&#xa0;<pub-id pub-id-type="doi">10.1016/j.compag.2019.105124</pub-id>
</mixed-citation>
</ref>
<ref id="B19">
<mixed-citation publication-type="journal">
<person-group person-group-type="author">
<name><surname>Hahn</surname> <given-names>G. L.</given-names></name>
</person-group> (<year>1999</year>). 
<article-title>Dynamic responses of cattle to thermal heat loads</article-title>. <source>J. Anim. Sci.</source> <volume>77</volume>, <fpage>10</fpage>&#x2013;<lpage>20</lpage>. doi:&#xa0;<pub-id pub-id-type="doi">10.2527/1997.77suppl_210x</pub-id>, PMID: <pub-id pub-id-type="pmid">15526777</pub-id>
</mixed-citation>
</ref>
<ref id="B20">
<mixed-citation publication-type="book">
<person-group person-group-type="author">
<name><surname>Han</surname> <given-names>J.</given-names></name>
<name><surname>Kamber</surname> <given-names>M.</given-names></name>
<name><surname>Pei</surname> <given-names>J.</given-names></name>
</person-group> (<year>2011</year>). <source>Data Mining: Concepts and Techniques</source>. <edition>3rd ed</edition> (
<publisher-name>San Francisco: Morgan Kaufmann Publishers Inc</publisher-name>).
</mixed-citation>
</ref>
<ref id="B21">
<mixed-citation publication-type="journal">
<person-group person-group-type="author">
<name><surname>Islam</surname> <given-names>M. A.</given-names></name>
<name><surname>Lomax</surname> <given-names>S.</given-names></name>
<name><surname>Doughty</surname> <given-names>A.</given-names></name>
<name><surname>Islam</surname> <given-names>M. R.</given-names></name>
<name><surname>Jay</surname> <given-names>O.</given-names></name>
<name><surname>Thomson</surname> <given-names>P.</given-names></name>
<etal/>
</person-group>. (<year>2021</year>). 
<article-title>Automated monitoring of cattle heat stress and its mitigation</article-title>. <source>Front. Anim. Sci.</source> <volume>2</volume>, <elocation-id>737213</elocation-id>. doi:&#xa0;<pub-id pub-id-type="doi">10.3389/fanim.2021.737213</pub-id>
</mixed-citation>
</ref>
<ref id="B22">
<mixed-citation publication-type="journal">
<person-group person-group-type="author">
<name><surname>Kilgour</surname> <given-names>R. J.</given-names></name>
<name><surname>Uetake</surname> <given-names>K.</given-names></name>
<name><surname>Ishiwata</surname> <given-names>T.</given-names></name>
<name><surname>Melville</surname> <given-names>G. J.</given-names></name>
</person-group> (<year>2012</year>). 
<article-title>The behaviour of beef cattle at pasture</article-title>. <source>Appl. Anim. Behav. Sci.</source> <volume>138</volume>, <fpage>12</fpage>&#x2013;<lpage>17</lpage>. doi:&#xa0;<pub-id pub-id-type="doi">10.1016/j.applanim.2011.12.001</pub-id>
</mixed-citation>
</ref>
<ref id="B23">
<mixed-citation publication-type="journal">
<person-group person-group-type="author">
<name><surname>Knight</surname> <given-names>C. W.</given-names></name>
<name><surname>Bailey</surname> <given-names>D. W.</given-names></name>
<name><surname>Faulkner</surname> <given-names>D.</given-names></name>
</person-group> (<year>2018</year>). 
<article-title>Low-cost global positioning system tracking collars for use on cattle</article-title>. <source>Rangeland. Ecol. Manage.</source> <volume>71</volume>, <fpage>506</fpage>&#x2013;<lpage>508</lpage>. doi:&#xa0;<pub-id pub-id-type="doi">10.1016/j.rama.2018.04.003</pub-id>
</mixed-citation>
</ref>
<ref id="B24">
<mixed-citation publication-type="journal">
<person-group person-group-type="author">
<name><surname>Liakos</surname> <given-names>K. G.</given-names></name>
<name><surname>Busato</surname> <given-names>P.</given-names></name>
<name><surname>Moshou</surname> <given-names>D.</given-names></name>
<name><surname>Pearson</surname> <given-names>S.</given-names></name>
<name><surname>Bochtis</surname> <given-names>D.</given-names></name>
</person-group> (<year>2018</year>). 
<article-title>Machine learning in agriculture: A review</article-title>. <source>Sensors</source> <volume>18</volume>, <fpage>2674</fpage>. doi:&#xa0;<pub-id pub-id-type="doi">10.3390/s18082674</pub-id>, PMID: <pub-id pub-id-type="pmid">30110960</pub-id>
</mixed-citation>
</ref>
<ref id="B25">
<mixed-citation publication-type="journal">
<person-group person-group-type="author">
<name><surname>Mia</surname> <given-names>N.</given-names></name>
<name><surname>Sarker</surname> <given-names>T.</given-names></name>
<name><surname>Halim</surname> <given-names>M. A.</given-names></name>
<name><surname>Alam</surname> <given-names>A.</given-names></name>
<name><surname>Ali</surname> <given-names>M. S.</given-names></name>
<name><surname>Rahman</surname> <given-names>M. M.</given-names></name>
<etal/>
</person-group>. (<year>2025</year>). 
<article-title>Machine learning overview and its application in the livestock industry</article-title>. <source>Meat. Res.</source> <volume>5</volume>, <page-range>1-10</page-range>. doi:&#xa0;<pub-id pub-id-type="doi">10.55002/mr.5.1.109</pub-id>
</mixed-citation>
</ref>
<ref id="B26">
<mixed-citation publication-type="journal">
<person-group person-group-type="author">
<name><surname>Mluba</surname> <given-names>H. S.</given-names></name>
<name><surname>Atif</surname> <given-names>O.</given-names></name>
<name><surname>Lee</surname> <given-names>J.</given-names></name>
<name><surname>Park</surname> <given-names>D.</given-names></name>
<name><surname>Chung</surname> <given-names>Y.</given-names></name>
</person-group> (<year>2024</year>). 
<article-title>Pattern Mining-Based pig behavior analysis for health and welfare monitoring</article-title>. <source>Sensors</source> <volume>24</volume>, <fpage>2185</fpage>. doi:&#xa0;<pub-id pub-id-type="doi">10.3390/s24072185</pub-id>, PMID: <pub-id pub-id-type="pmid">38610396</pub-id>
</mixed-citation>
</ref>
<ref id="B27">
<mixed-citation publication-type="journal">
<person-group person-group-type="author">
<name><surname>Napolitano</surname> <given-names>F.</given-names></name>
<name><surname>De Rosa</surname> <given-names>G.</given-names></name>
<name><surname>Chay-Canul</surname> <given-names>A.</given-names></name>
<name><surname>&#xc1;lvarez-Mac\&#x2019;\ias</surname> <given-names>A.</given-names></name>
<name><surname>Pereira</surname> <given-names>A. M. F.</given-names></name>
<name><surname>Bragaglio</surname> <given-names>A.</given-names></name>
<etal/>
</person-group>. (<year>2023</year>). 
<article-title>The challenge of global warming in water buffalo farming: physiological and behavioral aspects and strategies to face heat stress</article-title>. <source>Animals</source> <volume>13</volume>, <elocation-id>3103</elocation-id>. doi:&#xa0;<pub-id pub-id-type="doi">10.3390/ani13193103</pub-id>, PMID: <pub-id pub-id-type="pmid">37835709</pub-id>
</mixed-citation>
</ref>
<ref id="B28">
<mixed-citation publication-type="journal">
<person-group person-group-type="author">
<name><surname>Nawaz</surname> <given-names>M. S.</given-names></name>
<name><surname>Fournier-Viger</surname> <given-names>P.</given-names></name>
<name><surname>Nawaz</surname> <given-names>M. Z.</given-names></name>
<name><surname>Chen</surname> <given-names>G.</given-names></name>
<name><surname>Wu</surname> <given-names>Y.</given-names></name>
</person-group> (<year>2022</year>). 
<article-title>MalSPM: Metamorphic malware behavior analysis and classification using sequential pattern mining</article-title>. <source>Comput. Secur.</source> <volume>118</volume>, <elocation-id>102741</elocation-id>. doi:&#xa0;<pub-id pub-id-type="doi">10.1016/j.cose.2022.102741</pub-id>
</mixed-citation>
</ref>
<ref id="B29">
<mixed-citation publication-type="journal">
<person-group person-group-type="author">
<name><surname>Nawaz</surname> <given-names>M. S.</given-names></name>
<name><surname>Fournier-Viger</surname> <given-names>P.</given-names></name>
<name><surname>Shojaee</surname> <given-names>A.</given-names></name>
<name><surname>Fujita</surname> <given-names>H.</given-names></name>
</person-group> (<year>2021</year>). 
<article-title>Using artificial intelligence techniques for COVID-19 genome analysis</article-title>. <source>Appl. Intell.</source> <volume>51</volume>, <fpage>3086</fpage>&#x2013;<lpage>3103</lpage>. doi:&#xa0;<pub-id pub-id-type="doi">10.1007/s10489-021-02193-w</pub-id>, PMID: <pub-id pub-id-type="pmid">34764587</pub-id>
</mixed-citation>
</ref>
<ref id="B30">
<mixed-citation publication-type="journal">
<person-group person-group-type="author">
<name><surname>Norris</surname> <given-names>R. T.</given-names></name>
<name><surname>Richards</surname> <given-names>R. B.</given-names></name>
<name><surname>Creeper</surname> <given-names>J. H.</given-names></name>
<name><surname>Jubb</surname> <given-names>T. F.</given-names></name>
<name><surname>Madin</surname> <given-names>B.</given-names></name>
<name><surname>Kerr</surname> <given-names>J. W.</given-names></name>
</person-group> (<year>2003</year>). 
<article-title>Cattle deaths during sea transport from Australia</article-title>. <source>Aust. Vet. J.</source> <volume>81</volume>, <fpage>156</fpage>&#x2013;<lpage>161</lpage>. doi:&#xa0;<pub-id pub-id-type="doi">10.1111/j.1751-0813.2003.tb11079.x</pub-id>, PMID: <pub-id pub-id-type="pmid">15080430</pub-id>
</mixed-citation>
</ref>
<ref id="B31">
<mixed-citation publication-type="journal">
<person-group person-group-type="author">
<name><surname>Nyamuryekung&#x2019;e</surname> <given-names>S.</given-names></name>
</person-group> (<year>2024</year>). 
<article-title>Transforming ranching: Precision livestock management in the Internet of Things era</article-title>. <source>Rangelands</source> <volume>46</volume>, <fpage>13</fpage>&#x2013;<lpage>22</lpage>. doi:&#xa0;<pub-id pub-id-type="doi">10.1016/j.rala.2023.10.002</pub-id>
</mixed-citation>
</ref>
<ref id="B32">
<mixed-citation publication-type="journal">
<person-group person-group-type="author">
<name><surname>Nyamuryekung&#x2019;e</surname> <given-names>S.</given-names></name>
<name><surname>Cibils</surname> <given-names>A. F.</given-names></name>
<name><surname>Estell</surname> <given-names>R. E.</given-names></name>
<name><surname>McIntosh</surname> <given-names>M.</given-names></name>
<name><surname>VanLeeuwen</surname> <given-names>D.</given-names></name>
<name><surname>Steele</surname> <given-names>C.</given-names></name>
<etal/>
</person-group>. (<year>2021</year>). 
<article-title>Foraging behavior and body temperature of heritage vs. commercial beef cows in relation to desert ambient heat</article-title>. <source>J. Arid. Environ.</source> <volume>193</volume>, <elocation-id>104565</elocation-id>. doi:&#xa0;<pub-id pub-id-type="doi">10.1016/j.jaridenv.2021.104565</pub-id>
</mixed-citation>
</ref>
<ref id="B33">
<mixed-citation publication-type="journal">
<person-group person-group-type="author">
<name><surname>Nyamuryekung&#x2019;e</surname> <given-names>S.</given-names></name>
<name><surname>Cibils</surname> <given-names>A. F.</given-names></name>
<name><surname>Estell</surname> <given-names>R. E.</given-names></name>
<name><surname>VanLeeuwen</surname> <given-names>D.</given-names></name>
<name><surname>Steele</surname> <given-names>C.</given-names></name>
<name><surname>Estrada</surname> <given-names>O. R.</given-names></name>
<etal/>
</person-group>. (<year>2020</year>). 
<article-title>Do young calves influence movement patterns of nursing raramuri criollo cows on rangeland</article-title>? <source>Rangeland. Ecol. Manage.</source> <volume>73</volume>, <fpage>84</fpage>&#x2013;<lpage>92</lpage>. doi:&#xa0;<pub-id pub-id-type="doi">10.1016/j.rama.2019.08.015</pub-id>
</mixed-citation>
</ref>
<ref id="B34">
<mixed-citation publication-type="journal">
<person-group person-group-type="author">
<name><surname>Pekta&#x15f;</surname> <given-names>A.</given-names></name>
</person-group> (<year>2018</year>). 
<article-title>Mining patterns of sequential Malicious APIs to detect malware</article-title>. <source>Int. J. Netw. Secur. Its. Appl. (IJNSA).</source> <volume>10</volume>, <page-range>1-9</page-range>. doi:&#xa0;<pub-id pub-id-type="doi">10.2139/ssrn.3247606</pub-id>
</mixed-citation>
</ref>
<ref id="B35">
<mixed-citation publication-type="journal">
<person-group person-group-type="author">
<name><surname>Shine</surname> <given-names>P.</given-names></name>
<name><surname>Murphy</surname> <given-names>M. D.</given-names></name>
</person-group> (<year>2021</year>). 
<article-title>Over 20 years of machine learning applications on dairy farms: A comprehensive mapping study</article-title>. <source>Sensors</source> <volume>22</volume>, <fpage>52</fpage>. doi:&#xa0;<pub-id pub-id-type="doi">10.3390/s22010052</pub-id>, PMID: <pub-id pub-id-type="pmid">35009593</pub-id>
</mixed-citation>
</ref>
<ref id="B36">
<mixed-citation publication-type="journal">
<person-group person-group-type="author">
<name><surname>St-Pierre</surname> <given-names>N. R.</given-names></name>
<name><surname>Cobanov</surname> <given-names>B.</given-names></name>
<name><surname>Schnitkey</surname> <given-names>G.</given-names></name>
</person-group> (<year>2003</year>). 
<article-title>Economic losses from heat stress by US livestock industries</article-title>. <source>J. Dairy. Sci.</source> <volume>86</volume>, <fpage>E52</fpage>&#x2013;<lpage>E77</lpage>. doi:&#xa0;<pub-id pub-id-type="doi">10.3168/jds.S0022-0302(03)74040-5</pub-id>
</mixed-citation>
</ref>
<ref id="B37">
<mixed-citation publication-type="book">
<person-group person-group-type="author">
<name><surname>Tan</surname> <given-names>P.-N.</given-names></name>
<name><surname>Steinbach</surname> <given-names>M.</given-names></name>
<name><surname>Kumar</surname> <given-names>V.</given-names></name>
</person-group> (<year>2016</year>). <source>Introduction to data mining</source> (
<publisher-name>Bew Delhi: Pearson Education India</publisher-name>).
</mixed-citation>
</ref>
<ref id="B38">
<mixed-citation publication-type="journal">
<person-group person-group-type="author">
<name><surname>Tobin</surname> <given-names>C.</given-names></name>
<name><surname>Bailey</surname> <given-names>D. W.</given-names></name>
<name><surname>Stephenson</surname> <given-names>M. B.</given-names></name>
<name><surname>Trotter</surname> <given-names>M. G.</given-names></name>
</person-group> (<year>2021</year>a). 
<article-title>Temporal changes in association patterns of cattle grazing at two stocking densities in a central Arizona rangeland</article-title>. <source>Animals</source> <volume>11</volume>, <elocation-id>2635</elocation-id>. doi:&#xa0;<pub-id pub-id-type="doi">10.3390/ani11092635</pub-id>, PMID: <pub-id pub-id-type="pmid">34573601</pub-id>
</mixed-citation>
</ref>
<ref id="B39">
<mixed-citation publication-type="journal">
<person-group person-group-type="author">
<name><surname>Tobin</surname> <given-names>C.</given-names></name>
<name><surname>Bailey</surname> <given-names>D. W.</given-names></name>
<name><surname>Trotter</surname> <given-names>M. G.</given-names></name>
</person-group> (<year>2021</year>b). 
<article-title>Tracking and sensor-based detection of livestock water system failure: A case study simulation</article-title>. <source>Rangeland. Ecol. Manage.</source> <volume>77</volume>, <fpage>9</fpage>&#x2013;<lpage>16</lpage>. doi:&#xa0;<pub-id pub-id-type="doi">10.1016/j.rama.2021.02.013</pub-id>
</mixed-citation>
</ref>
<ref id="B40">
<mixed-citation publication-type="journal">
<person-group person-group-type="author">
<name><surname>Tobin</surname> <given-names>C.</given-names></name>
<name><surname>Bailey</surname> <given-names>D.</given-names></name>
<name><surname>Wade</surname> <given-names>C.</given-names></name>
<name><surname>Trieu</surname> <given-names>L. L.</given-names></name>
<name><surname>Nelson</surname> <given-names>K.</given-names></name>
<name><surname>Oltjen</surname> <given-names>C.</given-names></name>
<etal/>
</person-group>. (<year>2024</year>). 
<article-title>Evaluation of experimental error in accelerometer monitoring: variation among individual animals versus variation among devices</article-title>. <source>Smart. Agric. Technol.</source> <volume>7</volume>, <fpage>100432</fpage>. doi:&#xa0;<pub-id pub-id-type="doi">10.1016/j.atech.2024.100432</pub-id>
</mixed-citation>
</ref>
<ref id="B41">
<mixed-citation publication-type="journal">
<person-group person-group-type="author">
<name><surname>Trieu</surname> <given-names>L. L.</given-names></name>
<name><surname>Bailey</surname> <given-names>D. W.</given-names></name>
<name><surname>Cao</surname> <given-names>H.</given-names></name>
<name><surname>Son</surname> <given-names>T. C.</given-names></name>
<name><surname>Macor</surname> <given-names>J.</given-names></name>
<name><surname>Trotter</surname> <given-names>M. G.</given-names></name>
<etal/>
</person-group>. (<year>2025</year>). 
<article-title>Potential of accelerometers to remotely early detect bovine ephemeral fever in cattle using pattern mining</article-title>. <source>Trans. Anim. Sci.</source> <volume>9</volume>, <elocation-id>txaf008</elocation-id>. doi:&#xa0;<pub-id pub-id-type="doi">10.1093/tas/txaf008</pub-id>, PMID: <pub-id pub-id-type="pmid">39917049</pub-id>
</mixed-citation>
</ref>
<ref id="B42">
<mixed-citation publication-type="journal">
<person-group person-group-type="author">
<name><surname>Wade</surname> <given-names>C.</given-names></name>
<name><surname>Trotter</surname> <given-names>M.</given-names></name>
<name><surname>Chang</surname> <given-names>A.</given-names></name>
<name><surname>Steele</surname> <given-names>C.</given-names></name>
<name><surname>Prihodko</surname> <given-names>L.</given-names></name>
<name><surname>Bailey</surname> <given-names>D. W.</given-names></name>
</person-group> (<year>2024</year>). 
<article-title>Use of global positioning system tracking to assess landscape distribution in extensive small ruminant operations&#x2606;</article-title>. <source>Rangeland. Ecol. Manage.</source> <volume>94</volume>, <fpage>29</fpage>&#x2013;<lpage>37</lpage>. doi:&#xa0;<pub-id pub-id-type="doi">10.1016/j.rama.2024.01.010</pub-id>
</mixed-citation>
</ref>
</ref-list>
<fn-group>
<fn id="n1" fn-type="custom" custom-type="edited-by">
<p>Edited by: <ext-link ext-link-type="uri" xlink:href="https://loop.frontiersin.org/people/2649127">Titus Zindove</ext-link>, Lincoln University, New Zealand</p></fn>
<fn id="n2" fn-type="custom" custom-type="reviewed-by">
<p>Reviewed by: <ext-link ext-link-type="uri" xlink:href="https://loop.frontiersin.org/people/3098676">Smruti Ranjan Mishra</ext-link>, Odisha University of Technology and Research, India; <ext-link ext-link-type="uri" xlink:href="https://loop.frontiersin.org/people/3098843">Thai Ha Dang</ext-link>, Pukyong National University, Republic of Korea</p></fn>
</fn-group>
</back>
</article>