Prediction of retained placenta in holstein dairy cows based on machine learning approaches: Comparative analysis of
Zihao Zhang1, Zefeng Li1, Wenkuo Luo1
1College of Information Engineering, Northwest A&F University, Yangling, Shaanxi 712100, China.
Abstract:
Retained placenta (RP) is a common postpartum disorder in dairy cows that significantly impairs reproductive performance and farm profitability. This study aimed to identify key risk factors and develop a robust machine learning (ML)-based predictive model for RP in Holstein cows using routinely collected farm data. Pearson correlation analysis confirmed no significant multicollinearity (|r| < 0.8) among the retained features. Seven algorithms - Decision Tree (DT), Random Forest (RF), Support Vector Machine (SVM), Multilayer Perceptron (MLP), Gradient Boosting Decision Tree (GBDT), Logistic Regression (LR), and a stacking ensemble model - were implemented and optimized using stratified cross-validation. The stacking model outperformed all individual models and the LR baseline, achieving a Matthews Correlation Coefficient (MCC) of 0.867 (95% Confidence Interval: 0.859-0.876). Statistical analysis and feature importance ranking identified parity, calving season, twinning status (TS), calf birth weight (CBW), age at first calving (AFC), dry period (DP), and pregnancy length (PL) as the most critical predictors. Features such as dystocia, abortion, and stillbirth, observed during parturition (before the 24-hour diagnostic threshold for RP), enabled the model to predict RP risk in the immediate post-calving period. Local Interpretable Model-agnostic Explanations (LIME) were used to enhance model transparency at the individual cow level. This study shows that ML approaches have significant potential for developing practical post-calving predictive tools, facilitating timely intervention, reducing unnecessary treatments, and ultimately improving dairy cow welfare and management efficiency.


