Skip to Content
Engineering ProceedingsEngineering Proceedings
  • Proceeding Paper
  • Open Access

2 March 2026

Comparative Analysis of Machine-Learning and Deep-Learning Approaches for Accurate Animal Disease Prediction and Health Risk Assessment †

,
,
,
and
Department of Computer Science and Engineering, School of Engineering and Technology, GIET University, Gunupur 765022, India
*
Author to whom correspondence should be addressed.
Presented at the 6th International Electronic Conference on Applied Sciences, 9–11 December 2025; Available online: https://sciforum.net/event/ASEC2025.

Abstract

Effective, efficient, and early animal disease prediction is a challenging task. Identifying and reducing animal health risks is important for preventing disease outbreaks and improving cattle management. This study presents the machine-learning and hybrid deep-learning models for animal risk prediction. We employed eight classifiers (Support Vector Machine, Logistic Regression, Decision Tree, K-Nearest Neighbors, Gaussian Naive Bayes, and Random Forest) along with feature-enhanced hybrid variants (RF–CNN and RF–ANN) to early detect risk to animals’ health. Our main objective is to develop and evaluate robust ML models for predicting animal health risks. Apart from these, we also present a comparative study of the conventional and hybrid models to construct a decision support system for early disease prediction. The experimental work reveals that RF obtained the highest accuracy of 95.77%, a macro F1-score of 0.9343, and a weighted F1-score of 0.9515. We also conduct the statistical test to confirm the robustness of the model for animal disease prediction. The proposed framework provides a scalable, interpretable decision-support system for real-world animal health monitoring and early disease intervention.

1. Introduction

Animal health management is a critical component of global food security, public health, and sustainable livestock production. Healthy animals contribute to improved agricultural output, reduced economic losses, and minimized risks of zoonotic disease transmission. Hence, early detection of animal diseases remains a major challenge, particularly in regions where veterinary resources and diagnostic facilities are limited. The traditional methods of identifying diseases in animals are mostly time-consuming, as they depend on manual observations and clinical expertise. Animals are unable to express their health issues properly, making disease detection challenging. Some symptoms are detected at an early stage, but disease detection takes a long time in a manual approach. Automated and intelligent systems are necessary for early detection and overcoming the limitations of traditional methods. Recently, deep learning and machine learning have introduced several advanced models. Machine-learning algorithms like Decision Tree, Naïve Bayes, K-Nearest Neighbours, Random Forest, Support Vector Machine, and Logistic Regression have performed strongly in classification tasks due to their ability to model complex relationships and handle structured data efficiently. Similarly, learning high-level feature representations and capturing nonlinear patterns in data can be performed using artificial neural networks and convolutional neural networks in deep learning. This study proposes an intelligent framework for detecting animal health risks and predicting disease by combining machine-learning and deep-learning models. Multiple machine-learning classifiers are evaluated to establish baseline performance, while hybrid models integrate ANN- and CNN-based feature extraction with a Random Forest classifier to enhance predictive accuracy. By leveraging both symptom-based attributes and physiological parameters, the proposed system aims to improve early diagnosis and support timely intervention in animal healthcare.

1.1. Major Contribution

  • In this paper, we have developed a framework that integrates traditional ML with DL-based features to enhance animal health risk detection and disease prediction.
  • Deep-learning models, along with multiple ML models, are used to effectively predict animal risk.
  • The proposed model demonstrates improved performance across key evaluation metrics.
  • In this paper, we emphasize macro- and weighted-average performance metrics to assess whether the model is robust to class imbalance.
  • RF-based model performed well as compared to standalone deep-learning and conventional models across the different performance metrics.

1.2. Objective

In this paper, our objective is to develop an animal disease prediction model and compare the performance metrics of ML and Hybrid models. The secondary objective is to identify the most reliable model for animal health prediction and risk assessment.

1.3. Limitation

  • In this paper, we used a single dataset, which is limited for our study.
  • In our experimental work, we used only the structure data.
  • This study does not utilize for real-time validation.
This study’s objective is to make a decision-support system for animal disease prediction. It contains four sections. Section 1 discusses the introduction to animal disease prediction and risk assessment. Section 2 presents the State-of-the-Art in animal disease prediction. Section 3 proposed a framework that integrates the ML and DL models. Section 4 presents results, followed by a discussion, and Section 5 presents the conclusion and future scope.

2. Literature Review

