Abstract
Background and Aim:
Early postpartum behavioral patterns are pivotal indicators of dairy cow health, reproductive success, and lactation performance, particularly under the environmental stressors of tropical climates. This study aimed to investigate how these behavioral patterns, as captured by smart biosensor data, influence reproductive outcomes, and milk yield in Holstein Friesian cows, with specific emphasis on parity differences and behavioral clustering.
Materials and Methods:
A total of 227 Holstein Friesian cows, categorized by parity (primiparous vs. multiparous), were monitored using AfiTag-II accelerometers from 3 days prepartum to 30 days postpartum. Behavioral variables – activity, rest time, rest per bout, and restlessness ratio – were subjected to K-means clustering to identify distinct behavioral profiles. Reproductive performance was analyzed using Cox proportional hazard models, while lactation dynamics were modeled using the Wood function to estimate peak yield, peak time, and persistency.
Results:
Three distinct behavioral clusters were identified. Primiparous cows in Cluster 1 showed the highest early postpartum activity (~300 min/day at 5 days in milk [DIM]) and restlessness ratios, while multiparous cows exhibited more stable behavioral profiles. Cox regression suggested that cows in Cluster 0 had a higher, although non-significant, likelihood of estrus onset at 40 DIM (Hazard ratio = 1.44, p = 0.09). Lactation modeling revealed that multiparous cows in Cluster 0 attained the highest cumulative milk yield (4896.6 ± 252.1 kg at 305 DIM), while the single cow in Cluster 2 exhibited an atypical lactation curve with a delayed peak and reduced persistency.
Conclusion:
Postpartum behavioral clustering reveals parity-specific lactation and reproductive trajectories in tropical dairy cows. Higher activity and restlessness ratios may delay estrus and compromise milk yield, underscoring the potential of behavioral monitoring for targeted reproductive and nutritional management. Integration of sensor-based clustering with routine herd monitoring may support early identification of cows at risk of suboptimal performance, improving reproductive efficiency and milk production in tropical dairy systems.
Keywords: K-means clustering, milk yield, parity, postpartum behavior, reproductive performance, smart sensors, tropical dairy cattle
INTRODUCTION
Postpartum behavioral patterns are vital indicators of dairy cow welfare and exert a direct influence on reproductive efficiency and milk production outcomes [1, 2]. Traditional methods for classifying cow behavior rely on manual observation and predefined criteria [3, 4]; however, these approaches are labor-intensive, time-consuming, and prone to observer bias [5]. Recent advancements in automated, sensor-based technologies – such as the AfiTag-II biosensor – now provide robust tools for continuous monitoring of activity and resting behavior in dairy cows. These devices facilitate precise, high-frequency data acquisition, enabling a reliable assessment of the associations between postpartum behavioral changes and reproductive and productive performance [2, 6]. In addition to minimizing labor demands, these automated systems enhance herd management efficiency and contribute to improved economic outcomes on dairy farms [7, 8].
Behavioral patterns in dairy cows differ markedly between tropical and temperate climates, largely due to environmental stressors such as high ambient temperatures and humidity [9, 10]. In tropical regions, these stressors often result in irregular resting behavior and delayed reproductive cycles, in contrast to the more predictable patterns observed in temperate zones [11]. Effectively addressing these climate-induced differences necessitates management strategies tailored to local environmental conditions, thereby optimizing fertility and milk production in tropical herds [12]. Given the critical economic importance of reproductive success, early postpartum estrus detection and efficient insemination are essential for maintaining productivity in dairy operations [13]. However, heat stress in tropical climates frequently alters postural and activity-related behaviors, which may negatively affect key indicators of reproductive performance and productivity.
The lactation curve (LC) serves as a valuable analytical tool for understanding milk production dynamics, particularly in tropical environments where atypical LC patterns are more frequently observed due to environmental stressors [14–16]. Metrics such as peak time, peak yield, and persistency are instrumental in evaluating production potential and overall health, with these parameters influenced by factors including parity, genetic background, and environmental conditions [17, 18]. In tropical climates, approximately 20%–30% of dairy cows may exhibit atypical LC shapes – such as delayed peak production or reduced persistency – stemming from elevated metabolic stress during early lactation [14, 19, 20]. Insight into these variations is essential for designing management practices that support both productivity and animal welfare in tropical dairy systems.
Clustering analysis has emerged as a valuable technique for classifying cows based on behavioral and physiological profiles. In particular, the K-means clustering algorithm is well-suited for analyzing large datasets and identifying distinct behavioral patterns, especially under the variable conditions’ characteristic of tropical environments [15, 21]. While previous research by Rebuli et al. [22], Grelet et al. [23], and Pereira et al. [24] have applied K-means clustering to classify cows based on milk yield, genetic traits, and blood parameters, relatively few studies have employed this method to forecast reproductive performance and LC characteristics in tropical dairy populations.
In this study, we employed K-means clustering to categorize activity-related behavioral patterns during the early lactation period in tropical dairy cows, with specific attention to parity-based differences. By integrating behavioral clustering with LC modeling using the Wood function [17], our objective was to predict reproductive and lactation outcomes associated with specific behavioral profiles. This approach aims to inform the development of targeted management strategies for tropical dairy production systems.
Despite growing interest in the application of sensor-based monitoring systems for dairy cow behavior, limited research has investigated the integration of early postpartum behavioral data with reproductive and lactation outcomes under tropical environmental conditions. Most existing studies have focused on temperate climates, where environmental stressors differ significantly from those encountered in tropical regions. Moreover, while K-means clustering has been employed to classify cows based on milk yield, genetic traits, or metabolic profiles, its application to behavior-based classification during the critical transition period remains underexplored in tropical dairy systems. Notably, the predictive relationship between cluster-defined behavioral profiles and reproductive milestones such as estrus onset, as well as lactation dynamics modeled through established functions like the Wood model [17], has not been sufficiently characterized. This represents a key research gap with practical implications for optimizing herd fertility and milk production strategies in heat-stressed environments.
Accordingly, the present study aimed to evaluate the effects of early postpartum behavioral patterns on reproductive performance and milk yield in tropical Holstein Friesian cows, using K-means clustering to identify distinct behavior profiles. These behavioral clusters were subsequently analyzed in relation to reproductive traits using Cox regression and lactation dynamics through the Wood function model [17]. The study also examined parity-specific differences in behavioral and production responses, thereby contributing to a data-driven framework for precision dairy management in tropical climates.
MATERIALS AND METHODS
Ethical approval and informed consent
This study utilized data directly retrieved from the database of a commercial dairy farm, focusing on early postpartum activity patterns, reproductive outcomes, and milk production performance. As a retrospective study based on secondary data analysis, with no direct or indirect interaction with animals, formal approval from the Institutional Animal Care and Use Committee was not required. Nonetheless, the study was conducted in accordance with ethical research standards, including data protection and confidentiality. Before data collection, written informed consent was obtained from the farm owner, who was thoroughly informed about the study’s objectives, the intended use of the data, and the measures implemented to ensure confidentiality and anonymity. All procedures adhered to relevant ethical guidelines, maintaining the privacy and protection of both the owner and the data involved.
Study period and location
Data on calving events that occurred between July 2020 and May 2022 were collected from 227 Holstein Friesian dairy cows housed at Sithichoke Dairy Farm, located in Nakhon Ratchasima Province, Thailand.
Animals, housing, diet, management, and health
The sample consisted of 173 first-lactation cows and 53 cows in their second or higher lactation. These cows exhibited an average lactation length of 152.50 ± 8.33 days and a gestation period of 279.47 ± 20.11 days (mean ± standard deviation). Inclusion criteria required complete activity and milking records from 3 days prepartum to 30 days postpartum for behavioral analysis, and from 0 to 305 days in milk (DIM) for milk yield data. Cows with missing identification data, incomplete lactation records, or faulty sensor readings were excluded to maintain dataset integrity.
The cows were housed in a free-stall barn aligned southwest to northeast, incorporating designated feed storage, resting, feeding, and delivery areas. A partially slatted central resting area was extended along its full length. The milking parlor was located on the southwest side of the farm, adjacent to the office and milk storage facility. Natural light was supplemented by artificial lighting managed by farm staff to support feeding and behavioral monitoring.
Thailand’s climate is marked by high ambient temperatures and humidity, with average values of 27°C and 74%, respectively [25]. Seasonal variation was observed: 20°C–26°C in winter (November–February), 32°C–37°C in summer (March–June), and 26°C–30°C during the rainy season (July–October). Relative humidity ranged from 65% to 70% in winter, 75% to 80% in summer, and often exceeded 80% in the rainy season [25–27]. To mitigate heat stress, cooling strategies such as shaded resting areas, sprinklers, and ventilation fans were implemented [10].
Milking occurred twice daily, from 05:30 to 06:00 and from 16:30 to 17:00. Cows were grouped by production level and fed a total mixed ration twice daily (06:00–06:30 and 17:00–17:30), formulated to meet their nutritional needs. Daily feed intake was monitored by weighing the feed provided. The chemical composition of the ration is presented in Table 1. Clean water was available ad libitum, and all animals were under the supervision of zootechnical and veterinary staff throughout the study.
Table 1.
Description of chemical composition of feed ingredients used in this study.
| Chemicals | TMR 1 | TMR 2 | TMR 3 | TMR 4 |
|---|---|---|---|---|
| Proximate analysis on a dry matter | ||||
| Dry matter (%) | 26.92 | 37.62 | 32.62 | 36.66 |
| Crude protein (%) | 10.53 | 13.82 | 14.28 | 16.66 |
| Crude fat content (%) | 1.70 | 1.39 | 1.40 | 2.03 |
| Crude fiber (%) | 20.89 | 20.93 | 24.00 | 27.45 |
| NFE (Mcal/kg) | 52.44 | 35.19 | 33.05 | 27.72 |
| Detergent analysis on a dry matter basis (%) | ||||
| Ash | 14.44 | 28.67 | 27.27 | 26.14 |
| ADF | 43.00 | 26.26 | 28.75 | 25.03 |
| NDF | 67.21 | 36.55 | 43.77 | 39.26 |
| ADL | 4.32 | 2.94 | 3.42 | 3.29 |
| Cellulose | 38.68 | 23.32 | 25.33 | 21.74 |
| Hemicellulose | 24.21 | 10.29 | 15.02 | 14.23 |
NFE=Energy content (Mcal/kg), ADF=Acid detergent fiber, NDF=Neutral detergent fiber, ADL=Acid detergent lignin, TMR=Total mixed ration. TMR 1=Dry cow group, TMR 2=Low milk production group: <10 kg/day, TMR 3=Medium milk production group: ≥10–25 kg/day, TMR 4=High milk production group: >25 kg/day.
A secondary dataset containing the same 227 animals was used to assess behavioral variables – activity, rest time, rest per bout, and restlessness ratio – collected from −3 to 30 DIM. A 7-day rolling average was applied to smooth these variables for analysis.
Farm staff conducted daily health assessments to monitor for signs of illness, injury, or behavioral abnormalities. Routine veterinary inspections were performed twice daily following feeding. Preventive health measures, including vaccinations and parasite control programs, were in place to ensure herd health. All health records were systematically maintained in the farm’s database for reference and analysis.
Transition cows were managed according to standard farm protocols, which included relocation to calving pens based on prior insemination and health history. The calving barn, equipped with rubber mattresses, was located adjacent to the lactating cow barn and within visual proximity. Bedding was cleaned and replaced after each calving. Additional information on calving protocols is available in our previous study by Raza et al. [10].
Data preparation
Sensor-based data preprocessing
The AfiTag-II biosensor (Afikim Ltd., Kibbutz, Israel) is a proprietary tri-axial accelerometer encased in a durable housing, designed to capture X-, Y-, and Z-axis movement data. The sensor was securely fastened to the right hind leg of each cow, approximately 20 cm above the hoof, using adjustable straps to ensure comfort and freedom of movement. The device converts mechanical acceleration – such as movement and gravitational force – into waveform signals [10, 28], enabling the detection and classification of both static and dynamic activities [29]. Behavioral metrics recorded included activity, rest time, rest per bout, and restlessness ratio, as summarized in Table 2.
Table 2.
Definition of postural behavioral metrics.
| Parameters | Definition |
|---|---|
| Activity | Total duration of physical movement of the animal per day. |
| Rest time | The total duration of resting period throughout the day. |
| Rest periods per Bout | Average resting period of individual cow rest. |
| Restlessness ratio | A metric designed to quantify a cow’s relative activity by comparing its current activity level to its individual baseline. |
Activity and rest time were measured in minutes per day; rest per bout was measured in minutes per bout per day. The restlessness ratio was calculated as the ratio of the current day’s activity time (in minutes) to the average activity time of the previous 7 days.
Sensors were installed approximately 1 month before calving and remained in place throughout the study. All devices were synchronized with the farm’s milking software to link behavioral data with individual animal identification. Cows were provided a 1-week adaptation period. Previous studies by Raza et al. [10], Papageorgiou et al. [30], and Henriksen and Munksgaard [31] have validated the accuracy of the AfiTag-II system in detecting behavioral patterns. Calibration procedures accounted for leg angle, weight distribution, and movement variability to ensure reliable measurements. Any sensor exhibiting malfunction was recalibrated or replaced before final data collection.
To ensure data quality, the research team implemented strict protocols to address potential sources of measurement bias. Factors such as gait pattern variation, body condition score, and leg strap tightness were monitored. Sensors were attached by trained personnel from the device manufacturer, following a standardized protocol for placement. Farm staff also periodically inspected sensor positioning to ensure uniform application across all animals.
Behavioral data were analyzed using inbuilt algorithms and recorded in units of minutes per day. Data were transmitted wirelessly to a base station and subsequently downloaded to Microsoft Excel 2021 [32]. The activity dataset (n = 227) contained no missing values. Minor gaps (~2%) in the milk yield dataset were addressed using the Wood lactation model and linear interpolation. Outliers were identified using the interquartile range (IQR) method in the Statistical Package for the Social Sciences (SPSS) version 29.0.1 (IBM Corp., NY, USA). To reduce skewness, data normalization was performed using Z-score and log transformation in Python (version 3.12.2, Python Software Foundation, https://www.python.org). The complete preprocessing workflow and scripts are publicly available through GitHub: https://github.com/AqeelRaza51214.
Clustering
Clustering is a foundational data mining and machine learning approach used to group similar data points into distinct, non-overlapping clusters [33]. A core component of clustering is the quantification of similarity or distance between data points [34]. The Euclidean distance is commonly applied to measure the straight-line distance in multidimensional datasets [35]. Within clustering applications, this metric helps determine the proximity of individual data points to their respective cluster centroids [36]. The mathematical representation of the Euclidean distance “d” is given as follows:
Where:
a) xij indicates the value j-th recorded feature for cow, i.
b) μkj is the value of the centroid for j-th recorded features in cluster k.
c) m is the number of recorded features that were used in the analysis.
To evaluate the effectiveness of the clustering outcome, it is necessary to assess both cluster cohesion and separation. This study employed the Within-Cluster Sum of Squares (WCSS) method to quantify total variance within each cluster based on selected features. WCSS was computed by summing the squared Euclidean distances between individual data points and the centroid of their respective clusters. The corresponding mathematical equation is shown below.
Where:
a) xi denotes the recorded features cow i.
b) ck stands for the number of cows assigned to cluster k.
c) μk is the centroid of cluster k, representing the mean values of recorded features variables for that cluster.
d) ║xi=μk║2 is squared Euclidean distance between the recoded features vector xi of cow i and the cluster centroid μk.
e) The outer summation:
iterate over each k cluster.f) The inner summation:
shows the sum of square distances for all cows assigned to cluster k.
K-means clustering, an unsupervised machine learning algorithm, was utilized due to its efficiency with both simple and high-dimensional datasets. However, K-means is known to be sensitive to outliers, as extreme values can distort the cluster centroids and overall data distribution [14, 34]. To enhance clustering validity and determine the optimal number of clusters, three complementary methods were applied: the elbow method, the silhouette score index, and WCSS. The elbow method is a visual tool that plots the WCSS against varying cluster counts to identify the point where additional clusters provide diminishing improvements in cohesion [14, 37]. The silhouette score quantifies cluster separation by comparing the mean intra-cluster similarity with the nearest-cluster similarity [38]. Based on these techniques, three clusters were identified as optimal for the present dataset (Supplementary Figures 1 and 2). Extensive data preprocessing was performed to minimize the influence of outliers, including the IQR method for outlier detection, and Z-score and log transformation for data normalization and skewness reduction.
Supplementary Figure 1.

