ORIGINAL RESEARCH article

Front. Vet. Sci., 15 April 2025

Sec. Comparative and Clinical Medicine

Volume 12 - 2025 | https://doi.org/10.3389/fvets.2025.1555714

Development of machine learning models to predict clinical outcome and recovery time in dogs with parvovirus enteritis

  • 1. Department of Clinical Pathology, Faculty of Veterinary Medicine, University of Tehran, Tehran, Iran

  • 2. Department of Clinical Science, Faculty of Veterinary Medicine, Shahid Bahonar University of Kerman, Kerman, Iran

Abstract

Canine parvovirus (CPV) is one of the most contagious viral diseases in dogs that usually presents with diarrhea, vomiting, and fever. Various clinical and laboratory biomarkers such as SIRS, leukopenia, neutropenia and CRP have been introduced to predict the final outcome of dogs with CPV. With the advent of machine learning methods/algorithms, various models can be developed using a combination of clinical and non-clinical variables to predict clinical outcome in different diseases with higher efficiency compared to traditional biomarkers. In this study, we sought to develop models to predict clinical outcome and recovery time in dogs with CPV infection using 10 and 4 machine learning algorithms, respectively. A model was developed using four variables (SIRS, deworming, vaccination and crying) to predict clinical outcome. The performance of this model was measured using three metrics: accuracy scores, AUC (area under the Receiver Operating Characteristic (ROC) curve) and AUC score. Another model was constructed using five variables (retching, foul smelling, housing, dehydration, and shift-to-left) to estimate recovery time. The performance of this model was evaluated using two criteria: mean square error (MSE) and root mean square error (RMSE). In the model developed for clinical outcome, the average of accuracy scores, AUC scores and AUCs in the test dataset were 0.84, 0.90 and 0.73, respectively. The second model predicted the recovery time in the test group with a mean error of 2 days (RMSE = 2.05). Our findings demonstrate that ML models can effectively integrate clinical and laboratory features to predict survival and recovery time in CPV-infected dogs, offering a valuable tool for early prognosis and treatment optimization.

Introduction

Canine parvovirus type 2 (CPV-2), which belongs to the genus Protoparvovirus in the family Parvoviridae, is a single-stranded DNA virus that is ~5.12 kb in length (). CPV spreads rapidly in the canine population and has a high mortality rate. Because CPV is completely dependent on the host cell, virus replication requires cells with high proliferative capacity, such as the digestive tract, bone marrow, and lymphoid tissues. CPV infection primarily affects three main tissues: the GI tract, bone marrow, and myocardium, though the skin and nervous tissue may also be impacted. The most common clinical manifestations are diarrhea, vomiting, and fever. The severity of vomiting is often severe, and diarrhea and anorexia occur with less severity. Excretion of body fluids and proteins through the digestive system causes severe dehydration and hypovolemic shock ().

One of the most important aspects of CPV for the small animal practitioner and animal owner is the prediction of clinical outcome in infected dogs. Therefore, various clinical and laboratory biomarkers have been introduced to estimate the prognosis in dogs with CPV. For example, some studies have shown that leukopenia, neutropenia, and lymphopenia as important biomarkers for predicting clinical outcome, while other studies have shown that SIRS syndrome is a strong risk factor for non-survival patients (). In addition, it was reported that serum levels of C-reactive protein and ceruloplasmin were significantly higher in non-survival dogs than in survival dogs (). Serum cortisol, thyroxine concentrations and C-reactive protein (CRP) have also been reported as other prognostic biomarkers in canine parvovirus enteritis (, ). Although all these biomarkers are individually valuable prognostic factors, their combination can create stronger and more reliable prognostic indicators. The main disadvantage of these single biomarkers is the lack of reproducibility, as many times a biomarker is confirmed in one study while not in another. The difficulty of measurement and cost are other major disadvantages. It would be a great advantage if we could build prognostic models using variables that can be recorded/measured easily and with minimal cost/effort. Recent advances in machine learning (ML) and artificial intelligence (AI) have provided us with various valuable algorithms that are widely used to predict the clinical outcome of various diseases in human and animals using a combination of multiple variables rather than based on a single variable (). Furthermore, attempts are made to use variables that are easily measurable to enter ML models in most such studies. Although the use of ML to study human diseases in various aspects is relatively widespread, the application of these technologies in veterinary medicine and especially small animal medicine is in its early stages (). Predicting clinical outcome (survival) and recovery time is very important for small animal physicians and dog owners. While single prognostic biomarkers are not enough powerful predictors, developing ML models using multiple clinical/non-clinical variables can more robustly and reliably predict outcome and recovery time. For example using random forest algorithm and some of the hematology and serum biochemistry variables including antithrombin, serum aspartate aminotransferase, serum lipase, monocyte and lymphocyte count, the survival time could be reliably predicted (). Given the lack of predictive models in CPV, this study aimed to develop an ML-based model to predict clinical outcome and recovery time in 156 dogs with CPV.