Das, S. et al. [1] describe that monitoring and detecting animal diseases is increasingly important but still challenging, as existing diagnostic methods often fail to provide timely and accurate detection.
Shah, H. J. et al. [2] explain that cattle rearing contributes significantly through milk, meat, and by-products. While most livestock health monitoring still relies on manual observation, which results in labour-intensive, inconsistent, and often unable to detect diseases early, the growing use of deep learning and computer vision supports automated disease surveillance in cattle. These systems analyze images to distinguish between healthy and infected animals, enabling faster, more objective diagnosis. Evangelista, I. R. S. et al. [3] have explored computer vision and deep-learning approaches to automatically detect poultry behaviours, such as eating, drinking, and roaming. The models include YOLOv5, YOLOX, Faster R-CNN, and EfficientDet, which have demonstrated strong performance, achieving high precision and low training loss. These findings suggest that intelligent surveillance systems can support continuous, non-invasive behaviour monitoring and offer promising potential for early health assessment in poultry management. In Hwang, S. et al. [4], normal and multispectral images were collected to develop classification models for three common conditions: bacterial dermatosis, fungal infection, and hypersensitivity allergic dermatosis. Convolutional neural network architectures were checked using both single-image and combined-image approaches. Their results showed that predictions from normal and multispectral images performed better than individual predictions, with higher accuracy and better balance across metrics. These models achieved validation accuracies around 0.89, with improved Matthews correlation coefficients, indicating high performance. Hence, the combination of normal and multispectral image data offers high-accuracy models for the diagnosis of dog skin diseases. Khan, Z. et al. [5] compare machine-learning techniques and artificial neural networks for disease prediction using various symptoms. According to studies, artificial neural networks deliver greater predictive reliability. The artificial neural network model exceeds traditional machine-learning methods in accuracy. While the support vector classifier achieved 79.59% accuracy, the artificial neural network is better suited for early disease detection and livestock management. Bhardwaj, P. et al. [6] utilize livestock health data using automated monitoring and different machine-learning approaches. Entities such as age, symptoms, temperature variation, and disease type were used to train classifiers, including logistic regression, XGBoost, CatBoost, LightGBM, Random Forest, and Support Vector Machines. Results show that CatBoost and Random Forest achieved the highest accuracies of 83.7% and 83.5%, respectively.
Nayak, S. et al. [7] explain that major animal diseases pose threats to both animal husbandry and human beings. The prediction and analysis of animal diseases using big data have become increasingly important. Machine learning enables computers to learn from data and use that learned experience for analysis and prediction. This paper focused on supervised and unsupervised learning methods. Swapna, P. et al. [8] describe that livestock productivity depends mostly on accurate disease identification. It highlights the growing interest in data-driven disease prediction systems, which include Python, machine-learning tools, and real-world datasets from platforms such as Kaggle and Data World. Algorithms such as Naive Bayes, KNN, support vector machines, decision trees, and random forests are used to improve prediction accuracy. Integrating these models into veterinary health management helps in earlier detection and better overall animal welfare and farm productivity. Nadar, A. et al. [9] explain veterinary care. Access to veterinary services remains limited in many remote rural regions of India. Livestock owners often travel long distances for treatment, which leads to delays, poor disease management, and economic losses. Digital platforms connecting veterinary experts with farmers improve timely diagnosis and guidance. Expanding veterinary support online is essential for sustaining livestock productivity, farmer livelihoods, and national food security. Nur, Z. M. et al. [10] analyze the use of machine-learning models to predict cattle diseases using different parameters such as blisters, ulcers, and scabs, from a dataset of 31,000 labelled records. Random forests, logistic regression, K-nearest neighbours, decision trees, support vector machines, and Naive Bayes multinomial were evaluated. Results explain that the random forest has achieved the highest accuracy, reaching 99% on the test data, due to its ability to capture complex relationships. Lasser, J. et al. [11] highlight a precision livestock farming approach that predicted eight diseases using three machine-learning methods, ranging from logistic regression to gradient boosting. It also improves animal well-being and reduces the risk of diseases. The model, trained on data from 5828 animals in 165 herds in Austria, that predicts lameness, acute and chronic mastitis, anestrus, ovarian cysts, metritis, ketosis (hyperketonemia), and periparturient hypocalcemia (milk fever) from routinely available data, gives encouraging results. Antônio, W. H. et al. [12] focus on collisions between vehicles and animals on roads. It uses two ML techniques, KNN and Random Forest, to classify animal and non-animal images and accurately identify animals on roads. The dataset consists of 20 images, with 5 for training and 1 for testing. Zimpel, T. et al. [13] studied machine-learning models to predict animal welfare risks. Their model helps pig farmers prevent deaths during the suckling phase by taking countermeasures at an early stage. This dataset comprises data for over 57,000 pigs across 10 animal welfare risks and 14 suckling-phase features. A prediction model was used for suckling-phase deaths, with an accuracy of 80.4%—Ezanno, P. et al. [14] proposed various recommendations for improving animal health using the developed AI in healthcare. In Valletta, J. J. et al. [15], they sought to introduce animal behaviourists unfamiliar with machine learning (ML) to the rationale behind ML and reviewed a number of animal behaviour studies in which ML has been successfully deployed. Then they introduced the ML framework by presenting several unsupervised and supervised learning methods.

