AI Chat Paper
Note: Please note that the following content is generated by AMiner AI. SciOpen does not take any responsibility related to this content.
{{lang === 'zh_CN' ? '文章概述' : 'Summary'}}
{{lang === 'en_US' ? '中' : 'Eng'}}
Chat more with AI
PDF (935 KB)
Collect
Submit Manuscript AI Chat Paper
Show Outline
Outline
Show full outline
Hide outline
Outline
Show full outline
Hide outline
Publishing Language: Chinese

Predicting respiratory rate of dairy cows using hyperparameter-optimized random forest models

Geqi YAN1Wanying ZHAO2Zhenwei YU3Hongchao JIAO1( )Hai LIN1Hao LI4,5Zhengxiang SHI4,5Chaoyuan WANG4,5
College of Animal Science and Technology, Shandong Agricultural University, Tai’an 271018, China
China Rural Technology Development Center, Beijing 100045, China
College of Mechanical and Electronic Engineering, Shandong Agricultural University, Tai’an 271018, China
College of Water Resources and Civil Engineering, China Agricultural University, Beijing 100083, China
Key Laboratory of Agricultural Engineering in Structure and Environment, Ministry of Agriculture and Rural Affairs, Beijing 100083, China
Show Author Information

Abstract

Heat stress has threatened dairy cows during periods of high temperatures. Dairy farms can often assess the respiratory rate (breahts per minute, bpm) of dairy cows, and then implement timely environmental control measures to mitigate the heat stress, thus enhancing the welfare of animals and production performance. However, previous empirical or numerical models cannot accurately predict the respiratory rate of individual dairy cows in real environments. Data-driven machine learning models can be expected to provide a better representation of the relationship between various variables, particularly on the actual respiratory rate. In this study, a random forest-based prediction model was introduced for the cow respiration rate. Five hyperparameters were fine-tuned using genetic algorithm (GA), differential evolution algorithm (DE), particle swarm optimization algorithm (PSO), and Bayesian optimization (BO). These random forest-based models were compared with the artificial neural network (ANN) and extreme gradient boosting (XGBoost) models under grid search (GS). The training data was obtained from a commercial dairy farm in North China. The thermal environment parameters (air temperature, relative humidity, wind speed, and solar radiation) were integrated with the sampling time blocks and cattle-related variables. The thermal environment variables were utilized as the input features to construct four heat stress indices, namely the temperature-humidity index (THI), adjusted temperature-humidity index (ATHI), equivalent temperature index for cattle (STIC), and skin temperature index (STIC). The dataset was comprised of 3005 records, with 80% allocated for training and 20% for testing. Hyperparameter optimization was conducted on the training set using 5-fold cross-validation. The correlation analysis revealed that there was a highly significant correlation (P<0.01) between all thermal environment variables, heat stress indices, and the respiratory rate of cows. Additionally, significant correlations (P<0.01) were observed between the thermal environment variables and heat stress indices. In feature collinearity, the overall dataset was partitioned into five sub-datasets: EP, THI, ATHI, ETIC, and STIC dataset. The differentiation among these subsets was combined with the distinct environmental variables. Specifically, the EP dataset comprised four environmental parameters, while the rest dataset's features were the corresponding indices. Results indicated that the baseline random forest model achieved the highest prediction accuracy, when utilizing the adjusted temperature-humidity index, time block, milk production of the cows, days of lactation, body posture, and the number of calving as inputs. On the test set of the ATHI feature, the performance of the RF-based model was better than those of the GS-ANN and GS-XGBoost under the four intelligent optimizations. The random forest model was optimized by the differential evolution algorithm (DE-RF), indicating the highest accuracy, with a coefficient of determination (R2), mean absolute error (MAE), mean absolute percentage error (MAPE), and root mean square error (RMSE) on the testing set of 0.614, 7.708 bpm, 14.4%, and 9.730 bpm, respectively. After that, the Bayesian-optimized random forest model (BO-RF) was achieved in a coefficient of determination, mean absolute error, mean absolute percentage error, and root mean square error on the testing set of 0.614, 7.723, 14.4%, and 9.737, respectively. Notably, the BO-RF was only required 1/200 of the time taken by the DE-RF. As a result, the BO-RF displayed the most favourable overall performance, in terms of prediction accuracy and computational time. Subsequently, the relative importance (RI) of the input features was determined using the BO-RF. The feature importance analysis revealed that the adjusted temperature-humidity index held the highest importance in the model prediction (RI value = 0.73), followed by time block (RI value = 0.09), milk production of cattle (RI value = 0.07), and days of lactation (RI value = 0.06). The body posture of the cattle (RI value = 0.03) and the number of calving (RI value = 0.02) shared a marginal impact on the model predictions. This finding can offer valuable insights into the precise and intelligent control system in dairy barns.

CLC number: S126 Document code: A

References

【1】
【1】
 
 
Transactions of the Chinese Society of Agricultural Engineering
Pages 195-203

{{item.num}}

Comments on this article

Go to comment

< Back to all reports

Review Status: {{reviewData.commendedNum}} Commended , {{reviewData.revisionRequiredNum}} Revision Required , {{reviewData.notCommendedNum}} Not Commended Under Peer Review

Review Comment

Close
Close
Cite this article:
YAN G, ZHAO W, YU Z, et al. Predicting respiratory rate of dairy cows using hyperparameter-optimized random forest models. Transactions of the Chinese Society of Agricultural Engineering, 2024, 40(11): 195-203. https://doi.org/10.11975/j.issn.1002-6819.202401090

716

Views

8

Downloads

0

Crossref

0

Web of Science

11

Scopus

Received: 12 January 2024
Revised: 17 April 2024
Published: 01 June 2024
© Chinese Society of Agricultural Engineering 2024