Elbow method for identification of clusters numbers.
Supplementary Figure 2.

Silhouette score for detection of clusters numbers.
Characterization and comparison of clusters
To determine distinct behavioral clusters within the second dataset, K-means clustering was applied using the following postural behavior variables: activity, rest time, rest per bout, restlessness ratio, parity (Lactation No. 1 vs. Lactation No. ≥2), DIM (−3 to 30 days), and their corresponding 7-day rolling averages (rolling activity, rolling rest time, rolling rest per bout, and rolling restlessness ratio). The resulting cluster classifications were merged with the milk yield dataset to enable a comprehensive comparison of lactation characteristics by parity group. Specifically, comparisons were made between primiparous and multiparous cows for peak milk yield, peak time (DIM of peak yield), and cumulative milk yield at 56, 84, 126, and 305 DIM. The LCs for each cluster were modeled using the Wood function [17], incorporating cluster, parity, and milk yield data to explore associations between postural behavior and lactation performance.
Milk dataset
The milk dataset was obtained from a commercial dairy farm equipped with the AfiMilk automatic milking system (Afikim Ltd.), operational between December 2019 and July 2023. Milk yield data were recorded for individual cows using radio-frequency identification tags integrated into the system. The dataset included 227 lactation records, each representing a unique cow. Records comprised milking date, cow ID, parity (first lactation or second and above), DIM (0–305 DIM), and daily milk yield in kilograms.
Missing values in the milk yield data were imputed using the Wood lactation model [17], as peak yield and persistency are essential for LC analysis. The model, based on a gamma function, assumes a biologically plausible lactation trajectory: An initial increase in milk production post-calving, followed by a peak and gradual decline. While the model does not account for external variables such as disease, feed variation, seasonality, or heat stress, it remains a preferred choice due to its simplicity, robustness in trend analysis, and suitability for imputing missing data. Each cow’s LC was fitted using the Wood model, and the resulting parameters were used to estimate missing daily yield values. Peak yield and other milk production traits were also calculated using this model. The Wood model is expressed mathematically as follows:
y = atb e-ct
Where:
a) “y” represents the daily milk yield.
b) “t” is the time since parturition.
c) “a” denotes the overall milk production levels.
d) “b” signifies the ascending phase of lactation that leads to the peak yield.
e) “c” demonstrates the descending phase of milk yield after parturition.
To validate the model, two metrics were used: The coefficient of determination (R2) and mean absolute error (MAE). R2 quantifies how well the model explains the variance in milk yield, while MAE reflects the average magnitude of prediction error. Tables 3–5 [17, 39] summarize lactation performance values and the respective validation metrics, highlighting model performance in relation to parity.
Table 3.
Descriptive statistics of milk yield parameters in primiparous cows (n = 173).
| Variables | Primiparous | Cluster (0) | Cluster (1) | Cluster (2) | ||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
|
|
|
|
|
|||||||||||
| n | Mean ± SE | Minimum | Maximum | n | Mean ± SE | Minimum | Maximum | n | Mean ± SE | Minimum | Maximum | n | Absolute value | |
| Peak time | 174 | 52.28 ± 2.06 | 0.00 | 204.08 | 59 | 50.82 ± 3.45 | 0.00 | 113.68 | 114 | 52.92 ± 2.59 | 0.00 | 204.8 | 1 | 68.82 |
| Peak yield | 174 | 18.74 ± 0.25 | 12.24 | 29.17 | 59 | 18.95 ± 0.43 | 13.29 | 28.73 | 114 | 18.68 ± 0.30 | 12.24 | 29.17 | 1 | 13.31 |
| Persistency | 174 | 54.40 ± 1.05 | 10.97 | 99.37 | 59 | 52.04 ± 1.68 | 24.38 | 85.95 | 114 | 55.64 ± 1.33 | 10.97 | 99.37 | 1 | 52.02 |
| MY 56 days | 174 | 941.22 ± 14.51 | 473.92 | 1574.24 | 59 | 944.79 ± 25.31 | 573.93 | 1526.99 | 144 | 942.18 ± 17.71 | 473.92 | 1574.24 | 1 | 621.30 |
| MY 84 days | 174 | 1449.62 ± 20.51 | 851.67 | 2329.42 | 59 | 1456.06 ± 35.06 | 978.76 | 2225.74 | 114 | 1450.29 ± 25.31 | 851.67 | 2329.42 | 1 | 993.21 |
| MY 126 days | 174 | 2172.94 ± 28.77 | 1370.33 | 3378.78 | 59 | 2181.86 ± 48.72 | 1536.20 | 3158.45 | 114 | 2173.94 ± 35.65 | 1370.33 | 3378.79 | 1 | 1532.17 |
| My 305 days | 174 | 4530.08 ± 60.48 | 3100.76 | 6820.40 | 59 | 4512.76 ± 104.95 | 3100.76 | 6806.45 | 114 | 4550.29 ± 7.09 | 3185.19 | 6820.40 | 1 | 3247.15 |
Peak time: Number of days in milk (DIM) at which peak was predicted. Peak Yield: Peak milk yield (kg/day). Persistency: Describes the ability of the cow to maintain a relatively stable milk yield after reaching peak production, expressed as the rate of decline in milk yield over time Burgers et al. [39]. MY=Milk yield (kg/day), SE=Standard error. The predicted values of variables are based on the Wood model equation Wood [17]; Peak time: b/c; b=rate of increase in milk yield leading up to peak; c=rate of decline in milk yield after peak; Peak yield:
, Persistency: 100 × (milk at 305 DIM)/(Peak yield). Cluster 2: Contains only single animal; the SE was not calculated.
Table 5.
Validation of Wood lactation curve model for the parity and cluster groups (n = 227).
| Parity | Cluster | R2 | MAE |
|---|---|---|---|
| Primiparous | 0 | 0.83 | 1.35 |
| 1 | 0.69 | 1.05 | |
| 2 | 0.83 | 1.27 | |
| Multiparous (≥2) | 0 | 0.80 | 1.48 |
| 1 | 0.82 | 1.43 |
R² (coefficient of determination) measures the proportion of the observed milk yield variance explained by the model, indicating the overall fit. MAE (mean absolute error) represents the average absolute difference between predicted and observed values, reflecting typical prediction error.
Programming packages
Data cleaning, preprocessing, and imputation using the Wood model [17] were conducted using Python (version 3.12.2; https://www.python.org/). Key libraries included NumPy (version 1.24.4, NumPy Developers, https://numpy.org) [40, 41], and Pandas (version 2.2.3, pandas development teams, https://pandas.pydata.org) with the Wood model implementation executed through the SciPy package (version 1.14.1, https://scipy.org) [42]. All analyses were performed in Jupyter Notebook (https://jupyter.org). LC visualization was completed using Matplotlib and Seaborn libraries [43]. For reproducibility, the Python scripts, cleaned datasets, and additional clustering and LC analysis files are available at the GitHub repository: https://github.com/AqeelRaza51214.
Statistical analysis
Descriptive statistics were generated using SPSS version 29.0.1 (IBM Corp., NY, USA). Outliers were removed using the IQR method. An exploratory analysis was performed to investigate potential predictors of reproductive milestones: calving to first heat, calving to first service, and calving to conception.
To assess reproductive performance, univariable Cox proportional hazards regression was conducted to calculate hazard ratios (HRs) for achieving first heat at 40, 60, and 90 DIM; first service at 60, 90, and 120 DIM; and pregnancy at 100, 150, and 200 DIM. Cluster 1 was designated as the reference group. Cows that achieved reproductive outcomes before the respective DIM thresholds were censored from the analysis. Adjusted HRs were reported alongside 95% confidence intervals (CI) and corresponding p-values. p ≤ 0.05 was considered statistically significant.
Lactation performance was evaluated by comparing peak milk yield, peak time, persistency, and cumulative milk yields at 56, 84, 126, and 305 DIM across clusters, within each parity group (primiparous and multiparous). Normality was assessed using the Shapiro–Wilk test and Q-Q plots. For normally distributed variables, a one-way analysis of variance (ANOVA) was used, followed by Tukey’s honestly significant difference test for post hoc comparisons. Non-normal variables were analyzed using the Kruskal–Wallis test, with pairwise comparisons conducted using Dunn-Bonferroni correction.
Effect sizes were reported to enhance interpretability: Partial eta squared (η2) for ANOVA and epsilon squared (ε2) for the Kruskal–Wallis test. All statistical analyses were stratified by parity to account for physiological differences. The significance level was set at p < 0.05 for all comparisons.
RESULTS
Temporal dynamics of postural behavior across parity and clusters
Figures 1–4 present a detailed evaluation of postural behaviors and resting patterns, illustrating rolling activity, rolling rest time, rest duration per bout, and restlessness ratio among dairy cows, stratified by parity and behavioral clusters.
Figure 1.

The figure illustrates (a) rolling activity (minutes/day) of primiparous cows (n = 173) across three cluster groups (0, 1, and 2) and (b) rolling activity (minutes/day) of multiparous cows (n = 53) across two cluster groups (0, and 1), with 95% confidence interval during the −3 to 30 days postpartum.
Figure 5.

The figure demonstrates (a) predicted milk yield (kg/day) of primiparous cows (n = 173) across three cluster groups (0, 1, and 2) and (b) predicted milk yield (kg/day) of multiparous cows (n = 53) within two cluster groups (0, and 1), with 95% confidence interval.
For multiparous cows (Figure 3b), both clusters demonstrated a decline in rest per bout duration approaching calving – Cluster 0 averaging ~65 min and Cluster 1 slightly lower at ~60 min. Post-calving, both groups gradually recovered, though durations remained below prepartum levels. Cluster 0 cows displayed more stable rest patterns overall.
Figures 4a and b show the restlessness ratio, a behavioral indicator of agitation. Primiparous cows in Cluster 1 showed the highest restlessness, peaking at ~18 on the day of calving, then declining to ~10 by 15 DIM. Cluster 0 cows peaked at ~6 and stabilized at 4–5, while the single cow in Cluster 2 maintained a consistently low ratio of ~2–3.
Figure 2.

The figure display (a) rolling rest time (minutes/day) of primiparous cows (n = 173) and (b) rolling rest time (minutes/day) of multiparous cows (n = 53) in two clusters groups (0, and 1) across −3 to 30 days postpartum, with 95% confidence interval.
Figure 4.

The figure demonstrates (a) rolling restlessness ratio of primiparous cows (n = 173) in three cluster groups (0, 1, and 2) and (b) rolling restlessness ratio of multiparous cows (n = 53) in two cluster groups (0, and 1) across −3 to 30 days in milk postpartum, with 95% confidence interval.
Rolling activity patterns from −3 to 30 DIM revealed distinct behavioral differences among primiparous cows across clusters (Figure 1a). Cluster 1 cows exhibited the highest early postpartum activity, peaking at approximately 300 min/day shortly after calving, followed by a progressive decline. In contrast, cows in Cluster 0 maintained a more stable activity pattern, averaging 225 min/day. The single primiparous cow in Cluster 2 showed reduced and inconsistent activity levels.
A similar trend was observed in multiparous cows (Figure 1b). Cluster 1 cows showed elevated activity early postpartum, peaking at around 350 min/day near 5 DIM. However, activity levels declined thereafter. Cows in Cluster 0 maintained relatively steady activity, averaging approximately 200 min/day.
Resting time patterns, depicted in Figures 2a and b, indicated that primiparous cows in Clusters 0 and 1 exhibited reduced resting time leading up to calving (Figure 2a), with a nadir around 5 DIM. Post-calving, Cluster 0 cows maintained a higher average rolling rest time (~600 min/day) compared to Cluster 1 cows (~550 min/day). In contrast, the cow in Cluster 2 exhibited an atypical increase in resting time post-calving, reaching a peak of 1200 min/day.
For multiparous cows (Figure 2b), both Clusters 0 and 1 displayed declining rest time approaching calving. Postpartum, Cluster 0 cows stabilized around 650 min/day, whereas Cluster 1 cows initially declined to 400 min/day and gradually recovered to ~500 min/day by 30 DIM.
Figure 3a illustrates rest per bout durations in primiparous cows. Clusters 0 and 1 maintained relatively stable durations (~90 min/bout/day). The cow in Cluster 2 deviated significantly, with rest per bout increasing sharply post-calving to over 700 min/bout/day.
Among multiparous cows (Figure 4b), Cluster 1 again exhibited the highest restlessness ratio, peaking above 20 on calving day and declining to ~8 by 15 DIM. Cluster 0 cows showed a moderate peak (~6) and stabilized around 4–5 thereafter.
Reproductive performance
The reproductive performance of 226 Holstein Friesian cows was evaluated under tropical conditions, with 76.2% (n = 173) in their first lactation and 23.4% (n = 53) in their second or subsequent lactation (≥2). Cows were categorized into two primary behavioral clusters: Cluster 0 (n = 66, 29.2%) and Cluster 1 (n = 160, 70.7%). A single cow in Cluster 2 was excluded from regression analysis due to its singular representation.
Univariable Cox regression analysis designated Cluster 1 as the reference category (Table 6). The analysis indicated a delayed return to estrus in Cluster 1. At 40 DIM, cows in Cluster 0 were 44% more likely to show estrus than those in Cluster 1 (HR = 1.44, p = 0.09). This likelihood decreased to 32% at 60 DIM (HR = 1.32, p = 0.10) and to 22% at 90 DIM (HR = 1.22, p = 0.19).
Table 6.
Univariate Cox regression analysis of reproductive variables.
| Variables | Cluster | n | Β | SE | p-value | HR | 95% CI | |
|---|---|---|---|---|---|---|---|---|
|
| ||||||||
| Lower | Upper | |||||||
| 1st heat 40 DIM | Cluster (0) | 66 | 0.37 | 0.22 | 0.09 | 1.44 | 0.94 | 2.20 |
| Cluster (1) | 160 | Ref | ||||||
| 1st heat 60 DIM | Cluster (0) | 66 | 0.27 | 0.17 | 0.10 | 1.32 | 0.95 | 1.82 |
| Cluster (1) | 160 | Ref | ||||||
| 1st heat 90 DIM | Cluster (0) | 66 | 0.20 | 0.15 | 0.19 | 1.22 | 0.91 | 1.65 |
| Cluster (1) | 160 | Ref | ||||||
| 1st service 60 DIM | Cluster (0) | 66 | 0.04 | 0.20 | 0.85 | 1.04 | 0.71 | 1.52 |
| Cluster (1) | 160 | Ref | ||||||
| 1st service 90 DIM | Cluster (0) | 66 | 0.00 | 0.16 | 1.00 | 1.00 | 0.74 | 1.36 |
| Cluster (1) | 160 | Ref | ||||||
| 1st service 120 DIM | Cluster (0) | 66 | -0.02 | 0.15 | 0.91 | 0.98 | 0.73 | 1.32 |
| Cluster (1) | 160 | Ref | ||||||
| Pregnancy 100 DIM | Cluster (0) | 66 | 0.24 | 0.26 | 0.34 | 1.28 | 0.77 | 2.12 |
| Cluster (1) | 160 | Ref | ||||||
| Pregnancy 150 DIM | Cluster (0) | 66 | 0.16 | 0.20 | 0.43 | 1.17 | 0.79 | 1.74 |
| Cluster (1) | 160 | Ref | ||||||
| Pregnancy 200 DIM | Cluster (0) | 66 | 0.10 | 0.18 | 0.57 | 1.11 | 0.78 | 1.56 |
| Cluster (1) | 160 | Ref | ||||||
DIM=Number of days in milk, HR=Hazard ratio, CI=Confidence interval.
Although not statistically significant, these findings suggest a biological association between early postpartum behavior and estrus onset. The elevated HRs in Cluster 0 point to accelerated estrus resumption, supporting the utility of behavioral monitoring in optimizing estrus detection and insemination timing.
No significant differences in other reproductive metrics were observed between clusters. However, Cluster 0 cows achieved first service slightly earlier, with a 4% higher likelihood at 60 DIM (HR = 1.04, p = 0.85). Similarly, conception rates at 100, 150, and 200 DIM were marginally higher in Cluster 0, though not statistically significant.
These trends underscore the potential influence of early behavioral patterns on reproductive outcomes. Further studies involving larger, multidimensional datasets and varying management systems are warranted to refine sensor-based estrus detection strategies.
Milk production dynamics across parity and clusters
Tables 3 and 4 and Figures 5a and b illustrate milk production dynamics by parity and behavioral cluster, modeled using the Wood gamma function [17]. Differences in peak time, peak yield, persistency, and cumulative yield were observed across clusters.
Table 4.
Descriptive statistics of milk yield parameters in multiparous cows (n = 53).
| Variables | Multiparous | Cluster (0) | Cluster (1) | |||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|
|
|
|
|
||||||||||
| n | Mean ± SE | Minimum | Maximum | n | Mean ± SE | Minimum | Maximum | n | Mean ± SE | Minimum | Maximum | |
| Peak time | 53 | 51.39 ± 3.11 | 0.00 | 105.42 | 7 | 47.45 ± 13.91 | 0.00 | 94.71 | 46 | 51.99 ± 2.97 | 0.00 | 105.42 |
| Peak yield | 53 | 20.33 ± 0.44 | 12.65 | 26.82 | 7 | 20.92 ± 1.06 | 18.14 | 26.64 | 46 | 20.24 ± 0.48 | 12.65 | 26.82 |
| Persistency | 53 | 51.01 ± 1.81 | 28.77 | 91.36 | 7 | 51.75 ± 4.94 | 33.38 | 72.83 | 46 | 50.90 ± 1.97 | 28.77 | 91.36 |
| MY 56 days | 53 | 1019.84 ± 24.46 | 584.74 | 1438.54 | 7 | 1038.80 ± 83.01 | 780.92 | 1435.84 | 46 | 1016.96 ± 25.61 | 584.74 | 1438.54 |
| MY 84 days | 53 | 1572.47 ± 35.03 | 943.39 | 2126.27 | 7 | 1589.28 ± 105.48 | 1314.27 | 2126.27 | 46 | 1569.92 ± 37.51 | 943.39 | 2114.76 |
| MY 126 days | 53 | 2353.64 ± 49.73 | 1465.73 | 3078.47 | 7 | 2369.93 ± 132.47 | 2067.25 | 3078.47 | 46 | 2351.16 ± 54.17 | 1465.74 | 3030.68 |
| MY 305 days | 53 | 4826.97 ± 103.88 | 3121.47 | 6103.73 | 7 | 4896.57 ± 252.14 | 4089.90 | 6103.73 | 46 | 4816.38 ± 114.27 | 3121.47 | 6101.23 |
Peak time: Number of days in milk (DIM) at which peak was predicted. Peak Yield: Peak milk yield (kg/day). Persistency: Describes the ability of the cow to maintain a relatively stable milk yield after reaching peak production, expressed as the rate of decline in milk yield over time Burgers et al. [39]. MY=Milk yield (kg/day), SE=Standard error. The predicted values of variables are based on the Wood model equation Wood [17]; Peak time: b/c; b=rate of increase in milk yield leading up to peak; c=rate of decline in milk yield after peak; Peak yield:
, Persistency: 100 × (Milk at 305 DIM)/(Peak yield).
For primiparous cows (Table 3 and Figure 5a), Cluster 1 cows peaked at 52.92 ± 2.59 DIM with an average yield of 18.68 ± 0.30 kg/day. Their cumulative 305-DIM yield was 4550.29 ± 7.09 kg. Cluster 0 cows peaked earlier at 50.82 ± 3.45 DIM with a slightly higher peak yield of 18.95 ± 0.43 kg/day and a cumulative yield of 4512.76 ± 104.95 kg. The cow in Cluster 2 exhibited a delayed peak (68.02 DIM) with a low peak yield (13.31 kg/day), followed by a sharp decline – indicating possible physiological or environmental stress.
Figure 3.

The figure explains (a) rolling rest per bout (minutes/bout/day) of primiparous cows (n = 173) across three cluster groups (0, 1, and 2) and (b) rolling rest per bout (minutes/bout/day) of multiparous cows (n = 53) across two cluster groups (0, and 1), with 95% confidence interval, across −3 to 30 days postpartum.
For multiparous cows (Table 4 and Figure 5b), both clusters outperformed primiparous groups. Cluster 1 peaked at 51.99 ± 2.97 DIM (20.24 ± 0.48 kg/day) with a cumulative yield of 4816.38 ± 114.27 kg at 305 DIM. Cluster 0 cows peaked slightly earlier (47.45 ± 13.91 DIM) and produced the highest overall yield (4896.57 ± 252.14 kg). Despite higher variation in Cluster 0, both clusters followed typical lactation trajectories with early peaks and gradual declines.
Multiparous cows in Clusters 0 and 1, on the other hand, reached their peak early on, at 47.45 ± 13.91 DIM and 51.39 ± 3.11 DIM, respectively, and had slightly higher peak yields of 20.92 ± 1.06 kg/day and 20.24 ± 0.48 kg/day. This pattern suggests that the lactation strategy favors an early, intense production phase, followed by a more pronounced decline. Despite the rapid decline following the peak, these animals achieved the highest cumulative yield among multiparous groups at 4896.57 ± 252.14 kg per 305 DIM, marginally surpassing Cluster 1’s output yield of 4816.38 ± 114.27 kg per 305 DIM. Although no statistically significant differences were observed between clusters, Figure 5b demonstrates higher variability in production within Cluster 0, suggesting higher individual variation in lactation efficiency and environmental adaptation. The wider CI in Figure 5b visually highlights this variability, reinforcing the importance of considering both individual-level differences and inter-individual-level variability when inspecting production trends in the herd.
These findings confirm that parity and cluster classification significantly influence lactation patterns. Multiparous cows consistently produced higher yields than primiparous cows. Although differences across clusters were not statistically significant, clustering helped uncover distinct lactation trajectories. This classification has practical value in refining feeding strategies and herd management practices tailored to specific lactation profiles.
Validation of Wood’s lactation curve model
Validation of the Wood lactation model (Table 5) demonstrated moderate predictive performance across parity and cluster groups. R² values ranged from 0.69 to 0.83 in primiparous cows, with the lowest value observed in Cluster 2 (single cow), and from 0.80 to 0.82 in multiparous cows. Mean absolute error (MAE) ranged from 1.05 to 1.48 across all groups, indicating generally stable lactation patterns. These results suggest that the Wood model provides reliable estimates of milk yield in tropical conditions, despite minor variability across parities and clusters.
DISCUSSION
Behavioral dynamics in dairy cows: Temporal trends and implications
This study presents a comprehensive analysis of behavioral dynamics in Holstein Friesian cows by examining postural behavioral indicators – including rolling activity, rest time, rest per bout, and restlessness ratio – across both primiparous and multiparous cows using cluster analysis from −3 to 30 DIM. Marked behavioral distinctions emerged between parity groups, reflecting their physiological and metabolic adaptations to the demands of early lactation. These adaptations varied across clusters and parity, offering meaningful insights into herd behavior.
Primiparous cows in Clusters 0, 1, and 2 demonstrated elevated rolling activity during early lactation, with Cluster 1 peaking at approximately 300 min/day soon after calving. This heightened activity likely reflects physiological and behavioral adjustments to lactation onset [44], driven by calving-related stress [45, 46] and increased energy demands [14, 17]. Conversely, multiparous cows displayed slightly reduced activity levels compared to primiparous counterparts, suggesting more efficient physiological adjustment. All animals generally returned to baseline activity within 2 weeks postpartum, consistent with earlier findings [10]. However, further investigation is warranted to elucidate the interplay of physiological and environmental adaptation in diverse populations, contributing to improved welfare strategies.
Resting behavior, a key indicator of cow welfare and productivity, revealed parity- and cluster-specific differences. A general decline in resting time was observed shortly after calving in all groups (Figures 2a and b) [46–48]. Primiparous cows in Clusters 0 and 1 maintained consistently lower resting times compared to multiparous cows. Notably, the primiparous cow in Cluster 2 exhibited an excessive resting duration exceeding 1200 min/day, potentially signaling underlying metabolic or health challenges [49, 50]. Importantly, resting times did not return to pre-calving levels by 30 DIM, underscoring the sustained impact of calving, milking routines, and management practices [10, 44, 46, 47]. These findings corroborate previous reports parity-related resting disparities [44, 48, 51] and expand on earlier research with a longer observation window.
Analysis of rest per bout durations offered insights into recovery from parturition and management-related stress [52]. Both parity groups in Clusters 0 and 1 maintained stable, moderate rest per bout durations (~90 min/day), suggesting effective adaptation to parturition and routine milking schedules [48, 53]. However, the primiparous cow in Cluster 2 demonstrated significantly extended rest durations post-calving, likely reflecting compromised health or environmental stress exposure. Overall, primiparous cows showed more consistent bout durations compared to their multiparous counterparts (Figures 3a and b), possibly due to acclimatization to new milking protocols [44, 48]. Multiparous cows, being heavier and more physically mature, generally exhibited longer resting durations per bout due to reduced ease in transitioning between postures [44, 48, 52].
The restlessness ratio further illuminated adaptive behavioral patterns. Both primiparous and multiparous cows demonstrated heightened restlessness on the day of calving [10, 46, 47]. Primiparous cows in Cluster 1 had the highest restlessness scores, while those in Cluster 0 exhibited more moderate responses, suggesting more rapid adjustment to postpartum routines [10, 44, 48]. A similar pattern was noted in multiparous cows, likely due to physiological or metabolic constraints reducing their responsiveness to environmental shifts.
Variations in restlessness ratio corroborate findings from both temperate and tropical production systems, indicating its relevance to reproductive function. Elevated restlessness in temperate zones has been linked to delayed estrus [44, 53], whereas in tropical climates, it is often associated with environmental stressors such as heat, which impair estrus expression and insemination outcomes [54–56]. Cluster 1 cows, which exhibited higher restlessness and delayed estrus, support the hypothesis that behavioral stress impedes reproductive recovery. These observations reinforce the importance of integrating behavioral metrics into estrus detection systems, especially under tropical stress conditions.
Reproductive performance and behavioral adaptation
This study evaluated the reproductive outcomes of Holstein Friesian cows in a tropical climate, emphasizing the influence of behavioral patterns and lactation dynamics. Cluster 1 cows exhibited increased restlessness, shorter rest durations, and altered activity patterns – factors likely contributing to delayed estrus and prolonged time to first service compared to Cluster 0. While statistical significance was not reached, these trends align with previous evidence suggesting that reduced rest and heightened restlessness may hinder reproductive recovery [53, 54].
Cows in Cluster 0 demonstrated a 44% greater likelihood of resuming estrus by 40 DIM (HR = 1.44, p = 0.09), a trend that strengthened over time. Their lower restlessness and higher rest times suggest reduced physiological stress and more efficient estrus manifestation [57–59]. Moreover, stable lactation patterns in Cluster 0 indicate lower early lactation stress, enabling greater energy allocation toward reproductive restoration [50, 60]. These observations align with prior research showing that lower metabolic strain and smoother LCs promote faster reproductive recovery in tropical settings [55, 56].
Cluster 0 cows also experienced shorter intervals to first service (e.g., HR = 1.04, p = 0.85 at 60 DIM), further supporting the notion that reduced behavioral stress facilitates postpartum recovery. Their longer rest periods and lower restlessness ratios likely promoted uterine involution and ovarian cyclicity [61, 62], optimizing reproductive readiness [49, 50].
Although conception rates between clusters did not differ significantly, Cluster 0 cows demonstrated higher success rates – 28% greater at 100 DIM (HR = 1.28, p = 0.34), with continued improvement through 200 DIM. These patterns suggest that behavioral stability and lower lactation stress promote favorable reproductive conditions, particularly under tropical stressors known to compromise estrus and oocyte quality [55, 61, 63].
Tailored management interventions that reduce restlessness, promote rest, and support balanced lactation profiles can substantially enhance postpartum recovery and fertility in tropical dairy herds.
Milk production dynamics and lactation modeling
The clustering analysis revealed substantial distinctions in milk production dynamics across parity and behavioral cluster groups, emphasizing the value of behavioral metrics in shaping lactation trajectories. Differences were evident in peak time, yield, persistency, and cumulative milk production (Tables 3 and 4, Figures 5a and b). The Wood gamma function model [17] effectively captured lactation variability when combined with early behavioral metrics.
Among primiparous cows, Cluster 1 achieved greater persistency and cumulative yield compared to Cluster 0, despite a slightly delayed peak (Table 3 and Figure 5a). This suggests that elevated activity and restlessness in Cluster 1 (Figures 1a and 4a) did not adversely impact sustained milk output. These findings are consistent with previous studies by Josefson et al. [64] and Marumo et al. [65], indicating that primiparous cows often compensate for early stress through enhanced persistency.
The single cow in Cluster 2 exhibited an atypical LC, with a delayed peak and lower yield (Table 3 and Figure 5a), alongside behavioral anomalies – such as excessive rest time (>1200 min) and rest per bout (>700 min) (Figures 2a and 3a). These abnormalities may indicate health issues or negative energy balance [14, 50, 66] and support previous findings by Lee et al. [14], Cattaneo et al. [50], and Singh and Bhakat [68] linking atypical LCs with metabolic stress, suboptimal body condition recovery, and heightened disease risk. Future studies should refine clustering models to better identify LC deviations and assess their predictive value for health and productivity.
In multiparous cows, Cluster 0 demonstrated earlier peak times and greater persistency than Cluster 1 (Table 4 and Figure 5b). The sharper post-peak decline in Cluster 1 may reflect physiological strain and elevated behavioral stress during early lactation. Increased activity and restlessness, along with reduced rest durations (Figures 1b and 4b), suggest a maladaptive response to metabolic and environmental demands [53, 69, 70].
Cows in Cluster 0 of both parity groups exhibited more consistent behavioral and lactation profiles. Reduced agitation, extended resting durations, and stable rest per bout metrics facilitated recovery from parturition stress and supported sustained lactation performance. These findings align with earlier reports indicating higher yield and persistency in multiparous cows, particularly with stable behavioral patterns [14, 71, 72]. Conversely, higher persistency among primiparous cows, despite lower peak yields, supports previous claims regarding their physiological immaturity and limited mammary gland development [44, 65, 73, 74].
Behavioral traits, particularly rest duration, appear strongly associated with milk yield. Previous studies by Tucker et al. [53] and McWilliams et al. [75] suggest milk output can increase by 1.36–2.72 kg/day through optimized early rest periods. In this study, cows in Cluster 0 experienced fewer behavioral fluctuations and maintained higher production consistency during early lactation.
LC modeling and limitations
The Wood gamma function model [17] successfully captured LC characteristics across clusters and parities. In primiparous Clusters 0 and 1, the model effectively reflected gradual peak onset and high persistency. Cluster 0 cows in the ≥2 parity group achieved the highest cumulative yield at 305 DIM. Their flatter LC trajectory is characteristic of younger cows still undergoing mammary gland development [73, 74].
Among multiparous cows, the model fit was equally strong, capturing more intense production early on and subsequent yield decline. For Cluster 0, early peak and high cumulative output were followed by a steep drop, consistent with previous reports by Lee et al. [14] and Masía et al. [76] linking high early yield to accelerated metabolic decline.
These results highlight contrasting lactation strategies: Multiparous cows achieve higher yield but exhibit sharper declines, whereas primiparous cows sustain lower but more persistent production. Accurate modeling of both typical and atypical LCs requires high-resolution tools capable of distinguishing nuanced curve profiles.
Notably, this study faced several limitations. Sensor placement on the right hind leg may introduce inconsistencies due to variation in movement or positioning. Cluster 2’s sample size (n = 1) limited statistical power for reproductive comparisons. In addition, the single-farm setting and use of one sensor model constrain generalizability. Future research should incorporate multisensor approaches, validate findings across diverse environments, and assess cross-farm reproducibility to enhance external validity and applicability.
CONCLUSION
This study provides an integrative assessment of early postpartum behavioral dynamics and their association with reproductive performance and milk production in Holstein Friesian cows under tropical conditions. By employing K-means clustering on sensor-derived postural behavioral variables – namely, rolling activity, rest time, rest per bout, and restlessness ratio – the study identified distinct behavioral phenotypes across parity groups. The application of the Wood gamma function model [17] further enabled the characterization of LCs, elucidating variations in peak yield, persistency, and cumulative milk production across clusters.
The results demonstrated that cows in Cluster 0, characterized by more stable activity levels, longer rest durations, and lower restlessness ratios, exhibited superior reproductive performance trends and higher cumulative milk yields. In contrast, cows in Cluster 1, which displayed elevated early postpartum activity and restlessness, experienced delayed estrus resumption and a steeper decline in milk yield post-peak. The single animal in Cluster 2 exhibited atypical behavioral and lactation profiles, indicating possible underlying health or metabolic disorders. These findings underscore the relevance of behavioral clustering in understanding the physiological responses of dairy cows during early lactation, particularly in high-stress tropical environments.
A key strength of this study lies in its integration of high-resolution behavioral sensor data with reproductive and lactation outcomes over an extended postpartum window (−3 to 30 DIM), combined with rigorous statistical modeling using Cox regression and LC fitting. The use of cluster-based behavioral profiles provided a novel framework for identifying animals at risk of reproductive inefficiency or suboptimal milk production, offering actionable insights for precision dairy management.
However, several limitations warrant consider-ation. First, the use of a single commercial dairy farm and a limited number of animals in certain clusters (particularly Cluster 2) restricts the generalizability and statistical power of the findings. Second, reliance on a single sensor placement (right hind leg) may introduce measurement variability due to differences in locomotion and posture. Third, the Wood model, while effective in capturing general lactation trends, does not account for external modifiers such as disease, heat stress, or nutritional changes.
Future studies should address these limitations by incorporating larger, multi-farm datasets with diverse environmental and managerial conditions. Integration of multi-sensor platforms, real-time data streaming, and advanced machine learning techniques may further enhance the predictive capacity of behavioral models. Moreover, exploring the causal mechanisms linking behavioral traits to reproductive physiology and metabolic status could refine early detection systems for improving fertility and productivity in tropical dairy systems.
In summary, this study highlights the practical utility of sensor-based behavioral clustering in identifying lactation and reproductive patterns and advocates for the development of precision tools tailored to the environmental and physiological realities of tropical dairy farming.
AUTHORS’ CONTRIBUTIONS
AR and CI: Conceptualization, methodology development, investigation, data acquisition, and drafted and edited the manuscript. KA: Data acquisition and drafted, reviewed, and edited the manuscript. TS: Interpretation of data and reviewed and edited the manuscript. HH: Interpretation of data, supervised the study, and reviewed and edited the manuscript. All authors have read and approved the final version of the manuscript.
ACKNOWLEDGEMENTS
The authors express their sincere gratitude to the staff of Sithichoke Dairy Farm, Thailand, for their substantial assistance and cooperation throughout this study. We are also deeply thankful for the financial support provided by the Second Century Fund (C2F), Chulalongkorn University, Bangkok, Thailand, and the 90th Anniversary of Chulalongkorn University (Ratchadaphisek Somphot Endowment Fund, GCUGR1125662085D).
COMPETING INTERESTS
The authors declare that they have no competing interests.
PUBLISHER’S NOTE
Veterinary World remains neutral with regard to jurisdictional claims in published institutional affiliation.
REFERENCES
- 1.Eerdekens A, Deruyck M, Fontaine J, Martens L, De Poorter E, Plets D, Joseph W. A framework for energy-efficient equine activity recognition with leg accelerometers. Comput. Electron. Agric. 2021;183:106020. [Google Scholar]
- 2.Mao A, Huang E, Wang X, Liu K. Deep learning-based animal activity recognition with wearable sensors:Overview, challenges, and future directions. Comput. Electron. Agric. 2023;211:108043. [Google Scholar]
- 3.Da Silva Santos A, De Medeiros V.W.C, Gonçalves G.E. Monitoring and classification of cattle behavior:A survey. Smart Agric. Technol. 2023;3:100091. [Google Scholar]
- 4.Rodriguez-Baena D.S, Gomez-Vela F.A, García-Torres M, Divina F, Barranco C.D, Daz-Diaz N, Jimenez M, Montalvo G. Identifying livestock behavior patterns based on accelerometer dataset. J. Comput. Sci. 2020;41:101076. [Google Scholar]
- 5.Mancuso D, Castagnolo G, Porto S.M. Cow behavioural activities in extensive farms:Challenges of adopting automatic monitoring systems. Sensors. 2023;23(8):3828. doi: 10.3390/s23083828. [DOI] [PMC free article] [PubMed] [Google Scholar]
- 6.Džermeikaitė K, Bačėninaitė D, Antanaitis R. Innovations in cattle farming:Application of innovative technologies and sensors in the diagnosis of diseases. Animals. 2023;13(5):780. doi: 10.3390/ani13050780. [DOI] [PMC free article] [PubMed] [Google Scholar]
- 7.Halachmi I, Guarino M, Bewley J, Pastell M. Smart animal agriculture:Application of real-time sensors to improve animal well-being and production. Annu. Rev. Anim. Biosci. 2019;7(1):403–425. doi: 10.1146/annurev-animal-020518-114851. [DOI] [PubMed] [Google Scholar]
- 8.Edwardes F, Van der Voort M, Hogeveen H. The economics of sensor-based management of dairy cow suboptimal mobility. J. Dairy Sci. 2022;105(12):9682–9701. doi: 10.3168/jds.2021-21726. [DOI] [PubMed] [Google Scholar]
- 9.Giannone C, Bovo M, Ceccarelli M, Torreggiani D, Tassinari P. Review of the heat stress-induced responses in dairy cattle. Animals. 2023;13(22):3451. doi: 10.3390/ani13223451. [DOI] [PMC free article] [PubMed] [Google Scholar]
- 10.Raza A, Abbas K, Swangchan-Uthai T, Hogeveen H, Inchaisri C. Behavioral adaptations in tropical dairy cows:Insights into calving day predictions. Animals. 2024;14(12):1834. doi: 10.3390/ani14121834. [DOI] [PMC free article] [PubMed] [Google Scholar]
- 11.Hufana-Duran D, Duran P. Animal reproduction strategies for sustainable livestock production in the tropics. IOP Conf. Ser. Earth Environ. Sci. 2020;492:012065. [Google Scholar]
- 12.Vallejo-Timarán D, Montoya-Zuluaga J, Castillo-Vanegas V, Maldonado-Estrada J. Parity and season affect hematological, biochemical, and milk parameters during the early postpartum period in grazing dairy cows from high-tropics herds. Heliyon. 2020;6(5):e04049. doi: 10.1016/j.heliyon.2020.e04049. [DOI] [PMC free article] [PubMed] [Google Scholar]
- 13.Adenuga A.H, Jack C, Olagunju K.O, Ashfield A. Economic viability of adoption of automated oestrus detection technologies on dairy farms:A review. Animals. 2020;10(7):1241. doi: 10.3390/ani10071241. [DOI] [PMC free article] [PubMed] [Google Scholar]
- 14.Lee M, Lee S, Park J, Seo S. Clustering and characterization of the lactation curves of dairy cows using K-medoids clustering algorithm. Animals. 2020;10(8):1348. doi: 10.3390/ani10081348. [DOI] [PMC free article] [PubMed] [Google Scholar]
- 15.Mbuthia J, Mayer M, Reinsch N. Modeling heat stress effects on dairy cattle milk production in a tropical environment using test-day records and random regression models. Animal. 2021;15(8):100222. doi: 10.1016/j.animal.2021.100222. [DOI] [PubMed] [Google Scholar]
- 16.M'Hamdi N, Darej C, Attia K, Znaidi I.E.A, Khattab R, Djelailia H, Bouraoui R, Taboubi R, Marzouki L, Ayadi M. Modelling THI effects on milk production and lactation curve parameters of Holstein dairy cows. J. Therm. Biol. 2021;99:102917. doi: 10.1016/j.jtherbio.2021.102917. [DOI] [PubMed] [Google Scholar]
- 17.Wood P. Algebraic model of the lactation curve in cattle. Nature. 1967;216(5111):164–165. [Google Scholar]
- 18.Omar A.I, Khan M.Y.A, Su X, Dhakal A, Hossain S, Razu M.T, Si J, Pauciullo A, Faruque M.O, Zhang Y. Factors affecting the milk production traits and lactation curve of the indigenous river buffalo populations in Bangladesh. Animals. 2024;14(8):1248. doi: 10.3390/ani14081248. [DOI] [PMC free article] [PubMed] [Google Scholar]
- 19.Evangelista A.F, Martins R, Valotto A.A, Dias L.T, Teixeira R.D.A. Environmental factors on the prediction of the lactation curve of Holstein cows. Pesqui. Agropecu. Bras. 2024;59:e03366. [Google Scholar]
- 20.Thammacharoen S, Chanpongsang S, Chaiyabutr N, Teedee S, Pornprapai A, Insam-Ang A, Srisa-Ard C, Channacoop N. An analysis of a herd-based lactation curve reveals the seasonal effect from dairy cows fed under high ambient temperatures. Thai. J. Vet. Med. 2020;50(2):169–178. [Google Scholar]
- 21.Shija D.S, Mwai O.A, Ojango J.M, Komwihangilo D.M, Bebe B.O. Assessing lactation curve characteristics of dairy cows managed under contrasting husbandry practices and stressful environments in Tanzania. World. 2022;3(4):1032–1052. [Google Scholar]
- 22.Rebuli K.B, Ozella L, Vanneschi L, Giacobini M. Multi-algorithm clustering analysis for characterizing cow productivity on automatic milking systems over lactation periods. Comput. Electron. Agric. 2023;211:108002. [Google Scholar]
- 23.Grelet C, Vanlierde A, Hostens M, Foldager L, Salavati M, Ingvartsen K.L, Crowe M, Sorensen M.T, Froidmont E, Ferris C. Potential of milk mid-IR spectra to predict metabolic status of cows through blood components and an innovative clustering approach. Animal. 2019;13(3):649–658. doi: 10.1017/S1751731118001751. [DOI] [PubMed] [Google Scholar]
- 24.Pereira M, El Faro L, Savegnago R, Costa E, Vercesi Filho A, Faria C. Estimates of genetic parameters and cluster analysis of the lactation curve of dairy Gyr cattle. Livest. Sci. 2021;244:104337. [Google Scholar]
- 25.Boonkum W, Teawyoneyong W, Chankitisakul V, Duangjinda M, Buaban S. Impact of heat stress on milk yield, milk fat-to-protein ratio, and conception rate in thai-holstein dairy cattle:A phenotypic and genetic perspective. Animals. (Basel) 2024;14(20):3026. doi: 10.3390/ani14203026. [DOI] [PMC free article] [PubMed] [Google Scholar]
- 26.Sae-Tiao T, Laodim T, Koonawootrittriron S, Suwanasopee T, Elzo M.A. Tropical climate change and its effect on milk production of dairy cattle in Thailand. Livest. Res. Rural. Dev. 2019;31:194. [Google Scholar]
- 27.Thammacharoen S, Saipin N, Nguyen T, Chaiyabutr N. Effects of High Ambient Temperature on Milk Protein Synthesis in Dairy Cows and Goats:Insights from the Molecular Mechanism Studies, in Milk Protein-New Research Approaches. IntechOpen, London. 2022 [Google Scholar]
- 28.Iqbal M.W, Draganova I, Morel P.C, Morris S.T. Validation of an accelerometer sensor-based collar for monitoring grazing and rumination behaviours in grazing dairy cows. Animals (Basel) 2021;11(9):2724. doi: 10.3390/ani11092724. [DOI] [PMC free article] [PubMed] [Google Scholar]
- 29.Neethirajan S. Artificial intelligence and sensor innovations:Enhancing livestock welfare with a human-centric approach. Hum. Cent. Intell. Syst. 2023;4(4):77–92. [Google Scholar]
- 30.Papageorgiou G, Porgouris K, Efstathiades A, Papageorgiou G.A. Evaluating the Development of Activity Monitoring Systems for Small Scale Dairy Farms, 2020. In:7th International Conference on Energy Efficiency and Agricultural Engineering. (EE and AE) 2020:1–4. [Google Scholar]
- 31.Henriksen J, Munksgaard L. Validation of AfiTagII, a device for automatic measuring of lying behaviour in Holstein and Jersey cows on two different bedding materials. Animal. 2019;13(3):617–621. doi: 10.1017/S1751731118001623. [DOI] [PubMed] [Google Scholar]
- 32.Microsoft Corporation(s) Software Microsoft Excel (Student and Home Edition) [Software]. Microsoft Corporation, United States. 2021 [Google Scholar]
- 33.Gupta M.K, Chandra P. A comprehensive survey of data mining. Int. J. Inf. Technol. 2020;12(4):1243–1257. [Google Scholar]
- 34.Ikotun A.M, Ezugwu A.E, Abualigah L, Abuhaija B, Heming J. K-means clustering algorithms:A comprehensive review, variants analysis, and advances in the era of big data. Inf. Sci. 2023;622:178, 210. [Google Scholar]
- 35.Davis B.J, Curriero F.C. Development and evaluation of geostatistical methods for non-Euclidean-based spatial covariance matrices. Math. Geosci. 2019;51(6):767–791. doi: 10.1007/s11004-019-09791-y. [DOI] [PMC free article] [PubMed] [Google Scholar]
- 36.Hadi A.S. A new distance between multivariate clusters of varying locations, elliptical shapes, and directions. Pattern Recognit. 2022;129:108780. [Google Scholar]
- 37.Syakur M.A, Khotimah B.K, Rochman E, Satoto B.D. Integration k-means clustering method and elbow method for identification of the best customer profile cluster. IOP Conf. Ser. Mater. Sci. Eng. 2018;336:012017. [Google Scholar]
- 38.Shutaywi M, Kachouie N.N. Silhouette analysis for performance evaluation in machine learning with applications to clustering. Entropy (Basel) 2021;23(6):759. doi: 10.3390/e23060759. [DOI] [PMC free article] [PubMed] [Google Scholar]
- 39.Burgers E, Kok A, Goselink R, Hogeveen H, Kemp B, Van Knegsel A. Effects of extended voluntary waiting period from calving until first insemination on body condition, milk yield, and lactation persistency. J. Dairy Sci. 2021;104(7):8009–8022. doi: 10.3168/jds.2020-19914. [DOI] [PubMed] [Google Scholar]
- 40.Harris C.R, Millman K.J, Van Der Walt S.J, Gommers R, Virtanen P, Cournapeau D, Wieser E, Taylor J, Berg S, Smith N.J. Array programming with NumPy. Nature. 2020;585(7825):357–362. doi: 10.1038/s41586-020-2649-2. [DOI] [PMC free article] [PubMed] [Google Scholar]
- 41.Reback J, McKinney W, Van Den Bossche J, Augspurger T, Cloud P, Klein A, Hawkins S, Roeschke M, Tratner J, She C. Software Pandas-Dev/Pandas:Pandas 1.0. 5 [Software] 2020 [Google Scholar]
- 42.Virtanen P, Gommers R, Oliphant T.E, Haberland M, Reddy T, Cournapeau D, Burovski E, Peterson P, Weckesser W, Bright J. SciPy 1.0:fundamental algorithms for scientific computing in Python. Nat. Methods. 2020;17(3):261–272. doi: 10.1038/s41592-019-0686-2. [DOI] [PMC free article] [PubMed] [Google Scholar]
- 43.Waskom M.L. Seaborn:Statistical data visualization. J. Open source Softw. 2021;6(60):3021. [Google Scholar]
- 44.Neave H, Lomb J, Von Keyserlingk M, Behnam-Shabahang A, Weary D. Parity differences in the behavior of transition dairy cows. J. Dairy Sci. 2017;100(1):548–561. doi: 10.3168/jds.2016-10987. [DOI] [PubMed] [Google Scholar]
- 45.Toledo I, Casarotto L, Dahl G. Seasonal effects on multiparous dairy cow behavior in early lactation. JDS Commun. 2024;5(5):379–383. doi: 10.3168/jdsc.2022-0358. [DOI] [PMC free article] [PubMed] [Google Scholar]
- 46.Matamala F, Strappini A. Sepúlveda-Varas, P.(2021) Dairy cow behaviour around calving:Its relationship with management practices and environmental conditions. Austral. J. Vet. Sci. 53(1):9–22. [Google Scholar]
- 47.Jensen M.B. Behaviour around the time of calving in dairy cows. Appl. Anim. Behav. Sci. 2012;139((3–4)):195–202. [Google Scholar]
- 48.Proudfoot K.L, Huzzey J.M. A first time for everything:The influence of parity on the behavior of transition dairy cows. JDS Commun. 2022;3(6):467–471. doi: 10.3168/jdsc.2022-0290. [DOI] [PMC free article] [PubMed] [Google Scholar]
- 49.Wankhade P.R, Manimaran A, Kumaresan A, Jeyakumar S, Ramesha K, Sejian V, Rajendran D, Varghese M.R. Metabolic and immunological changes in transition dairy cows:A review. Vet. World. 2017;10(11):1367. doi: 10.14202/vetworld.2017.1367-1377. [DOI] [PMC free article] [PubMed] [Google Scholar]
- 50.Cattaneo L, Lopreiato V, Trevisi E, Minuti A. Association of postpartum uterine diseases with lying time and metabolic profiles of multiparous Holstein dairy cows in the transition period. Vet. J. 2020;263:105533. doi: 10.1016/j.tvjl.2020.105533. [DOI] [PubMed] [Google Scholar]
- 51.Munksgaard L, Weisbjerg M, Henriksen J, Løvendahl P. Changes to steps, lying, and eating behavior during lactation in Jersey and Holstein cows and the relationship to feed intake, yield, and weight. J. Dairy Sci. 2020;103(5):4643–4653. doi: 10.3168/jds.2019-17565. [DOI] [PubMed] [Google Scholar]
- 52.Hendriks S, Phyn C, Turner S, Mueller K, Kuhn-Sherlock B, Donaghy D, Huzzey J, Roche J. Lying behavior and activity during the transition period of clinically healthy grazing dairy cows. J. Dairy Sci. 2019;102(8):7371–7384. doi: 10.3168/jds.2018-16045. [DOI] [PubMed] [Google Scholar]
- 53.Tucker C.B, Jensen M.B, De Passillé A.M, Hänninen L, Rushen J. Invited review:Lying time and the welfare of dairy cows. J. Dairy Sci. 2021;104(1):20–46. doi: 10.3168/jds.2019-18074. [DOI] [PubMed] [Google Scholar]
- 54.Silper B, Madureira A, Polsky L, Soriano S, Sica A, Vasconcelos J, Cerri R. Daily lying behavior of lactating Holstein cows during an estrus synchronization protocol and its associations with fertility. J. Dairy Sci. 2017;100(10):8484–8495. doi: 10.3168/jds.2016-12160. [DOI] [PubMed] [Google Scholar]
- 55.Sammad A, Umer S, Shi R, Zhu H, Zhao X, Wang Y. Dairy cow reproduction under the influence of heat stress. J. Anim. Physiol. Anim. Nutr. 2020;104(4):978–986. doi: 10.1111/jpn.13257. [DOI] [PubMed] [Google Scholar]
- 56.Triwutanon S, Rukkwamsuk T. Factors affecting first ovulation in postpartum dairy cows under tropical conditions:A review. Open Vet. J. 2023;13(12):1536. doi: 10.5455/OVJ.2023.v13.i12.3. [DOI] [PMC free article] [PubMed] [Google Scholar]
- 57.Endris M, Feki E. Review on effect of stress on animal productivity and response of animal to stressors. J. Anim. Vet. Adv. 2021;20(1):1–14. [Google Scholar]
- 58.Reith S, Hoy S. Behavioral signs of estrus and the potential of fully automated systems for detection of estrus in dairy cattle. Animal. 2018;12(2):398–407. doi: 10.1017/S1751731117001975. [DOI] [PubMed] [Google Scholar]
- 59.Das S, Shaji A, Nain D, Singha S, Karunakaran M, Baithalu R.K. Precision technologies for the management of reproduction in dairy cows. Trop. Anim. Health Prod. 2023;55(5):286. doi: 10.1007/s11250-023-03704-2. [DOI] [PubMed] [Google Scholar]
- 60.Mukherjee J, Das P.K, Banerjee D. Das P.K, Sejian V, Mukherjee J, Banerjee D, editors. Lactation physiology. Textbook of Veterinary Physiology. Springer Nature Singapore, Singapore. 2023:639–674. [Google Scholar]
- 61.Skliarov P, Kornienko V, Midyk S, Mylostyvyi R. Impaired reproductive performance of dairy cows under heat stress. Agric. Conspec. Sci. 2022;87(2):85–92. [Google Scholar]
- 62.Ollinger A.L. The Impact of Lying Behavior on Reproduction in Dairy Cattle. Institution:Department of Animal Sciences, Tarleton State University. [Type of Thesis] 2024 [Google Scholar]
- 63.De Rensis F, Saleri R, Garcia-Ispierto I, Scaramuzzi R, López-Gatius F. Effects of heat stress on follicular physiology in dairy cows. Animals. 2021;11(12):3406. doi: 10.3390/ani11123406. [DOI] [PMC free article] [PubMed] [Google Scholar]
- 64.Josefson C.C, De Moura Pereira L, Skibiel A.L. Chronic stress decreases lactation performance. Integr. Comp. Biol. 2023;63(3):557–568. doi: 10.1093/icb/icad044. [DOI] [PubMed] [Google Scholar]
- 65.Marumo J, Lusseau D, Speakman J, Mackie M, Hambly C. Influence of environmental factors and parity on milk yield dynamics in barn-housed dairy cattle. J. Dairy Sci. 2022;105(2):1225–1241. doi: 10.3168/jds.2021-20698. [DOI] [PubMed] [Google Scholar]
- 66.Ruban S, Danshyn V, Matvieiev М, Borshch O, Korol-Bezpala L. Сharacteristics of Lactation Curve and Reproduction in Dairy Cattle. Institution:Department of Genetics, Breeding and Reproductive Biotechnology, National University of Life and Environmental Science of Ukraine. [Type of Thesis] 2022 [Google Scholar]
- 67.Atashi H, Asaadi A, Hostens M. Association between age at first calving and lactation performance, lactation curve, calving interval, calf birth weight, and dystocia in Holstein dairy cows. PLoS One. 2021;16(1):e0244825. doi: 10.1371/journal.pone.0244825. [DOI] [PMC free article] [PubMed] [Google Scholar]
- 68.Singh A, Bhakat C. The relationship between body condition score and milk production, udder health and reduced negative energy balance during initial lactation period:A review. Iran. J. Appl. Anim. Sci. 2022;12(1):1–9. [Google Scholar]
- 69.Oke O, Uyanga V, Iyasere O, Oke F, Majekodunmi B, Logunleko M, Abiona J, Nwosu E, Abioja M, Daramola J. Environmental stress and livestock productivity in hot-humid tropics:Alleviation and future perspectives. J. Therm. Biol. 2021;100:103077. doi: 10.1016/j.jtherbio.2021.103077. [DOI] [PubMed] [Google Scholar]
- 70.Borchers M.R. The Effects of Housing on Dairy Cow Comfort, Immune Function, Stress, Productivity, and Milk Quality. Institution:College of Agriculture, Food and Environment, University of Kentucky. [Ph.D. Thesis] 2018 [Google Scholar]
- 71.Davis L, French E.A, Aguerre M.J, Ali A. Impact of parity on cow stress, behavior, and production at a farm with guided traffic automatic milking system. Front. Anim. Sci. 2023;4:1258935. [Google Scholar]
- 72.Chisowa D M. Effect of parity on milk yield in lactating dairy cows. Magna Sci. Adv. Biol. Pharm. 2023;8(2):6–12. [Google Scholar]
- 73.Torshizi M.E, Mashhadi M.H, Farhangfar H. Different aspects of lactation persistency in dairy cows. Indian J. Anim. Sci. 2019;89(6):607–614. [Google Scholar]
- 74.Probo M, Atashi H, Hostens M. Lactation performances in primiparous Holstein cows following short and normal gestation lengths. Front. Vet. Sci. 2024;11:1289116. doi: 10.3389/fvets.2024.1289116. [DOI] [PMC free article] [PubMed] [Google Scholar]
- 75.McWilliams C, Schwanke A, DeVries T. Is greater milk production associated with dairy cows who have a greater probability of ruminating while lying down? JDS Commun. 2022;3(1):66–71. doi: 10.3168/jdsc.2021-0159. [DOI] [PMC free article] [PubMed] [Google Scholar]
- 76.Masía F, Lyons N, Piccardi M, Balzarini M, Hovey R, Garcia S. Modeling variability of the lactation curves of cows in automated milking systems. J. Dairy Sci. 2020;103(9):8189–8196. doi: 10.3168/jds.2019-17962. [DOI] [PubMed] [Google Scholar]