3. Study Design

Dataset Description: The dataset used in this study was selected to support the accurate prediction of animal diseases based on various symptoms. Each entity in the dataset represents an individual animal’s behaviour, combining numerical and categorical features relevant to health. The dataset facilitates supervised multiclass classification, where the target variable is a specific disease. We accessed the Kaggle dataset from [https://www.kaggle.com/datasets/shijo96john/animal-disease-prediction, accessed on 25 May 2025]. The numerical attributes include weight, age, and symptom duration, which provide information about the physical condition. Weight shows significant fluctuations due to differences in animal size and species. Age and symptom duration are uneven, which indicates a higher number of cases among animals. We have used a publicly available Kaggle dataset that contains species-specific animal health records and labelled disease classes. It includes species such as cattle, sheep, goats, pigs, and poultry, along with their recognized symptoms that cause disease.
However, the dataset cannot distinguish between notifiable and non-notifiable diseases due to a lack of metadata, such as geographic information. Hence, our study focuses on species-level disease risk prediction, not regulatory surveillance.
Intended application
The proposed framework is intended for farm-level decision support and early health risk analysis rather than clinical diagnosis or population-level surveillance.
Our system is designed to assist veterinarians and farm managers by identifying animals at higher health risk based on symptoms, enabling early monitoring and prioritization.
Epidemiological description of the dataset
The dataset used in our study does not include comprehensive epidemiological information, such as animal geographic location, disease prevalence, or transmission patterns.
Due to the absence of these attributes, the dataset is not suitable for population-level epidemiological analysis.
Physiological parameters such as heart rate and body temperature ensure model stability. In addition to numerical features, the dataset includes symptom-based variables such as loss of appetite, coughing, lameness, vomiting, and other observable clinical signs. These symptoms provide information about specific diseases. Symptom attributes, along with weight and age, have a strong dependency on the classification of diseases. Preprocessing steps, including data cleaning, numerical variable normalization, and categorical feature encoding, are performed before training the model. The data were then split into training and test sets. The structured and exact nature of the dataset supports the application of nonlinear, ensemble, and hybrid learning models.
The dataset provides a proper representation of symptoms and physiological features, involving reliable execution of machine-learning and deep-learning approaches. The structured data justifies the use of classifiers and feature extraction tools, resulting in higher accuracy and robustness in animal disease prediction.

3.1. Phase 1: Animal Health Dataset

Our model used an animal health dataset that contains features such as body temperature, heart rate, and various other visible symptoms, which serve as indicators for disease prediction.

3.2. Phase 2: Data Preprocessing

Several preprocessing procedures are applied to the dataset to enhance its quality:
(1)
Handling missing values: Various statistical methods are used to deal with missing records.
(2)
Normalization: To ensure effective learning, all numerical attributes are brought to a uniform range using feature scaling.
(3)
Feature Encoding: Non-numeric features are encoded into numerical formats compatible with ML algorithms.

3.3. Phase 3: Feature Extraction

(1)
Handcrafted Features: Important features related to animal health prediction are manually extracted using domain knowledge. Then, features are classified using a random forest model that ensures better accuracy by combining multiple decision trees.
(2)
Deep Feature Extraction: At the same time, an ANN automatically learns features from data, which helps capture hidden patterns that are difficult to identify through manual feature extraction.

3.4. Phase 4: Ensemble Decision Layer

The results from the random forest model and the ANN-based features are combined through an ensemble layer. Each model’s prediction is assigned a weight based on its confidence level. This combination improves accuracy and reduces errors introduced by the individual models.

3.5. Phase 5: Final Classification

The final result from the ensemble decision layer is sent to the random forest model, which works with features extracted by the ANN. The model achieves high accuracy and ensures reliable predictions by combining an ML model with DL features.

3.6. Phase 6: Output Prediction

The system’s final output consists of disease identification and indicates the severity of the risk.
Mutual information captures the relationship between the input variable and the disease class. The prediction is strongly influenced by features with higher mutual information scores. Figure 1 shows that weight receives the highest mutual information score, followed by age and duration. Features such as coughing, vomiting, lameness, and appetite loss showed a significant impact. Overall, the analysis helps in accurately evaluating animal health.
Figure 1. Proposed model for predicting animal health diseases.
Figure 2 showcases the distribution of features such as weight, age, duration, heart rate, and body temperature. Weight shows high variability due to differences in animal size, while age and duration are right-skewed, indicating a higher occurrence of cases among younger animals and shorter symptom durations. Normalized heart rate and body temperature exhibit a consistent pattern across samples, supporting their relevance as physiological indicators. Overall, the observed distribution justifies the inclusion of these features in the proposed prediction model.
Figure 2. Top 20 features derived using the mutual information score.
Figure 3 highlights the pairwise relationship among key numerical features. The distribution indicates clear clustering in weight and variability in age and duration. Overall, the pair plot suggests limited linear correlation among most feature pairs, supporting the use of a nonlinear and ensemble-based classifier. The observed clustering and variability confirm that these features provide complementary information for animal health prediction. Figure 3a presents the pair plot visualization of different features for animal health disease prediction. This study presents how the different features are distributed and identified the potential features for animal risk identification. Similarly Figure 3b presents the pair plot visualization of the different features such as weight, age, distribution_days, heart_rate and body_temperature for animal disease identification.
Figure 3. (a) Feature distribution plot for animal health disease prediction. (b) Pair Plot representation of numerical features for animal health disease.

3.7. Model Training

To evaluate the effectiveness of various ML and hybrid learning techniques for disease prediction, several models were developed and tested on the prepared dataset. Performance evaluation was carried out using accuracy, precision, recall, and F1-score metrics.
Traditional Machine-Learning Model:
  • Random Forest Classifier: It is an ensemble learning technique that builds multiple decision trees during training and assigns a final class label by majority voting. It makes the model robust to overfitting and suitable for nonlinear and high-dimensional data.
  • Support Vector Machine: It is a supervised learning method that classifies data by constructing a maximum-margin hyperplane separating the classes. This characteristic makes SVMs suitable for small and medium-scale datasets with distinct class separations.
  • Logistic Regression: It is a supervised linear classifier that estimates class probabilities through the logistic function. Its interpretability and efficiency make it a widely used baseline method.
  • Gaussian Naïve Bayes: It is a Bayesian classifier that models feature distribution as Gaussian and assumes feature independence. Its low computational complexity makes it effective for small datasets.
  • Decision Tree Classifier: The decision tree classifier constructs a tree-like structure by repeatedly dividing the data into subsets using feature-based criteria. Its transparent decision-making process makes it interpretable, though it can overfit when used independently.
  • K-Nearest Neighbours: A distance-based classifier that assigns a class label based on the majority class among the k-nearest data points in the feature space.

3.8. Hybrid Deep-Learning–Machine-Learning Model

  • Random Forest with CNN features: A CNN was first trained to automatically learn high-level feature representations from the input data. The extracted feature vectors from the CNN intermediate layer were then used as input to a random forest classifier for final classification.
  • Random Forest with ANN features: An ANN was employed as a feature extractor. The learned latent feature from the ANN was passed to a random forest classifier to improve classification performance.

4. Result Analysis

Table 1 showcases the classification accuracy of various ML and hybrid models for animal disease prediction. The random forest classifier achieved an accuracy of 97.77%, indicating that the model can handle complex, nonlinear relationships in the data. Logistic regression also performed well, achieving an accuracy of 94.37%. Among the traditional model decision tree and Gaussian naïve bayes showed moderate performance, while KNN and SVM achieved comparatively lower accuracy. For the hybrid approach, Random Forest with ANN-extracted features improved performance, achieving 90.85% accuracy, whereas Random Forest with CNN features achieved 87.32% accuracy. Table 2 presents the macro average of models for animal health disease prediction. This study discusses the average performance of the different models across precision, recall and F1-score
Table 1. Model Accuracy for animal health disease prediction.
Table 2. Macro Average of models for animal health disease prediction.
Macro-averaged metrics highlight model robustness across multiple disease classes. The random forest classifier achieved the highest macro precision (0.94), recall (0.94), and F1-score (0.93), indicating balanced classification performance. Among hybrid models, the random forest with ANN features outperformed the CNN-based hybrid, achieving a macro-F1 score of 0.87, confirming that ANN-extracted features are more informative for an ensemble classifier in this task.
Table 3 presents weighted-average metrics that account for class imbalance. The random forest classifier achieved the highest weighted F1-score (0.951), showing its robustness on the overall dataset. The hybrid random forest ANN features model showed improved metrics compared to CNN features, while SVM remained the weakest performer in this evaluation.
Table 3. Weighted average of models.
The below-mentioned Figure 4 compares the accuracy of eight machine-learning and deep-learning models for animal disease prediction. In this, the X-axis shows the accuracy scores of different models, and the Y-axis shows the models. We sorted the models’ scores and observed that RF achieved the highest accuracy of 0.958. Also, we noticed that the lower performer for animal risk prediction is the SVM. Its accuracy was obtained as 0.817. The performance metrics thresholds are marked at 0.85 and 0.90 to categorize models.
Figure 4. Accuracy Comparison of ML/DL models for animal disease prediction.
Figure 5 presents the performance heatmap for animal disease prediction. Figure 4 compares the performance of machine learning models for animal health disease prediction. The visualisation displays accuracy, precision, recall, and F1-score data, allowing for easy comparison between models. Ensemble-based techniques, particularly Random Forest and hybrid feature models, exhibit higher performance. The RF model performs well and consistently across all metrics. This visualization helps identify the best-performing model for animal disease prediction. There are seven key metrics utilized to identify the animal risk. Here, ML and DL models are used to detect animal risk. It has been observed that a hybrid Random Forest with ANN-based features performed well. We confirmed that the ensemble-based model performed well for accurate and efficient animal disease risk prediction.
Figure 5. Performance metrics heatmap for animal disease prediction models.
Figure 6 presents a comparative analysis of the two metrics, macro-averaged and weighted-average, across the ML and hybrid models for animal health risk predictions. Figure 6 compares precision, and the RF model achieved the highest weighted precision of 0.956. Most models show higher weighted scores, indicating better performance on larger classes. RF shows the smallest difference, indicating balanced performance.
Figure 6. Precision comparison for animal health disease prediction.
Figure 7 presents the F1-score comparison across all the models. We observed that the weighted model performed well. Logistic Regression and Random Forest with ANN features likewise show robust and balanced performance; however, SVM and KNN produce comparably lower macro F1-scores, indicating weaker consistency across minority classes.
Figure 7. F1-score comparison for animal health disease prediction.
Figure 8 illustrates the recall comparison across all the models. We observed that RF performs well with a weighted recall of 0.958. This means the model can identify disease cases. Apart from this, the hybrid model also performed well. Hybrid models, particularly Random Forest-ANN, maintain competitive recall values, demonstrating the importance of deep feature learning to increased prediction coverage.
Figure 8. Recall comparison for animal health disease prediction.
Figure 9 illustrates the F1-score difference (Weighted–Macro). In this estimation, we used different ML and hybrid models for animal risk prediction. The X-axis presents the ML models, and the Y-axis presents the difference in F1-score (Δ Score). We observed that the traditional ML model exhibited relatively small differences (≈0.016–0.019). This means the traditional model showed balanced performance across the majority and minority risk classes. GNB exhibits a moderate score (+0.043). However, DT and KNN show larger differences (+0.069 and +0.057, respectively). This implies better performance in dominating animal-danger categories than in minority or unusual risk events. We conclude that hybrid and ensemble-based models increase the predictive capability of animal risk prediction. These two models are especially good when handling the imbalance risk.
Figure 9. Macro vs. Weighted Metrics Comparison.
Figure 10 presents the precision-recall tradeoff for animal health prediction. Precision measures how accurate good disease predictions are, while recall measures how well the model can find diseased cases. In these situations, optimising accuracy alone may be deceptive; consequently, examining the precision/recall ratio provides a more accurate assessment of the model’s efficacy. This analysis is especially relevant when false negatives delay disease care or false positives result in wasteful therapy and financial loss.
Figure 10. Precision-recall tradeoff for animal health disease prediction.
As shown in Figure 11, the composite performance ranking identifies Random Forest and Logistic Regression as the best models based on the combined evaluation criteria, while the correlation analysis shows a strong positive association between accuracy, macro-averaged metrics, and weighted F1-score.
Figure 11. (a) The metric correlation matrix presents the correlation analysis among the performance measures. It discusses how accuracy, macro-averaged, and weighted-average metrics behave for soil fertility prediction. (b) The composite score of different metrics. The composite performance-based model ranking combines accuracy, macro F1-score, and weighted F1-score into a unified score, allowing for fair and holistic evaluation of heterogeneous models. This technique is especially effective in animal risk prediction scenarios, where both minority-class sensitivity and overall dependability are critical. Figure 12 discusses the performance analysis of the different models for animal health. This study emphasizes much on macro-F1 as well as weighted-F1 for animal health diseases.
Figure 11. (a) The metric correlation matrix presents the correlation analysis among the performance measures. It discusses how accuracy, macro-averaged, and weighted-average metrics behave for soil fertility prediction. (b) The composite score of different metrics. The composite performance-based model ranking combines accuracy, macro F1-score, and weighted F1-score into a unified score, allowing for fair and holistic evaluation of heterogeneous models. This technique is especially effective in animal risk prediction scenarios, where both minority-class sensitivity and overall dependability are critical. Figure 12 discusses the performance analysis of the different models for animal health. This study emphasizes much on macro-F1 as well as weighted-F1 for animal health diseases.
Engproc 124 00052 g011
Figure 12. Advanced performance analysis for animal health disease prediction.
Figure 12. Advanced performance analysis for animal health disease prediction.
Engproc 124 00052 g012
Figure 13 compares the performance of different ML, DL, and hybrid models using accuracy, macro-averaged precision, macro-averaged recall, and macro-averaged F1-Score. Among traditional ML models, the Random Forest Classifier achieved the highest overall performance across all metrics, demonstrating strong generalization. Logistic regression and decision tree models also performed well, while SVM and K-Nearest Neighbours performed moderately. The standalone ANN model achieved the lowest scores, indicating limited effectiveness when applied directly to the dataset. In a hybrid approach, a random forest with an ANN-derived feature improves results, highlighting the benefits of using DL. Moreover, the hybrid DL–ML model enhances predictive performance and provides a robust solution for animal health prediction.
Figure 13. Model Performance Comparison for animal health disease prediction.
Figure 14 compares the classification accuracy of different ML models for animal health prediction. The random forest classifier achieves the highest accuracy, indicating strong generalization capability. Logistic regression also performed well. Gaussian Naïve Bayes and decision tree show moderate accuracy, while SVM and K-Nearest Neighbours yield comparatively lower performance.
Figure 14. Model comparison of ML models.
Figure 15 compares the classification accuracy of the DL models (CNN and ANN) and their hybrid counterparts. The standalone CNN model achieves moderate accuracy, while the ANN model performs comparatively worse due to limited data availability. In contrast, hybrid approaches that combined CNN and ANN feature extractors with a random forest classifier showed improved accuracy. The random forest with ANN-extracted features achieves the highest accuracy, highlighting the effectiveness of the hybrid model in leveraging deep feature representations alongside a traditional ML classifier for robust animal disease prediction. The strong diagonal dominance indicates a high number of correctly classified disease cases across classes. Very few off-diagonal entries are observed, demonstrating limited misclassification and good class separability. Overall, the confusion matrix confirms the effectiveness and robustness of the random forest model in distinguishing among multiple animal diseases.
Figure 15. Model comparison of the DL model.
Figure 16 showcases the learning curve of the random forest classifier. The training accuracy remains consistently high across all training sizes, indicating strong model capacity. Whereas the cross-validation accuracy steadily improves as the number of training samples increases, demonstrating enhanced generalization with more data. The narrowing gap between the training and validation curves suggests reduced overfitting and improves model performance.
Figure 16. Learning curve of random forest.

5. Discussion

In this section, we used a statistical test to predict animal health diseases. This study employed the Friedman test and the One-way ANOVA test. Apart from these, we also conducted pairwise comparisons to validate the performance differences between models.

5.1. Statistical Test for Model Comparison

Animal Disease Prediction using ML/DL Approaches
Number of models: 8
Mean accuracy: 0.8944 ± 0.0415
Accuracy range: 0.8169–0.9577
Median accuracy: 0.8908
Table 4 presents a comparison of the different models, along with their rankings for animal health disease prediction. Here, we have arranged the model by rank. It has been observed that the highest rank is RF, as it consistently provides the best results across classifiers for animal health disease prediction. Table 5, The presented Mean ± SD results show moderate model variability, demonstrating the resilience of ensemble-based methods for class-imbalanced animal disease risk prediction.
Table 4. Comparison of different models based on the highest ranking for animal disease prediction.
Table 5. Overall performance for animal health disease prediction.

5.2. FRIEDMAN TEST—Multiple Classifier Comparison

Null Hypothesis (H0): In this study, we examine whether all models perform equally.
Alternative Hypothesis(Ha): Through the Friedman test, at least one model performs differently.
Significance level: α = 0.05
Null Hypothesis: All models perform equally.
Alternative Hypothesis: At least one model performs differently.
Significance level: α = 0.05
We reject the NULL hypothesis (where p = 0.000000 < 0.05). It has been observed that significant differences exist between the models.

5.3. ONE-WAY ANOVA (F-Test)

Tests: H0: All model accuracies are equal.
H1: At least one model differs.
F-statistic: 16.4669
p-value: 0.000000
We REJECT H0: Significant differences exist between models.

5.4. Simplified Pairwise Comparisons

This study presents the comparative analysis of RF vs other models. We observed that RF perform very well across all the models. The we also noticed that the between RF and SVM, the accuracy obtained 0.1408.It means that the model indicates that a large and statistically significant improvement observed. Finally our experimental work revealed that the RF gives the best result as comparison to the other models. Other model we exhibit they are marginal significant where as SVM statistically significant.

5.5. EFFECT SIZE: Cohen’s f2

Measures practical significance (not just statistical)
Cohen’s f2 = 3.6021
Interpretation: LARGE effect size
In Table 6, we conducted the test to determine whether the accuracy difference is significant. We used a pairwise comparison with Tukey’s Honestly Significant Difference (HSD) test when ANOVA was significant. In addition, we conducted the nonparametric Friedman test to compare model rankings across different evaluation conditions. Cohen’s f2 was used to calculate effect sizes, and accuracy was estimated with 95% confidence intervals. All tests utilized α = 0.05 as the significance level. The ANOVA found significant variations in model accuracies (F = 16.47, p < 0.000000). Random Forest performed much better than all other models (p < 0.01), according to post hoc Tukey’s HSD test. Random Forest and SVM had the highest performance discrepancy (15.9%), while Logistic Regression had the smallest difference (2.4%). Cohen’s f2 = 3.602 indicates a significant practical impact size. The nonparametric Friedman test found significant variations in model ranks (χ2 = 33.53, p < 0.000021).
Table 6. Pairwise comparison for animal health disease prediction.
Table 7 presents the best-performing model for animal disease prediction, by category.
Table 7. Model based on the category for animal disease prediction.
We noticed that an ensemble learning model, such as RF, gives the best results for animal disease prediction. We conclude based on performance measures such as accuracy. Apart from this, the hybrid feature-driven models also performed well. However, we observed that the traditional model achieved moderate accuracy in this scenario.

6. Conclusions

This study predicts animal health using traditional ML, DL, and hybrid models based on symptoms and physiological data. Multiple classifiers, including random forests, SVMs, LoGR, NB, DT, KNN, and hybrid approaches combining ANN and CNN feature extraction with random forests, were evaluated using accuracy, precision, recall, and F1-score. Experimental results demonstrate that the random forest classifier consistently outperformed other models, achieving the highest accuracy and balanced macro and weighted-averaged metrics, indicating that it is a strong generalizer across multiple disease classes. The hybrid integration with random forest significantly improved performance, confirming the benefits of combining deep feature representations with an ensemble classifier. Feature analysis further revealed that symptom-related and physiological parameters play a more critical role than animal type in disease prediction. Overall, the proposed approach validates the suitability of ensemble and hybrid learning methods for accurate and reliable animal health prediction. Future work will focus on expanding the dataset, incorporating temporal data, and exploring advanced deep-learning architectures to further enhance predictive performance and real-world applicability.

Author Contributions

Conceptualization, B.P. and N.P.; methodology, N.P.; software, A.S.; validation, B.P. and B.P.; formal analysis, R.P.; investigation, B.P.; resources, R.P.; data curation, B.P.; writing—original draft preparation, B.P.; writing—review and editing, B.P.; visualization, T.H.; supervision, N.P.; project administration, R.P.; funding acquisition, N.P. All authors have read and agreed to the published version of the manuscript.

Funding

This research received no external funding.

Institutional Review Board Statement

Not applicable.

Data Availability Statement

The dataset used and analyzed in the current study is available from the corresponding author upon reasonable request.

Conflicts of Interest

The authors declare no conflicts of interest.

Abbreviations

The following abbreviations are used in this manuscript:
RFRandom Forest Classifier
LoGRLogistic Regression
MLMachine Learning
DTDecision Tree
KNNK-Nearest Neighbour
CNNConvolutional Neural Network
SVMSupport Vector Machine
DLDeep Learning

References

  1. Das, S.; Roy, R.K.; Bezboruah, T. Machine learning in animal healthcare: A comprehensive review. Int. J. Recent Eng. Sci. 2024, 11, 89–93. [Google Scholar] [CrossRef]
  2. Shah, H.J.; Sharma, C.; Joshi, C.; Engineer, Y.; Educare, S.K. Cattle medical diagnosis and prediction using machine learning. Int. Res. J. Eng. Technol. 2022, 9, 3867–3870. [Google Scholar]
  3. Evangelista, I.R.S.; Catajay, L.T.; Bandala, A.A.; Concepcion, R.S., II; Sybingco, E.; Dadios, E.P. Exploring deep learning for the detection of poultry activities—Towards an autonomous health and welfare monitoring in poultry farms. In Proceedings of the 2023 17th International Conference on Ubiquitous Information Management and Communication (IMCOM), Seoul, Republic of Korea, 3—5 January 2023; IEEE: New York, NY, USA, 2023; pp. 1–5. [Google Scholar]
  4. Hwang, S.; Shin, H.K.; Park, J.M.; Kwon, B.; Kang, M.G. Classification of dog skin diseases using deep learning with images captured from a multispectral imaging device. Mol. Cell. Toxicol. 2022, 18, 299–309. [Google Scholar] [CrossRef]
  5. Khan, Z.; Raj, P.; Kumar, M. Comparative Analysis: Machine Learning vs. Artificial Neural Networks for Animal Disease Prediction. In Proceedings of the 2024 6th International Conference on Computational Intelligence and Networks (CINE), Bhubaneswar, India, 19-21 December 2024; IEEE: New York, NY, USA, 2024; pp. 1–5. [Google Scholar]
  6. Bhardwaj, P.; Kumar, S.J.; Kanna, G.P.; Mithila, A. Machine Learning Based Approaches for Livestock Symptoms and Diseases Prediction and Classification. In Proceedings of the 2024 International Conference on Communication, Computer Sciences and Engineering (IC3SE), Gautam Buddha Nagar, India, 9—11 May 2024; IEEE: New York, NY, USA, 2024; pp. 1–6. [Google Scholar]
  7. Nayak, S.; Jena, L.; Palai, P.; Mishra, S.; Swain, M.K. Application of Machine Learning in the Analysis and Prediction of Animal Disease. In Sustainable Farming through Machine Learning; CRC Press: Boca Raton, FL, USA, 2024; pp. 207–219. [Google Scholar]
  8. Swapna, P.; Geetha, M.; Nuthana, B.; Rohan, R. Using AI and Machine Learning for Early Detection and Management of Cattle Diseases to Improve Livestock Health and Productivity. Int. Res. J. Educ. Technol. 2024, 6, 1815–1822. [Google Scholar]
  9. Nadar, A.; Sane, A.; Muga, G.; Masih, E.; Rukhande, S. Animal healthcare and farm animal disease prediction using machine learning. In Proceedings of the 2023 5th Biennial International Conference on Nascent Technologies in Engineering (ICNTE), Navi Mumbai, India, 20-21 January 2023; IEEE: New York, NY, USA, 2023; pp. 1–6. [Google Scholar]
  10. Nur, Z.M.; Hassan, A.H.; Mohamed, A.M.; Ibrahim, U.M.; Ali, M.A.; Siyad, A.A. Leveraging Supervised Learning Algorithms for Automated and Accurate Cattle Disease Diagnosis in Livestock Farming in Somalia. In Proceedings of the International Conference on Artificial Intelligence and Smart Energy, Coimbatore, India, 30-31 January 2025; Springer Nature: Cham, Switzerland, 2025; pp. 152–164. [Google Scholar]
  11. Lasser, J.; Matzhold, C.; Egger-Danner, C.; Fuerst-Waltl, B.; Steininger, F.; Wittek, T.; Klimek, P. Integrating diverse data sources to predict disease risk in dairy cattle—A machine learning approach. J. Anim. Sci. 2021, 99, skab294. [Google Scholar] [CrossRef] [PubMed]
  12. Antônio, W.H.; Da Silva, M.; Miani, R.S.; Souza, J.R. A proposal of an animal detection system using machine learning. Appl. Artif. Intell. 2019, 33, 1093–1106. [Google Scholar] [CrossRef]
  13. Zimpel, T.; Riekert, M.; Klein, A.; Hoffmann, C. Machine learning for predicting animal welfare risks in pig farming. Landtechnik 2021, 76, 24–35. [Google Scholar]
  14. Ezanno, P.; Picault, S.; Beaunée, G.; Bailly, X.; Muñoz, F.; Duboz, R.; Monod, H.; Guégan, J.-F. Research perspectives on animal health in the era of artificial intelligence. Vet. Res. 2021, 52, 40. [Google Scholar] [CrossRef] [PubMed]
  15. Valletta, J.J.; Torney, C.; Kings, M.; Thornton, A.; Madden, J. Applications of machine learning in animal behavior studies. Anim. Behav. 2017, 124, 203–220. [Google Scholar] [CrossRef]
Disclaimer/Publisher’s Note: The statements, opinions and data contained in all publications are solely those of the individual author(s) and contributor(s) and not of MDPI and/or the editor(s). MDPI and/or the editor(s) disclaim responsibility for any injury to people or property resulting from any ideas, methods, instructions or products referred to in the content.

Article Metrics

Citations

Article Access Statistics

Multiple requests from the same IP address are counted as one view.