Methods

Patients

Current study was done on 156 dogs with confirmed CPV infection referred to the University of Tehran of Veterinary Medicine Hospital or private clinics. In addition to clinical/historical symptoms (depression, diarrhea, vomiting), CPV infection was confirmed using a rapid fecal antigen test (Arvin Biohealth: Iran, specificity: 100%, sensitivity: 97.6%). As recommended by the kit manufacturer (Arvin Biohealth: Iran), in case of vaccination, at least 10 days must have passed since the vaccination to consider the test positive. Dogs with confirmed CPV test and complete laboratory, clinical, and outcome variables were included in the study. Dogs were excluded from the study if they did not have any of the hematology, biochemistry, or clinical examination parameters or outcome (see “Data collection” section for details on recording variables). There were no inclusion/exclusion criteria based on age, gender, and severity of disease.

Data collection

For each CPV-infected case, we collected three types of data: (1) demographic, (2) clinical, and (3) laboratory variables, all recorded prior to treatment initiation (Table 1). This study aims to develop an ML model to predict clinical outcomes and recovery time in CPV-infected dogs using easily obtainable demographic, clinical, and laboratory variables. Regarding laboratory variables, we only included hematology variables (e.g., WBC, neutrophil count, and left shift) and some biochemical analytes (glucose, magnesium, and paraoxonase) that were confirmed in previous studies as prognostic parameters for CPV (, , ).

Table 1

Demographic variablesClinical variablesLaboratory variables
AgeClinical signsaWBC(/μl)
GenderTemperaturebRBC (/μl)
BreedFeverbHGB (g/dl)
HousingTime of anorexiaHCT (%)
VaccinationFecal antigen testPLT (/μl)
DewormingAnorexiaLY (/μl)
Vaccination of motherLethargiaMO (/μl)
History of stressSIRSEO (/μl)
VomitingGR (/μl)
DiarrheaBand (/μl)
Foul smellingRDWCV
DyspneaNeutrophil/lymphocyte ratio (NLR)
CryingPlatelet/lymphocyte ratio (PLR)
RetchingLeukopenia
LymphadenomegalyNeutropenia
Pale mucousLymphopenia
DehydrationShift to left
Heart rateMg (mg/dl)
Respiratory rateGlucose (mg/dl)
Abnormal heart soundParaxonase (PON) (U/ml)
Abnormal respiratory sound
Outcome (survival/none-survival)
Time of recovery

Various type of data (variables) recorded for each dog with CPV.

aClinical signs mean signs suggestive of CPV infection.

bTemperature is body temperature as a continuous variable while fever is a categorical variable (yes or no).

First, a questionnaire was designed to record demographic information and clinical metadata. In the questionnaire, demographic information (such as age, sex, breed, housing, nutrition, vaccination, and antiparasitic treatment), clinical symptoms and the presence of systemic inflammatory response syndrome (SIRS) were recorded. SIRS was confirmed by the presence of at least three of the four criteria, including heart rate > 140/min, respiratory rate > 30/min, body temperature > 39.2°C, and total white blood cell count more than 17,000/μl or < 6,000/μl (). Recovery time was considered as the interval (days) between confirmation of CPV infection and complete clinical recovery. Afterwards, whole blood was sampled for routine complete blood count (CBC) test and measurement of previously confirmed serum biomarkers for canine CPV infection (glucose, magnesium, and paraoxonase) (, ) (Table 1). The samples were taken with the consent of the animal owner. CBC test was performed using a veterinary hematology analyzer (Celltacα, NIHON KHODEN, Japan) and glucose, Mg, and PON were measured using colorimetric GOD/PAP, colorimetric Xylidyl Blue, and colorimetric sandwich ELISA kit (ZellBio GmbH, Germany), respectively. Also, for 47 cases, a second CBC test after treatments (postadmission sampling) was performed and relevant data was recorded.

Primary data analysis

Before developing ML models to predict clinical outcome or estimate recovery time, we performed a preliminary statistical analysis on various clinical/none-clinical data. Descriptive analysis was performed on various categorical and numerical variables using SPSS 23 software (Chicago, IL, USA). Also, the relationship between clinical outcome and numerical variables or clinical outcome and categorical variables was done using one-way ANOVA and Pearson's chi-squared test, respectively. P < 0.05 level was considered significant.

Developing ML model to predict clinical outcome

The general workflow for developing models to predict clinical outcome is summarized in Figure 1.

Figure 1

Filtering the variables

Before developing the model, we revised the initial variables to filter out unnecessary variables. Our workflow for removing non-informative variables is summarized in Supplementary Figure 1. Briefly, variables with more than 25% missing data, variables with small changes (low information), duplicate variables and dummy variables with more than 10 levels were identified and removed. Dummy variables can have two or more levels. A variable with small change is a variable in which 90% of the samples have the same information. For example, more than 90% of cases in our study had anorexia. Duplicate variables are continuous or categorical variables that provide the same information (such as temperature and fever) (Supplementary Figure 1).

There were few missing data for some of the variables. In this situation, the missing values for continuous and categorical data were filled with the average value and the value with the highest frequency, respectively.

Training the outcome models

After removing non-informative variables, different ML models were trained to reach a final optimal model. Figure 2 shows the workflow for developing the final model. To develop each model, the initial dataset was first divided into training dataset (67%, n = 104) and test (validation) dataset (33%, n = 51). Then the model was built in the training dataset using different algorithms and then used to predict the clinical outcome in the test dataset. The algorithms used to build the models were from the scikit-learn library and include LogisticRegression, Support Vector Classification (SVC), GaussianProcessClassifier, DecisionTreeClassifier, RandomForestClassifier, AdaBoostClassifier, Gaussian Naive Bayes (GaussianNB), QuadraticDiscriminantAnalysis, LinearDiscriminantAnalysis, and GradientBoostingClassifier. The performance of the models was evaluated using three parameters: accuracy score, AUC [Area under the Receiver Operating Characteristic (ROC) Curve], and AUC score (). Accuracy score simply indicated a percentage of correct predictions made by a model. The AUC indicates how well the model can discriminate the classes, while the AUC score indicates how reliable the AUC value is. As a rule of thumb, AUCs between 0.6 and 0.7 show poor discrimination, AUCs between 0.7 and 0.8 indicate acceptable discrimination and AUCs between 0.8 and 0.9 indicate excellent discrimination. To tackle the imbalance problem in our analysis, we also trained and compared models with and without SMOTE (Synthetic Minority Over-sampling Technique) analysis. We merely used SMOTE analysis in the training group. To control the problem of overfitting during model development, K-fold cross validation (https://scikitlearn.org/stable/modules/cross_validation.html) was performed in both training and test groups for all algorithms. In our analysis, we considered k = 10 in the cross-validation analysis. All models were built using python language and Jupyter notebook. Additionally, we tuned our models to find optimal values of the hyperparamters using the GridSearchCV tool in the scikit-learn library.

Figure 2

First, a primary model was trained using all the variables selected in the previous step. As the primary model required too many variables and showed poor performance (see Results section), a secondary model was constructed. To reduce the number of primary variables, logistic regression analysis was performed to identify variables with a significant association with the outcome (survival) (Ps < 0.05). Then the variables that had a significant relationship with the outcome were included in the process of building the secondary model. Next, the secondary model was evaluated using performance parameters. Although the performance of the secondary model was significantly better than the primary model (see Results section), the AUCs (as the most important performance metric) of this model were not ideal. Hence we developed the third model (i.e., the final model) with the help of Recursive Feature Elimination with Cross-Validation Analysis (RFECV) to select considerable features (variables) (). In this analysis, the number of features (variable) selected is tuned automatically by fitting an RFE selector on the different cross- validation splits. As a result, selected and non-selected variables were labeled as True and False, respectively. Using RFECV analysis, four variables (crying, SIRS, deworming and vaccination) were selected and included in the final model (Figure 2). Again, the performance of the final model was checked in both training and test groups using the mentioned parameters.

Developing ML model to predict recovery time

Filtering the variables

We also attempted to develop an optimized model(s) that robustly predicted the time to recovery in studied dogs with CPV infection. The initial stage for these models was similar to the models developed for clinical outcome. Therefore, we first filtered the unnecessary variables using the workflow mentioned above (Supplementary Figure 1).

Training the recovery models

To build the final predictive model, we followed the path shown in Figure 3. First, numerical variables (e.g., age and CBC data) that had a significant correlation with recovery time were identified using Spearman's correlation analysis. Then, categorical variables (e.g., deworming, SIRS, housing, dehydration, and foul smelling) with a significant relationship with recovery time were identified using ANOVA analysis. Both analyzes were performed using Pandas and statsmodels libraries in Jupyter notebook. Finally, using significant numerical and categorical variables, ML models were developed using four regression algorithms from scikit-learn library (LinearRegression, DecisionTreeRegressor, RandomForestRegressor, and KNeighborsRegressor). Here again, the models were trained using 67% of the dataset and tested on the remaining 33% of the data. The performance of these models was evaluated based on the mean square error (MSE) and root mean square error (RMSE) parameters (). Both metrics represent the average difference between estimated and actual values. However, since RMASES are the root value of MASES, they provide more realistic and tangible differences.

Figure 3

Results

Descriptive analysis of the studied cases

In our study, we worked on 156 dogs with CPV infection with average body weight of 7.96 ± 6.28 kg and average age of 4.64 ± 4.0 months. German shepherded (28.6%), mix dogs (23.4%), Pomeranian (9.1%), and Sarabi (7.8%) were most common breeds in our study. Table 2 shows the frequency of demographic variables. As shown, the frequency of vaccination and deworming variables was significantly different between the survival and none-survival groups. The frequency of vaccinated and dewormed dogs in the survival group was significantly higher than the non-survival group (Ps < 0.05). Also, the frequency of the gender variable tended to be significant (P = 0.057) (Table 2). Frequency of clinical categorical and clinical numerical variables are presented in Tables 3, 4, respectively. Here we found that the number of cases with SIRS, dyspnea, and crying in the non-survival group was significantly higher than the survival group (Ps < 0.05) (Table 3).

Table 2

None-survivorSurvivorTotalP-value
GenderMale2265870.057
Female85563
HousingaNo1256680.512
Yes186482
VaccinationNo2157780.027
Yes96372
DewormingbNo2158790.034
Yes96271
Vaccination of motherNo1249610.446
Yes164763

Frequency of demographic variables in studied dogs with CPV.

The frequency of each variable has been compared between survivor and non-survivor groups.

aCase was indoor (yes) or outdoor (no).

bDeworming means recent deworming. The bold values indicate statistically significant differences.

Table 3

None-survivorSurvivorP-value
History of stressaNegative21860.857
Positive934
FeverNegative16860.076
Positive1334
CPV kitNegative130.800
Positive29117
AnorexiaNegative240.405
Positive28116
LethargyNegative3200.365
Positive27100
SIRSNegative15910.005
Positive1529
VomitingNegative7200.395
Positive23100
DiarrheaNegative3120.989
Positive27107
Foul smellingNegative1160.122
Positive29104
DyspneaNegative261170.012
Positive43
CryingbNegative211120.000
Positive98
RetchingNegative13430.447
Positive1777
LymphadenomegalyNegative17740.616
Positive1346
Pale mucousNegative12650.165
Positive1855
DehydrationNegative7250.765
Positive2395
Abnormal heart soundNegative301180.477
Positive02
Abnormal respiratory soundNegative281080.575
Positive212

Frequency of clinical categorical variables in studied dogs with CPV.

The frequency of each variable has been compared between survivor and non-survivor groups.

aHistory of stress means any stress (especially weaning and transport) that the puppy has endured.

bCrying is defined as whining/whimping reported by the dog's owner and observed by the clinician during treatment. The bold values indicate statistically significant differences.

Table 4

NMeanSDSEMinMaxP-value
TemperatureNone-survivor2938.80.90.236.2400.587
Survivor12038.90.70.136.540.7
AnorexiaNone-survivor301.61.00.2040.503
Survivor1201.71.00.106
Heart rateNone-survivor30140.430.95.6842090.076
Survivor120130.725.62.370194
Respiratory rateNone-survivor3036.712.72.320830.952
Survivor12036.515.51.413120

Descriptive analysis of clinical numerical variables in studied dogs with CPV.

Each variable has been compared between survivor and non-survivor groups.

We also evaluated hematology parameters first at admission and second ??? days after admission. None of the hematology parameters were different between survival and none-survival dogs in the first sampling (Ps > 0.05) (Supplementary Tables 1, 2), while in the second blood sampling, the mean RDW and mean platelet-to-lymphocyte ratio (PLR) were significantly higher in the none-survival group than in the survival group (66.9 vs. 14.3 and 793 vs. 273, respectively) (Ps < 0.05) (Table 5). In addition, the number of dogs with leukopenia and neutropenia in the non-survival group were significantly higher than in the survival group (Ps < 0.05) (Table 6). Although the hematology and cytopenia variables of the second sampling were found to be suitable prognostic factors, these variables were not included in the prognostic models because less than one third of the cases had a second sampling. Furthermore, our preference was to use only parameters that could be recorded at the time of admission, the other reason not including hematology and cytopenia at the second sampling in our models. Our analysis also showed that the serum levels of glucose, magnesium and PON enzyme were not statistically different in the two groups (Ps > 0.05) (Supplementary Table 3).

Table 5

NMeanSDSEMinMaxP-value
WBCNone-survivor77.36.22.40.413.10.226
Survivor4010.97.01.10.430.9
RBCNone-survivor76.72.20.83.810.40.243
Survivor405.91.50.22.910.3
HGBNone-survivor713.84.91.87.322.10.312
Survivor4012.33.50.55.721.3
HCTNone-survivor744.516.26.123.274.50.233
Survivor4038.610.71.719.366.7
PLTNone-survivor7424.4253.395.7154.0957.00.088
Survivor39304.2138.922.2108.0807.0
LYNone-survivor71.31.60.60.04.60.12
Survivor392.52.10.30.112.0
MONone-survivor70.10.10.00.00.30.234
Survivor390.30.40.10.01.7
EONone-survivor70.20.40.20.01.20.54
Survivor390.30.40.10.01.4
GRNone-survivor75.65.32.00.112.30.568
Survivor397.65.90.90.426.0
BandNone-survivor70.10.30.10.00.70.1
Survivor390.50.50.10.01.7
RDWNone-survivor766.9142.553.911.5390.00.018
Survivor4014.31.90.311.619.1
NLRNone-survivor78.114.35.40.340.00.295
Survivor395.36.81.10.230.4
PLRNone-survivor7793.2678.0256.233.51914.00.03
Survivor39273.1543.487.028.63425.0

Descriptive statistics and comparison of hematological parameters of the second sampling (postadmission) between two groups of survival and non-survival dogs infected with CPV.

The bold values indicate statistically significant differences.

Table 6

None-survivorSurvivorP-value
LeukopeniaNegative4370.003
Positive32
NeutropeniaNegative4360.011
Positive33
LymphopeniaNegative3280.143
Positive410
Shift to leftNegative3200.679
Positive419

Frequency and statistical comparison of different parameters of cytopenia in the second sampling among two groups of survival and non-survival.

The bold values indicate statistically significant differences.

ML models to predict clinical outcome

As described in the Methods section, we went through three steps to arrive at a final model for robust prediction of clinical outcome in our patients. Primary and secondary models were trained and tested using 9 ML algorithms, while the final model was trained and tested using 10 algorithms. The performance of the models in two training and test groups was evaluated through three parameters: accuracy score, AUC score and AUC. We developed our models with and without SMOTE analysis (for dealing with imbalance dataset). In general, we obtained almost similar values for different metrics in both approaches, but two metrics including AUC score on the test dataset and AUC score on the training dataset were lower in models developed using SMOTE compared to models without SMOTE, while other metrics were remained unchanged. Hence, due to the higher performance metrics explained above, we preferred to consider the models developed without SMOTE analysis as the main models for further analysis (Tables 79; Supplementary Tables 46). Performance metrics for models developed using SMOTE analysis are presented in Supplementary Tables 46.

Table 7

Accuracy score (train)Accuracy score (test)AUC score (train)AUC score (test)AUC (test)
LogisticRegression0.940.810.960.720.51
SVC0.950.790.970.670.47
GaussianProcessClassifier1.000.521.000.650.50
DecisionTreeClassifier1.000.711.000.530.52
RandomForestClassifier0.990.790.990.650.62
AdaBoostClassifier1.000.811.000.710.62
GaussianNB0.830.770.750.650.61
LinearDiscriminantAnalysis0.950.810.970.710.52
GradientBoostingClassifier1.000.711.000.560.62

Measuring the performance parameters of the primary model built with different algorithms in train and test groups.

Although the primary models in the training group had high accuracy scores (mean = 0.96), these models performed poorly in the test group, so that the AUC scores (mean = 0.65) and AUCs (mean= 0.55) were poor and close to the random range (Table 7; Figure 4; Supplementary Figure 2). Due to the low performance and large number of variables in the primary model, after selecting seven important variables using logistic regression analysis, we developed the secondary model (Figure 2). In the secondary models, the average accuracy scores in the training and test groups were 0.88 and 0.81, respectively. Also, the average AUC score in the test group was good (0.73). However, mean AUCs (0.65), as the most important performance metric, were poor in secondary models (Table 8; Figure 4; Supplementary Figure 3). After conducting RFECV analysis to find robust features/(variables), the final model was developed using four variables (SIRS, deworming, vaccination and crying) (Figure 2). As shown, the performance of our final models improved significantly on the training and test datasets. The average accuracy score in the training and test groups was 0.82 and 0.84, respectively. In addition, the average of AUC scores and AUCs in the test group were excellent (0.90) and good (0.73), respectively (Table 9; Figures 4, 5). In summary, in an effort to improve the performance of the models, all performance parameters gradually increased from the initial model to the final model, of which the AUC score increased the most from the initial model to the final model (Figure 4).

Figure 4

Table 8

Accuracy score (train)Accuracy score (test)AUC score (train)AUC score (test)AUC (test)
LogisticRegression0.810.830.910.800.72
GaussianProcessClassifier0.920.770.950.610.48
DecisionTreeClassifier1.000.731.000.550.53
RandomForestClassifier0.980.790.990.660.68
AdaBoostClassifier0.880.810.880.710.66
GaussianNB0.770.880.620.860.72
QuadraticDiscriminantAnalysis0.790.850.640.830.68
LinearDiscriminantAnalysis0.830.830.820.910.68
GradientBoostingClassifier0.960.790.980.680.66

Measuring the performance parameters of the secondary model built with different algorithms in train and test groups.

Table 9

Accuracy score (train)Accuracy score (test)AUC score (train)AUC score (test)AUC (test)
LogisticRegression0.810.830.910.910.75
SVC0.820.830.790.910.64
GaussianProcessClassifier0.810.830.910.910.73
DecisionTreeClassifier0.830.830.820.910.74
RandomForestClassifier0.830.830.820.910.75
AdaBoostClassifier0.820.830.790.910.75
GaussianNB0.790.850.640.830.76
QuadraticDiscriminantAnalysis0.790.850.640.830.76
LinearDiscriminantAnalysis0.820.830.790.910.72
GradientBoostingClassifier0.820.830.790.910.71

Measuring the performance parameters of the final model built with different algorithms in train and test groups.

Figure 5

We also evaluated our final model for the overfitting problem as an undesirable ML behavior using k-fold cross-validation analysis. In overfitting models, the developed model provides accurate predictions on the training dataset, while it performs poorly on the internal/external test dataset. Our analysis showed that our final models did not suffer from overfitting, as the average of accuracy scores for 10 independent analyzes were almost the same for all but two algorithms (i.e., QuadraticDiscriminantAnalysis and LinearDiscriminantAnalysis) in the training and test groups (Table 10). However, in the two mentioned algorithms, the average accuracy scores were not significantly different between the two datasets.

Table 10

Average accuracy score (train)Average accuracy score (test)
LogisticRegression0.830.82
SVC0.830.82
GaussianProcessClassifier0.820.82
DecisionTreeClassifier0.830.82
RandomForestClassifier0.830.82
AdaBoostClassifier0.800.79
GaussianNB0.820.79
QuadraticDiscriminantAnalysis0.820.75
LinearDiscriminantAnalysis0.820.75
GradientBoostingClassifier0.830.82

K-fold test to check the presence of overfitting in the final model made using different algorithms (standard deviation was equal to zero in all analyses).

ML model to predict recovery time

We also developed a predictive model to estimate recovery time in studied dogs with CPV. Predictive models were trained and tested using four ML regression algorithms. In order to enter meaningful numerical and categorical variables in the model, we performed two primary statistical analyses. Among the categorical variables, only retching, foul smelling, housing, dehydration, and shift-to-left had a significant association with recovery time (Supplementary Table 7). Except body weight, all other numerical variables did not show significant correlation (r < 0.25) with recovery time (Supplementary Table 8). Body weight had a weak correlation with the dependent variable (r = 0.46). Hence, only retching, foul smelling, housing, shift-to-left and body weight were used to develop predictive models.

Recovery time in the studied dogs were 6 ± 1.8 days. The developed models predicted the recovery time in the test group with an average error rate of 2.05 days. Among the four models, the model developed using LinearRegression had the lowest error rate (RMSE = 1.86 days). Since the body weight variable had a weak correlation with the recovery time, this feature was removed in the next step and then the model was trained again. In the new model without body weight, the performance of the models improved slightly (mean RMASES = 1.88 days). Again, the developed LinearRegression model had the lowest error rate (RMSE = 1.81 days) (Table 11).

Table 11

MSESRMSES
LinearRegression3.531.86
DecisionTreeRegressor6.192.41
RandomForestRegressor3.951.94
KNeighborsRegressor4.242.02
LinearRegression3.371.81
DecisionTreeRegressor3.851.95
RandomForestRegressor3.471.85
KNeighborsRegressor3.811.94

Evaluating the performance of four regression algorithms for predicting recovery time.

The panel above the dotted line is the prediction using all the selected variables and the panel below the dotted line is the prediction using all the variables except body weight.

Discussion

In this study, we developed models to predict clinical outcome and recovery time in dogs with CPV. Similar to our findings, in a study by Franzo et al. (), ML models were developed using different algorithms to predict outcome in dogs with CPV infection, by using some hematology and serum biochemistry parameters, including antithrombin, serum aspartate aminotransferase, serum lipase, monocyte and lymphocyte count, in contrary to our study where we comprehensively combined various demographic, clinical and laboratory variables to develop the predictive models. As a key point in ML, we tried to build models with minimum number of variables so that these variables can be easily obtained/measured by users (here small animal clinicians). Clearly, models with a large number of variables or models with unusual and hard-to-measure variables (such as antithrombin) cannot be easily applied. Our variables in this model (SIRS, deworming, vaccination and crying) are readily available and can be effortlessly recorded by clinicians. In Franzo et al. model, random forest performed best, while in our final model, except for SVC, GaussianNB, and QuadraticDiscriminantAnalysis, all other 8 algorithms including random forest performed similarly in terms of performance criteria. Also, in the abovementioned study, no model was provided for estimating recovery time.

One of the major drawbacks of previous prognostic markers is that they usually work best 24–48 h after admission, whereas we need markers that would be useful at the time of admission. So that, we consider the variables that can be recorded at the time of admission. As shown in the results, although some hematology and cytopenia variables in the second sampling were significantly associated with clinical outcome, they were not included in the predictive models.

In our final model, the four variables of SIRS, deworming, vaccination, and crying were used to predict clinical outcome with acceptable performance. In agreement with our study, previous studies confirmed SIRS as a critical risk factor in non-surviving dogs with CPV, with dogs with SIRS having a higher mortality rate (, , ). Additionally, we found that vaccinated and dewormed pups had a lower risk of death compared to unvaccinated or untreated pups. It has been documented that vaccinated dogs had lower odds for developing CPV infection than unvaccinated dogs (). It has been confirmed that the accumulation of parasites in the intestine can increase the severity of parvovirus enteritis in dogs (, ). Moreover, it was shown that sometimes a single anthelmintic treatment could be associated with an increased risk of parvovirus infection (). As a surprising finding in our study, we found that crying was significantly associated with the risk of death in CPV-infected dogs, with crying occurring in 30% of non-surviving dogs compared to only 6.6% of surviving dogs (Table 3). To the best of our knowledge, this is the first study to introduce crying as a potential prognostic factor to predict clinical outcome in CPV enteritis.

Consistent with previous studies, reporting that parvovirus infection usually occurs in pups < 6 months of age (, , ), the mean age of our cases was 4.6 months. Furthermore, we similarly found no relationship between breed and risk of CPV enteritis (, ). Some studies reported breed predisposition for Doberman Pinscher and Rottweiler breeds (, ). Because these breeds were present in very small numbers in our study, we could not find such a significant association. In our project, we found that hematological and cytopenic variables at the time of admission did not differ between surviving and none-surviving dogs, while some of these variables (leukopenia, neutropenia, RDW and PLR) in the second sampling after admission were significantly different between the two groups. Likewise, the occurrence of leukopenia, neutropenia, and lymphopenia 24 and 48 h after admission has been reported as risk factors in none-survivor dogs with CPV enteritis (, ). In addition, some studies showed that initial leukopenia, neutropenia, or lymphopenia decreased the chance of survival (, ). Although variables such as dyspnea, PLR, NLR, and RDW are important parameters in CPV, they were not considered significant based on statistical and machine learning tests such as logistic regression analysis and other algorithms and therefore were not included in the model.

Our study also had limitations that reduced the quality of the developed models. First, we had a relatively small sample size (n = 156), which may have negatively affected the performance of the models. Clearly, with a larger population of dogs with CPV, we can achieve more powerful models with excellent AUCs. However, by using three serial screenings, we could achieve final models with strong AUC values, which could be generalized in highly populated models. The second problem was the weakness of recording information due to the lack of cooperation of clinicians or animal owners. Hence, we had to remove some cases with high missing variables. Despite all these issues, the models used in this study can be developed using a larger population of dogs and by applying more extensive data (variables) to achieve more efficient ML models for survival prediction.

Statements

Data availability statement

The original contributions presented in the study are included in the article/Supplementary material, further inquiries can be directed to the corresponding author.

Ethics statement

The animal studies were approved by University of Tehran Animal Ethics Committee. The studies were conducted in accordance with the local legislation and institutional requirements. Written informed consent was obtained from the owners for the participation of their animals in this study.

Author contributions

NS: Writing – original draft. MZ-A: Writing – original draft, Writing – review & editing. SN: Writing – original draft, Writing – review & editing.

Funding

The author(s) declare that no financial support was received for the research and/or publication of this article.

Conflict of interest

The authors declare that the research was conducted in the absence of any commercial or financial relationships that could be construed as a potential conflict of interest.

Generative AI statement

The author(s) declare that no Gen AI was used in the creation of this manuscript.

Publisher’s note

All claims expressed in this article are solely those of the authors and do not necessarily represent those of their affiliated organizations, or those of the publisher, the editors and the reviewers. Any product that may be evaluated in this article, or claim that may be made by its manufacturer, is not guaranteed or endorsed by the publisher.

Supplementary material

The Supplementary Material for this article can be found online at: https://www.frontiersin.org/articles/10.3389/fvets.2025.1555714/full#supplementary-material

Supplementary Figure 1

The workflow for removing non-informative variables.

Supplementary Figure 2

AUC plots of different primary models built using different algorithms.

Supplementary Figure 3

AUC plots of different final secondary built using different algorithms.

Supplementary Table 1

Descriptive statistics and comparison of hematological parameters of the first sampling between two groups of survival and non-survival dogs infected with CPV.

Supplementary Table 2

Frequency and statistical comparison of different parameters of cytopenia in the first sampling among two groups of survival and non-survival.

Supplementary Table 3

Descriptive statistics and comparison of three biochemical parameters (Mg, glucose and paraoxonase enzyme) between two surviving and non-surviving groups.

Supplementary Table 4

Measuring the performance parameters of the primary model built using SMOTE analysis and different algorithms in train and test groups.

Supplementary Table 5

Measuring the performance parameters of the secondary model built using SMOTE analysis and different algorithms in train and test groups.

Supplementary Table 6

Measuring the performance parameters of the final model built using SMOTE analysis and different algorithms in train and test groups.

Supplementary Table 7

Correlation between categorical variables and recovery time. Values in this table are P values. Significant variables are in bold.

Supplementary Table 8

Correlation coefficient between numerical variables and recovery time. Only body weight had a weak correlation with recovery time.

References

Summary

Keywords

canine parvovirus, machine learning, survival, prediction, dog

Citation

Sanaei N, Zamani-Ahmadmahmudi M and Nassiri SM (2025) Development of machine learning models to predict clinical outcome and recovery time in dogs with parvovirus enteritis. Front. Vet. Sci. 12:1555714. doi: 10.3389/fvets.2025.1555714

Received

05 January 2025

Accepted

14 March 2025

Published

15 April 2025

Volume

12 - 2025

Edited by

Patrick Gonin, Gustave Roussy Cancer Campus, France

Reviewed by

Aziz Ur Rehman Rehman, Ghulam Ishaq Khan Institute of Engineering Sciences and Technology, Pakistan

Aynur Simsek, Dicle University, Türkiye

Hagar Gouda, Zagazig University, Egypt

Updates

Copyright

*Correspondence: Seyed Mahdi Nassiri

Disclaimer

All claims expressed in this article are solely those of the authors and do not necessarily represent those of their affiliated organizations, or those of the publisher, the editors and the reviewers. Any product that may be evaluated in this article or claim that may be made by its manufacturer is not guaranteed or endorsed by the publisher.

Outline

Figures

Cite article

Copy to clipboard


Export citation file


Share article

Article metrics