# Decision Tree Ensembles to Predict Coronavirus Disease 2019 Infection: A Comparative Study

Authors: Amir Ahmad; Ourooj Safi; Sharaf Malebary; Sami Alesawi; Entisar Alkayal
Journal: Complexity
 (2021)

---

## Abstract

The coronavirus disease 2019 (Covid-19) pandemic has affected most countries of the world. The detection of Covid-19 positive cases is an important step to fight the pandemic and save human lives. The polymerase chain reaction test is the most used method to detect Covid-19 positive cases. Various molecular methods and serological methods have also been explored to detect Covid-19 positive cases. Machine learning algorithms have been applied to various kinds of datasets to predict Covid-19 positive cases. The machine learning algorithms were applied on a Covid-19 dataset based on commonly taken laboratory tests to predict Covid-19 positive cases. These types of datasets are easy to collect. The paper investigates the application of decision tree ensembles which are accurate and robust to the selection of parameters. As there is an imbalance between the number of positive cases and the number of negative cases, decision tree ensembles developed for imbalanced datasets are applied. F-measure, precision, recall, area under the precision-recall curve, and area under the receiver operating characteristic curve are used to compare different decision tree ensembles. Different performance measures suggest that decision tree ensembles developed for imbalanced datasets perform better. Results also suggest that including age as a variable can improve the performance of various ensembles of decision trees.


---

## Body

## 1. Introduction

SAR-CoV-2 is a new strain of coronavirus causing Covid-19, which was first identified in Wuhan city, Hubei province of China (WHO) [1, 2]. It was declared a pandemic by the World Health Organization (WHO) [1, 2]. On 24 November 2020, there have been more than 59.2 confirmed cases of Covid-19 and more than 1.3 million deaths [3], reported to WHO.Covid-19 is a respiratory infection and in severe cases may have Covid-19 pneumonia [4]. The reverse transcript polymerase chain reaction (RT-PCR) is considered as the gold standard for Covid-19 diagnosis [5]. It requires at least 24 hours to produce a result. Clinicians use chest imaging tests to diagnose Covid-19 disease when awaiting RT-PCR test results.Machine learning algorithms are very effective for prediction [6]. Chest X-ray images and computed tomography (CT) scans have been used to train machine learning models [7–9]. Trained models are then used to predict the Covid-19 positive cases. Using Point-of-care ultrasound, machine learning methods can accurately predict which Covid-19 patients are at a greater risk of death on initial lung scans [10]. Machine learning methods can also help distinguish Covid-19 infection from the community-acquired pulmonary infection [11].Various studies have been carried out to investigate whether Covid-19 positive cases can be predicted using commonly taken laboratory tests such as hematocrit, hemoglobin, platelets, red blood cells, lymphocytes, and leukocytes [12–14].Some of these datasets are imbalanced datasets [12, 14]; in other words, the number of positive cases is very small as compared to the number of negative cases. There are various machine learning methods which have been specifically developed for these datasets [15, 16]. The performance measures for these datasets should be carefully selected as, in some datasets such as medical datasets, the penalty for false negative is more than the penalty for false positive [17].An ensemble is a combination of many classifiers [18]. An ensemble performs better than an individual classifier if member classifiers are accurate and diverse. Classifier ensembles have been used in many applications [19, 20]. A decision tree is a popular machine learning algorithm [6]. Random forest [21], eXtreme Gradient Boosting (XGBoost) [22], Bagged decision trees [23], and so forth are examples of decision tree ensembles. Ensembles of decision trees are accurate and quite robust to the selection of parameters. Decision tree ensembles have also been developed for imbalanced datasets [24, 25]. Various Covid-19 datasets based on laboratory tests [12–14] are imbalanced datasets. However, they have not been studied using machine learning algorithms developed for imbalanced datasets.The paper will investigate the application of decision tree ensembles for Covid-19 dataset that is based on commonly taken laboratory tests. The dataset is imbalanced as the ratio of positive class to negative class data points is 1 to 6.5. Therefore, decision tree ensembles that are specifically developed for imbalanced datasets are also applied. Undersampling and oversampling techniques [15, 16] are used to address the data imbalance problem. As the data is imbalanced, classification accuracy is not an appropriate performance measure to compare different classifiers. F-measure, precision, recall, area under the precision-recall curve, and area under the receiver operating characteristic curve [17] performance measures are employed to compare the performances of different decision tree ensembles.The paper is organized in the following way. Section2 discusses the research works that apply machine learning algorithms on various kinds of datasets to predict the Covid-19 positive cases. Information on the Covid-19 dataset, decision tree ensembles, and performance measures used in the experiments is presented in Section 3. Section 4 has experiments and discussion. The paper ends with a conclusion and future work section.


## 2. Related Work

Machine learning algorithms have been applied on various types of datasets such as X-ray images, CT scans, and point-of-care ultrasound to predict the Covid-19 positive cases [7, 10]. However, in this section, we concentrate on the research works related to the application of machine learning algorithms to predict Covid-19 positive cases using only routinely collected laboratory findings of the patients [12–14].Batista et al. [13] collected data from 235 adult patients from the Hospital Israelita Albert Einstein in São Paulo, Brazil, from 17 to 30 March 2020. 15 variables which include age and gender other than 13 laboratory tests such as hemoglobin, platelets, and red blood cells are used to create a prediction model. Five machine learning algorithms (neural networks, random forests, XGBoost, logistic regression, and support vector machines (SVM)) were tested on this dataset. The best predictive performance was obtained by the SVM algorithm. Schwab et al. [14] used anonymised data from a cohort of 5644 patients seen at the Hospital Israelita Albert Einstein in São Paulo, Brazil, in the early months of 2020. In the dataset, the rate of positive patients was around 10%. They used 97 routine clinical, laboratory, and demographic measurements as the features. They applied the same five different machine learning algorithms as applied by Batista et al. In their experiments. XGBoost performed the best. They also did the experiments for predicting hospitalisation and ICU admission. Random forests performed best for predicting hospital admissions for Covid-19 positive patients, whereas SVM performed best for predicting ICU admission for Covid-19 positive patients. Alakus and Turkoglu [12] modified the data used by Alakus and Turkoglu [12]. The new dataset has 18 laboratory findings of 600 patients. In the dataset, the rate of positive patients was around 13%. They carried out a comparative study of deep learning approaches. Six different model types—Artificial Neural Network (ANN), Convolutional Neural Networks (CNN), Long-Short Term Memory (LSTM), Recurrent Neural Networks (RNN), CNNLSTM, and CNNRNN—were applied to this dataset. LSTM performed best for the 10-fold cross-validation approach. The datasets used by Schwab et al. [14] and Alakus and Turkoglu [12] are imbalanced. Therefore, it will be interesting to apply algorithms that have been developed for imbalanced datasets.


## 3. Data and Classifiers Used in the Experiments

The section will discuss the Covid-19 dataset, decision tree ensembles, and performance measures which are used in our experiments.


### 3.1. Data

111 laboratory findings of 5644 patients seen at the Hospital Israelita Albert Einstein in São Paulo, Brazil, were collected to detect Covid-19 in the early months of 2020 [14]. Alakus and Turkoglu [12] selected the 18 lab findings that play the most important role in Covid-19. They removed those data points that had missing values for these 18 lab findings. The final data has 600 data points: 520 data points are negative and 80 data points are Covid-19 patients. The ratio of negative data (majority class) to positive data (minority class) is 6.5 to 1 which makes the data imbalanced data. This dataset is used in the experiments.


### 3.2. Decision Tree Ensembles

A decision tree has been a very successful classifier that has been applied in many domains [6]. Decision trees are built using a recursive partition process in which data points are split at each node by using the selected split criterion. A path from the root node to a leaf is a rule which is used for the prediction. An ensemble of classifiers consists of many classifiers [18]. The final decision is the combination of all the member classifiers. An ensemble generally performs better than individual members if individual members are accurate and diverse. Decision tree ensembles are quite robust to the selection of parameters and perform well. In the experiments, many decision tree-based ensembles are used. As the data is imbalanced data, decision tree-based ensembles that are developed for imbalanced datasets are also used. We will discuss these ensembles and their implementation.


#### 3.2.1. C4.5 Decision Tree

Various split criteria have been proposed for decision trees. C4.5 uses the information gain ratio split criterion which reduces a bias towards multivalued attributes [26]. For all the ensembles, we use C4.5 or its version as the base classifier.


#### 3.2.2. Decision Tree Ensembles

Different kinds of ensembles methods have been proposed. Some of them are general methods such as bagging [23] and AdaBoost [27] which can be used with any classifier, whereas some of them are specific to a decision tree such as random forests [21]. XGBoost [22] is a scalable gradient tree boosting ensemble method, which has produced excellent results in many domains.


#### 3.2.3. Decision Tree Ensembles for Imbalanced Datasets

Many approaches have been proposed to handle imbalanced datasets. Undersampling of the majority class and oversampling of the minority class are two important approaches to reduce the imbalance of the datasets [15, 16]. Random undersampling (RUS) [15, 16] selects some data points from the majority class and combines them with the minority class to reduce the imbalance. Synthetic Minority Oversampling Technique (SMOTE) [28] generates synthetic minority data points which are combined with the original dataset to reduce the imbalance. SMOTEBoost [29] combines SMOTE algorithm and the boosting procedure, whereas SMOTEBagging [30] is a combination of SMOTE and Bagging algorithm. RUSBoost [31] combines data undersampling and boosting. RUSBagging [32] is the combination of random undersampling and bagging. Balanced random forests [25] use undersampling of the majority class to create balanced data for each tree of random forests.Different packages such as Weka [33], imblearn [32], ebmc [34, 35], and XGBoost [36] are used in the experiments. Table 1 shows the classifiers and the related packages used in the experiments.Table 1
Decision tree ensembles and the related packages.
ClassifierPackageSingle decision treeWekaRandom forestWekaBaggingWekaXGBoostXGBoost (Python)AdaBoostWekaBalanced random forest (RUS)Imblearn (Python)SmoteBaggingEbmc (R)RUSBaggingImblearn (Python)SmoteBoostEbmc (R)RUSBoostImblearn (Python)SMOTE oversampling (single decision tree)SMOTE (Weka), WekaSMOTE oversampling random forestSMOTE (Weka), WekaSMOTE oversampling BaggingSMOTE (Weka), WekaSMOTE oversampling AdaBoostSMOTE (Weka), WekaSMOTE oversampling XGBoostImblearn (Python), XGBoost (Python)Random undersampling (single decision tree)SpreadsubSample (Weka), WekaRUS random forestSpreadsubSample (Weka), WekaRUSBaggingSpreadsubSample (Weka), WekaRUS XGBoostImblearn (Python), XGBoost (Python)RUS AdaBoostSpreadsubSample (Weka), WekaThe default values of parameters were used for all the classifiers. However, the sizes of ensembles were fixed to 50. A 10-fold cross-validation procedure was used in the experiments. The average results are presented in different tables (Tables2–8).Table 2
The comparative study of various ensemble methods. Different performance measures are used to study their performance.
EnsembleAccuracyPrecisionRecallF1-measureAUROCAUPRCSingle decision tree0.8450.3860.2750.3210.6090.247Random forest0.8780.5850.3000.3970.8720.499Bagging0.8760.5680.3130.4030.8580.506XGBoost0.8650.5330.5750.5360.8630.505AdaBoost0.8600.4620.3000.3640.8440.410Ensembles for imbalanced datasetsBalanced random forest (RUS)0.8160.4100.8120.5400.8790.561SmoteBagging0.8580.5180.5120.4930.8450.486RUSBagging0.8350.4320.6750.5170.8810.516SmoteBoost0.8680.5440.5620.5300.8490.514RUSBoost0.7810.3160.5620.3970.7160.340Bold numbers show the best performances.Table 3
The performance of the Standard decision tree ensembles with the SMOTE oversampling method for different ratios of minority and majority class points. AUROC and AUPRC performance measures are used in the experiments. Bold numbers show the best results.
EnsembleOriginalRatio = 1Ratio = 0.75Ratio = 0.50AUROCAUPRCAUROCAUPRCAUROCAUPRCAUROCAUPRCSingle decision tree0.6090.2470.6790.2450.6730.2730.6640.275Random forest0.8720.4990.8630.4800.8690.5020.860.492Bagging0.8580.5060.8380.4810.8550.4970.8460.471XGBoost0.8630.5050.8590.4990.8590.5040.8540.500AdaBoost0.8440.4100.8230.4310.8470.4820.8340.434Table 4
The performance of Standard decision tree ensembles with RUS undersampling method for different ratios of minority and majority class points. AUROC and AUPRC performance measures are used in the experiments.
EnsembleOriginalRatio = 1Ratio = 0.75Ratio = 0.50AUROCAUPRCAUROCAUPRCAUROCAUPRCAUROCAUPRCSingle decision tree0.6590.3070.7310.2310.7330.260.7450.291Random forest0.8720.4990.8520.4540.8590.4760.8550.454Bagging0.8580.5060.8390.4220.8480.4450.8350.442XGBoost0.8630.5050.8450.4750.8460.5100.8730.554AdaBoost0.8440.4100.8260.3890.8300.4010.8490.425Bold numbers show the best results.Table 5
The performance (AUROC) of various ensembles of decision trees for different sizes of ensembles.
EnsembleSize2050100200Random forest0.8520.8720.8820.876Bagging0.8590.8580.8560.857XGBoost0.8630.8640.8670.868AdaBoost0.8270.8440.8500.855Ensembles for imbalanced datasetsBalanced random Forest (RUS)0.8710.8790.8890.893SmoteBagging0.8570.8460.8540.859RUSBagging0.8740.8810.8800.883SmoteBoost0.8530.8490.8640.864RUSBoost0.75160.7160.7170.715Bold numbers show the best performance.Table 6
The performance (AUPRC) of various ensembles of decision trees for different sizes of ensembles.
EnsembleSize2050100200Random forest0.4840.4990.5230.517Bagging0.5240.5060.4900.488XGBoost0.4940.5050.5070.511AdaBoost0.4150.4100.4410.453Ensembles for imbalanced datasetsBalanced random forest (RUS)0.5570.5610.5860.596SmoteBagging0.4780.4860.4730.489RUSBagging0.5080.5160.5320.552SmoteBoost0.5370.5140.5180.516RUSBoost0.3640.3400.3610.334Bold numbers show the best performance.Table 7
The effect of age variable on the performance (AUROC) of various ensembles. “+” sign shows the better performance of with age or without age.
EnsembleSize= 50Size = 100With ageWithout ageWith ageWithout ageRandom forest0.8670.872 (+)0.8780.882 (+)Bagging0.861 (+)0.8580.861 (+)0.856XGBoost0.8600.863 (+)0.8660.867 (+)AdaBoost0.850 (+)0.8440.865 (+)0.850Ensembles for imbalanced datasetsBalanced random Forest (RUS)0.892 (+)0.8790.895 (+)0.889SmoteBagging0.862 (+)0.8450.859 (+)0.854RUSBagging0.883 (+)0.8810.887 (+)0.880SmoteBoost0.863 (+)0.8490.8570.863 (+)RUSBoost0.755 (+)0.7160.727 (+)0.7171Table 8
The effect of age variable on the performance (AUPRC) of various ensembles. “+” sign shows the better performance of with age or without age.
EnsembleSize = 50Size = 100With ageWithout ageWith ageWithout ageRandom forest0.541 (+)0.4990.575 (+)0.523Bagging0.539 (+)0.5060.548 (+)0.490XGBoost0.517 (+)0.5050.537 (+)0.507AdaBoost0.485 (+)0.4100.527 (+)0.441Ensembles for imbalanced datasetsBalanced Random Forest (RUS)0.606 (+)0.5610.602 (+)0.585SmoteBagging0.552 (+)0.4860.546 (+)0.473RUSBagging0.582 (+)0.5160.598 (+)0.532SmoteBoost0.554 (+)0.5140.547 (+)0.518RUSBoost0.3330.340 (+)0.3290.361 (+)


### 3.3. Performance Measures

There are different measures to compute the performance of the classifiers. Accuracy is one of the most commonly used performance measures. However, for imbalanced datasets, accuracy measure is not very useful [17]. Accuracy, precision, recall, and F1-measure are used in the experiments [17]. We discuss these measures in detail in the appendix. The area under the receiver operating characteristic curve (AUROC) and the area under the precision-recall curve (AUPRC) are also used to compare the performance of decision tree ensembles [17].(i)
AUROC: The ROC is the curve between TPR and FPR at different decision threshold settings. The area under the curve is used as a performance measure. AUROC values range from 0 to 1. The baseline (random classifier) is 0.5 [37].(ii)
AUPRC: The precision-recall curve is the curve between precision and recall at different decision threshold settings. The area under the curve is used as a performance measure. AUPRC takes the values from 0 to 1. The baseline is not constant for AUPRC. It depends on the ratio of positive and negative samples. It is equal to positive/(positive + negative) [37]. For the dataset, which was used in the experiment, it is equal to 80/600 = 0.13. It has been demonstrated [37] that, for imbalanced datasets, AUPRC is a better performance measure as compared to AUROC.


## 3.1. Data

111 laboratory findings of 5644 patients seen at the Hospital Israelita Albert Einstein in São Paulo, Brazil, were collected to detect Covid-19 in the early months of 2020 [14]. Alakus and Turkoglu [12] selected the 18 lab findings that play the most important role in Covid-19. They removed those data points that had missing values for these 18 lab findings. The final data has 600 data points: 520 data points are negative and 80 data points are Covid-19 patients. The ratio of negative data (majority class) to positive data (minority class) is 6.5 to 1 which makes the data imbalanced data. This dataset is used in the experiments.


## 3.2. Decision Tree Ensembles

A decision tree has been a very successful classifier that has been applied in many domains [6]. Decision trees are built using a recursive partition process in which data points are split at each node by using the selected split criterion. A path from the root node to a leaf is a rule which is used for the prediction. An ensemble of classifiers consists of many classifiers [18]. The final decision is the combination of all the member classifiers. An ensemble generally performs better than individual members if individual members are accurate and diverse. Decision tree ensembles are quite robust to the selection of parameters and perform well. In the experiments, many decision tree-based ensembles are used. As the data is imbalanced data, decision tree-based ensembles that are developed for imbalanced datasets are also used. We will discuss these ensembles and their implementation.


### 3.2.1. C4.5 Decision Tree

Various split criteria have been proposed for decision trees. C4.5 uses the information gain ratio split criterion which reduces a bias towards multivalued attributes [26]. For all the ensembles, we use C4.5 or its version as the base classifier.


### 3.2.2. Decision Tree Ensembles

Different kinds of ensembles methods have been proposed. Some of them are general methods such as bagging [23] and AdaBoost [27] which can be used with any classifier, whereas some of them are specific to a decision tree such as random forests [21]. XGBoost [22] is a scalable gradient tree boosting ensemble method, which has produced excellent results in many domains.


### 3.2.3. Decision Tree Ensembles for Imbalanced Datasets

Many approaches have been proposed to handle imbalanced datasets. Undersampling of the majority class and oversampling of the minority class are two important approaches to reduce the imbalance of the datasets [15, 16]. Random undersampling (RUS) [15, 16] selects some data points from the majority class and combines them with the minority class to reduce the imbalance. Synthetic Minority Oversampling Technique (SMOTE) [28] generates synthetic minority data points which are combined with the original dataset to reduce the imbalance. SMOTEBoost [29] combines SMOTE algorithm and the boosting procedure, whereas SMOTEBagging [30] is a combination of SMOTE and Bagging algorithm. RUSBoost [31] combines data undersampling and boosting. RUSBagging [32] is the combination of random undersampling and bagging. Balanced random forests [25] use undersampling of the majority class to create balanced data for each tree of random forests.Different packages such as Weka [33], imblearn [32], ebmc [34, 35], and XGBoost [36] are used in the experiments. Table 1 shows the classifiers and the related packages used in the experiments.Table 1
Decision tree ensembles and the related packages.
ClassifierPackageSingle decision treeWekaRandom forestWekaBaggingWekaXGBoostXGBoost (Python)AdaBoostWekaBalanced random forest (RUS)Imblearn (Python)SmoteBaggingEbmc (R)RUSBaggingImblearn (Python)SmoteBoostEbmc (R)RUSBoostImblearn (Python)SMOTE oversampling (single decision tree)SMOTE (Weka), WekaSMOTE oversampling random forestSMOTE (Weka), WekaSMOTE oversampling BaggingSMOTE (Weka), WekaSMOTE oversampling AdaBoostSMOTE (Weka), WekaSMOTE oversampling XGBoostImblearn (Python), XGBoost (Python)Random undersampling (single decision tree)SpreadsubSample (Weka), WekaRUS random forestSpreadsubSample (Weka), WekaRUSBaggingSpreadsubSample (Weka), WekaRUS XGBoostImblearn (Python), XGBoost (Python)RUS AdaBoostSpreadsubSample (Weka), WekaThe default values of parameters were used for all the classifiers. However, the sizes of ensembles were fixed to 50. A 10-fold cross-validation procedure was used in the experiments. The average results are presented in different tables (Tables2–8).Table 2
The comparative study of various ensemble methods. Different performance measures are used to study their performance.
EnsembleAccuracyPrecisionRecallF1-measureAUROCAUPRCSingle decision tree0.8450.3860.2750.3210.6090.247Random forest0.8780.5850.3000.3970.8720.499Bagging0.8760.5680.3130.4030.8580.506XGBoost0.8650.5330.5750.5360.8630.505AdaBoost0.8600.4620.3000.3640.8440.410Ensembles for imbalanced datasetsBalanced random forest (RUS)0.8160.4100.8120.5400.8790.561SmoteBagging0.8580.5180.5120.4930.8450.486RUSBagging0.8350.4320.6750.5170.8810.516SmoteBoost0.8680.5440.5620.5300.8490.514RUSBoost0.7810.3160.5620.3970.7160.340Bold numbers show the best performances.Table 3
The performance of the Standard decision tree ensembles with the SMOTE oversampling method for different ratios of minority and majority class points. AUROC and AUPRC performance measures are used in the experiments. Bold numbers show the best results.
EnsembleOriginalRatio = 1Ratio = 0.75Ratio = 0.50AUROCAUPRCAUROCAUPRCAUROCAUPRCAUROCAUPRCSingle decision tree0.6090.2470.6790.2450.6730.2730.6640.275Random forest0.8720.4990.8630.4800.8690.5020.860.492Bagging0.8580.5060.8380.4810.8550.4970.8460.471XGBoost0.8630.5050.8590.4990.8590.5040.8540.500AdaBoost0.8440.4100.8230.4310.8470.4820.8340.434Table 4
The performance of Standard decision tree ensembles with RUS undersampling method for different ratios of minority and majority class points. AUROC and AUPRC performance measures are used in the experiments.
EnsembleOriginalRatio = 1Ratio = 0.75Ratio = 0.50AUROCAUPRCAUROCAUPRCAUROCAUPRCAUROCAUPRCSingle decision tree0.6590.3070.7310.2310.7330.260.7450.291Random forest0.8720.4990.8520.4540.8590.4760.8550.454Bagging0.8580.5060.8390.4220.8480.4450.8350.442XGBoost0.8630.5050.8450.4750.8460.5100.8730.554AdaBoost0.8440.4100.8260.3890.8300.4010.8490.425Bold numbers show the best results.Table 5
The performance (AUROC) of various ensembles of decision trees for different sizes of ensembles.
EnsembleSize2050100200Random forest0.8520.8720.8820.876Bagging0.8590.8580.8560.857XGBoost0.8630.8640.8670.868AdaBoost0.8270.8440.8500.855Ensembles for imbalanced datasetsBalanced random Forest (RUS)0.8710.8790.8890.893SmoteBagging0.8570.8460.8540.859RUSBagging0.8740.8810.8800.883SmoteBoost0.8530.8490.8640.864RUSBoost0.75160.7160.7170.715Bold numbers show the best performance.Table 6
The performance (AUPRC) of various ensembles of decision trees for different sizes of ensembles.
EnsembleSize2050100200Random forest0.4840.4990.5230.517Bagging0.5240.5060.4900.488XGBoost0.4940.5050.5070.511AdaBoost0.4150.4100.4410.453Ensembles for imbalanced datasetsBalanced random forest (RUS)0.5570.5610.5860.596SmoteBagging0.4780.4860.4730.489RUSBagging0.5080.5160.5320.552SmoteBoost0.5370.5140.5180.516RUSBoost0.3640.3400.3610.334Bold numbers show the best performance.Table 7
The effect of age variable on the performance (AUROC) of various ensembles. “+” sign shows the better performance of with age or without age.
EnsembleSize= 50Size = 100With ageWithout ageWith ageWithout ageRandom forest0.8670.872 (+)0.8780.882 (+)Bagging0.861 (+)0.8580.861 (+)0.856XGBoost0.8600.863 (+)0.8660.867 (+)AdaBoost0.850 (+)0.8440.865 (+)0.850Ensembles for imbalanced datasetsBalanced random Forest (RUS)0.892 (+)0.8790.895 (+)0.889SmoteBagging0.862 (+)0.8450.859 (+)0.854RUSBagging0.883 (+)0.8810.887 (+)0.880SmoteBoost0.863 (+)0.8490.8570.863 (+)RUSBoost0.755 (+)0.7160.727 (+)0.7171Table 8
The effect of age variable on the performance (AUPRC) of various ensembles. “+” sign shows the better performance of with age or without age.
EnsembleSize = 50Size = 100With ageWithout ageWith ageWithout ageRandom forest0.541 (+)0.4990.575 (+)0.523Bagging0.539 (+)0.5060.548 (+)0.490XGBoost0.517 (+)0.5050.537 (+)0.507AdaBoost0.485 (+)0.4100.527 (+)0.441Ensembles for imbalanced datasetsBalanced Random Forest (RUS)0.606 (+)0.5610.602 (+)0.585SmoteBagging0.552 (+)0.4860.546 (+)0.473RUSBagging0.582 (+)0.5160.598 (+)0.532SmoteBoost0.554 (+)0.5140.547 (+)0.518RUSBoost0.3330.340 (+)0.3290.361 (+)


## 3.2.1. C4.5 Decision Tree

Various split criteria have been proposed for decision trees. C4.5 uses the information gain ratio split criterion which reduces a bias towards multivalued attributes [26]. For all the ensembles, we use C4.5 or its version as the base classifier.


## 3.2.2. Decision Tree Ensembles

Different kinds of ensembles methods have been proposed. Some of them are general methods such as bagging [23] and AdaBoost [27] which can be used with any classifier, whereas some of them are specific to a decision tree such as random forests [21]. XGBoost [22] is a scalable gradient tree boosting ensemble method, which has produced excellent results in many domains.


## 3.2.3. Decision Tree Ensembles for Imbalanced Datasets

Many approaches have been proposed to handle imbalanced datasets. Undersampling of the majority class and oversampling of the minority class are two important approaches to reduce the imbalance of the datasets [15, 16]. Random undersampling (RUS) [15, 16] selects some data points from the majority class and combines them with the minority class to reduce the imbalance. Synthetic Minority Oversampling Technique (SMOTE) [28] generates synthetic minority data points which are combined with the original dataset to reduce the imbalance. SMOTEBoost [29] combines SMOTE algorithm and the boosting procedure, whereas SMOTEBagging [30] is a combination of SMOTE and Bagging algorithm. RUSBoost [31] combines data undersampling and boosting. RUSBagging [32] is the combination of random undersampling and bagging. Balanced random forests [25] use undersampling of the majority class to create balanced data for each tree of random forests.Different packages such as Weka [33], imblearn [32], ebmc [34, 35], and XGBoost [36] are used in the experiments. Table 1 shows the classifiers and the related packages used in the experiments.Table 1
Decision tree ensembles and the related packages.
ClassifierPackageSingle decision treeWekaRandom forestWekaBaggingWekaXGBoostXGBoost (Python)AdaBoostWekaBalanced random forest (RUS)Imblearn (Python)SmoteBaggingEbmc (R)RUSBaggingImblearn (Python)SmoteBoostEbmc (R)RUSBoostImblearn (Python)SMOTE oversampling (single decision tree)SMOTE (Weka), WekaSMOTE oversampling random forestSMOTE (Weka), WekaSMOTE oversampling BaggingSMOTE (Weka), WekaSMOTE oversampling AdaBoostSMOTE (Weka), WekaSMOTE oversampling XGBoostImblearn (Python), XGBoost (Python)Random undersampling (single decision tree)SpreadsubSample (Weka), WekaRUS random forestSpreadsubSample (Weka), WekaRUSBaggingSpreadsubSample (Weka), WekaRUS XGBoostImblearn (Python), XGBoost (Python)RUS AdaBoostSpreadsubSample (Weka), WekaThe default values of parameters were used for all the classifiers. However, the sizes of ensembles were fixed to 50. A 10-fold cross-validation procedure was used in the experiments. The average results are presented in different tables (Tables2–8).Table 2
The comparative study of various ensemble methods. Different performance measures are used to study their performance.
EnsembleAccuracyPrecisionRecallF1-measureAUROCAUPRCSingle decision tree0.8450.3860.2750.3210.6090.247Random forest0.8780.5850.3000.3970.8720.499Bagging0.8760.5680.3130.4030.8580.506XGBoost0.8650.5330.5750.5360.8630.505AdaBoost0.8600.4620.3000.3640.8440.410Ensembles for imbalanced datasetsBalanced random forest (RUS)0.8160.4100.8120.5400.8790.561SmoteBagging0.8580.5180.5120.4930.8450.486RUSBagging0.8350.4320.6750.5170.8810.516SmoteBoost0.8680.5440.5620.5300.8490.514RUSBoost0.7810.3160.5620.3970.7160.340Bold numbers show the best performances.Table 3
The performance of the Standard decision tree ensembles with the SMOTE oversampling method for different ratios of minority and majority class points. AUROC and AUPRC performance measures are used in the experiments. Bold numbers show the best results.
EnsembleOriginalRatio = 1Ratio = 0.75Ratio = 0.50AUROCAUPRCAUROCAUPRCAUROCAUPRCAUROCAUPRCSingle decision tree0.6090.2470.6790.2450.6730.2730.6640.275Random forest0.8720.4990.8630.4800.8690.5020.860.492Bagging0.8580.5060.8380.4810.8550.4970.8460.471XGBoost0.8630.5050.8590.4990.8590.5040.8540.500AdaBoost0.8440.4100.8230.4310.8470.4820.8340.434Table 4
The performance of Standard decision tree ensembles with RUS undersampling method for different ratios of minority and majority class points. AUROC and AUPRC performance measures are used in the experiments.
EnsembleOriginalRatio = 1Ratio = 0.75Ratio = 0.50AUROCAUPRCAUROCAUPRCAUROCAUPRCAUROCAUPRCSingle decision tree0.6590.3070.7310.2310.7330.260.7450.291Random forest0.8720.4990.8520.4540.8590.4760.8550.454Bagging0.8580.5060.8390.4220.8480.4450.8350.442XGBoost0.8630.5050.8450.4750.8460.5100.8730.554AdaBoost0.8440.4100.8260.3890.8300.4010.8490.425Bold numbers show the best results.Table 5
The performance (AUROC) of various ensembles of decision trees for different sizes of ensembles.
EnsembleSize2050100200Random forest0.8520.8720.8820.876Bagging0.8590.8580.8560.857XGBoost0.8630.8640.8670.868AdaBoost0.8270.8440.8500.855Ensembles for imbalanced datasetsBalanced random Forest (RUS)0.8710.8790.8890.893SmoteBagging0.8570.8460.8540.859RUSBagging0.8740.8810.8800.883SmoteBoost0.8530.8490.8640.864RUSBoost0.75160.7160.7170.715Bold numbers show the best performance.Table 6
The performance (AUPRC) of various ensembles of decision trees for different sizes of ensembles.
EnsembleSize2050100200Random forest0.4840.4990.5230.517Bagging0.5240.5060.4900.488XGBoost0.4940.5050.5070.511AdaBoost0.4150.4100.4410.453Ensembles for imbalanced datasetsBalanced random forest (RUS)0.5570.5610.5860.596SmoteBagging0.4780.4860.4730.489RUSBagging0.5080.5160.5320.552SmoteBoost0.5370.5140.5180.516RUSBoost0.3640.3400.3610.334Bold numbers show the best performance.Table 7
The effect of age variable on the performance (AUROC) of various ensembles. “+” sign shows the better performance of with age or without age.
EnsembleSize= 50Size = 100With ageWithout ageWith ageWithout ageRandom forest0.8670.872 (+)0.8780.882 (+)Bagging0.861 (+)0.8580.861 (+)0.856XGBoost0.8600.863 (+)0.8660.867 (+)AdaBoost0.850 (+)0.8440.865 (+)0.850Ensembles for imbalanced datasetsBalanced random Forest (RUS)0.892 (+)0.8790.895 (+)0.889SmoteBagging0.862 (+)0.8450.859 (+)0.854RUSBagging0.883 (+)0.8810.887 (+)0.880SmoteBoost0.863 (+)0.8490.8570.863 (+)RUSBoost0.755 (+)0.7160.727 (+)0.7171Table 8
The effect of age variable on the performance (AUPRC) of various ensembles. “+” sign shows the better performance of with age or without age.
EnsembleSize = 50Size = 100With ageWithout ageWith ageWithout ageRandom forest0.541 (+)0.4990.575 (+)0.523Bagging0.539 (+)0.5060.548 (+)0.490XGBoost0.517 (+)0.5050.537 (+)0.507AdaBoost0.485 (+)0.4100.527 (+)0.441Ensembles for imbalanced datasetsBalanced Random Forest (RUS)0.606 (+)0.5610.602 (+)0.585SmoteBagging0.552 (+)0.4860.546 (+)0.473RUSBagging0.582 (+)0.5160.598 (+)0.532SmoteBoost0.554 (+)0.5140.547 (+)0.518RUSBoost0.3330.340 (+)0.3290.361 (+)


## 3.3. Performance Measures

There are different measures to compute the performance of the classifiers. Accuracy is one of the most commonly used performance measures. However, for imbalanced datasets, accuracy measure is not very useful [17]. Accuracy, precision, recall, and F1-measure are used in the experiments [17]. We discuss these measures in detail in the appendix. The area under the receiver operating characteristic curve (AUROC) and the area under the precision-recall curve (AUPRC) are also used to compare the performance of decision tree ensembles [17].(i)
AUROC: The ROC is the curve between TPR and FPR at different decision threshold settings. The area under the curve is used as a performance measure. AUROC values range from 0 to 1. The baseline (random classifier) is 0.5 [37].(ii)
AUPRC: The precision-recall curve is the curve between precision and recall at different decision threshold settings. The area under the curve is used as a performance measure. AUPRC takes the values from 0 to 1. The baseline is not constant for AUPRC. It depends on the ratio of positive and negative samples. It is equal to positive/(positive + negative) [37]. For the dataset, which was used in the experiment, it is equal to 80/600 = 0.13. It has been demonstrated [37] that, for imbalanced datasets, AUPRC is a better performance measure as compared to AUROC.


## 4. Results and Discussion

Different experiments were carried out to study the performance of different decision tree ensembles. This section will present the results of those experiments.


### 4.1. The Comparative Study of Various Decision Tree Ensembles

Different types of decision tree ensembles are compared using various performance measures. Results are presented in Table2. For two (accuracy and precision) out of six performance measures, the standard classifiers performed best, whereas for the other four performance measures (F1-measure, recall, AU-ROC, and AUPRC) decision tree ensembles for imbalanced datasets perform best. Random forests performed best for two performance measures (accuracy and precision). Balanced random forest (RUS) performed best for three performance measures: recall, F1-measures, and AUPRC. RUSBagging performed best for AUROC. AUROC and AUPRC are widely used performance measures for imbalanced datasets. RUSBagging performed best for AUROC with the value 0.881, whereas balanced random forest (RUS) gave the best AUPRC with the value 0.561. The study demonstrates that decision tree ensembles for imbalanced datasets perform better for this Covid-19 dataset.


### 4.2. Standard Decision Tree Ensembles with Different Sampling Techniques

Sampling is an approach to overcome the imbalance of datasets. We use standard decision tree ensembles with two sampling approaches: SMOTE and RUS. As AUROC and AUPRC are mostly used performance measures for imbalanced datasets, only these performance measures were used. Results with SMOTE oversampling sampling method are presented in Table3. We carried out experiments with different ratios of minority class and majority class data points. The results on the original data points were also presented. Results suggest that the best AUROC was 0.872 by random forest with the original dataset, whereas the best AUPRC was 0.648 by bagging with the original dataset. For bagging and random forest, the results improved with oversampling. Except for a single decision tree, SMOTE oversampling method had a negative effect on the performance of other ensembles. The presence of noisy minority points may be the reason for the poor performance of SMOTE oversampling method [38].RUS was done on the majority class to change the ratio of minority class and majority class. The best results (AUROC and AUPRC) were obtained with XGBoost. The best AUROC was 0.873 with the data with a ratio of 0.5 whereas the best AUPRC was 0.554. XGBoost and AdaBoost performed best for the dataset with a ratio of 0.5 whereas random forest performed best for the original data. The results suggest that the sampling methods did not have similar effects on all the ensembles. However, the best results among all the classifiers were obtained with the XGBoost for the data with a ratio of 0.5 created with RUS.


### 4.3. Effects of the Ensemble Size

An ensemble is a combination of classifiers. The number of classifiers in an ensemble is the size of the ensemble. An experiment is carried out to study the effect of ensemble sizes on different classifier ensembles. For the study, those ensembles were selected which performed better with default values. AUROC and AUPRC performance measures are used for the study. Results for AUROC and AUPRC are presented in Tables5 and 6, respectively. Results suggest that generally the performance slightly improves or remains constant with size. The results are consistent with the theory of classifier ensembles that most of the performance improvement comes with the first few classifiers in ensembles, adding more classifiers may not be very useful [39].


### 4.4. Effects of the Age Variable

The data has 18 lab findings. The data also has the age of each patient. The previous experiments [12] used 18 lab tests for the Covid-19 prediction. They did not use age in the experiments. The age of a patient plays a very important part in the severity of Covid-19. Therefore, it is important to understand the effect of age on the Covid-19 prediction. An experiment is carried out with a dataset with 19 attributes (18 lab findings + age variable) and the results are compared with that of 18 attributes. Experiment settings were the same as discussed for the dataset with 18 attributes. Two sets of experiments were done, one with the ensemble size equal to 50 and the other with ensemble size equal to. Results are presented in Tables 7 and 8. For the AUROC performance measure with an ensemble size of 50, seven out of nine ensembles performed better for the dataset with 19 attributes. Similarly, with an ensemble size of 100, six out of nine ensembles performed better with the dataset with 19 attributes. For the AUPRC performance measure, eight out of nine ensembles performed better for the dataset with 19 attributes, with ensemble sizes of 50 and 100. The results suggest that including age variable in the dataset can improve the prediction performance.Following are the findings of the experiments:(I)
Covid-19 dataset based on laboratory test [12] is an imbalanced dataset. However, it has not been studied using machine learning algorithms developed for imbalanced datasets. We studied them using decision tree ensembles for imbalanced datasets. The study demonstrates that decision tree ensembles for imbalanced datasets perform better for this Covid-19 dataset.(II)
Experiments with different sampling techniques suggest that that the sampling methods did not have similar effects on all the general decision tree ensembles. However, the best results among all the classifiers were obtained with the XGBoost for the data with a ratio of 0.5 created with RUS.III.
The previous experiments [12] did not use the AUPRC performance measure, which is a better performance measure as compared to AUROC [37]. The results could be misleading with inappropriate performance measures. As in Table 2, the performance of balanced random forest (RUS) is best for AUPRC, whereas RUSBagging is best for AUROC. The classifier based on the AUPRC performance measure is used.(IV)
The dataset has 19 attributes (18 lab tests + age). The previous experiments [12] used 18 lab tests for the Covid-19 prediction. We also studied the effect of the age attribute on the Covid-19 prediction. It is found that including age attribute with 18 lab tests can improve the Covid-19 prediction accuracy.


## 4.1. The Comparative Study of Various Decision Tree Ensembles

Different types of decision tree ensembles are compared using various performance measures. Results are presented in Table2. For two (accuracy and precision) out of six performance measures, the standard classifiers performed best, whereas for the other four performance measures (F1-measure, recall, AU-ROC, and AUPRC) decision tree ensembles for imbalanced datasets perform best. Random forests performed best for two performance measures (accuracy and precision). Balanced random forest (RUS) performed best for three performance measures: recall, F1-measures, and AUPRC. RUSBagging performed best for AUROC. AUROC and AUPRC are widely used performance measures for imbalanced datasets. RUSBagging performed best for AUROC with the value 0.881, whereas balanced random forest (RUS) gave the best AUPRC with the value 0.561. The study demonstrates that decision tree ensembles for imbalanced datasets perform better for this Covid-19 dataset.


## 4.2. Standard Decision Tree Ensembles with Different Sampling Techniques

Sampling is an approach to overcome the imbalance of datasets. We use standard decision tree ensembles with two sampling approaches: SMOTE and RUS. As AUROC and AUPRC are mostly used performance measures for imbalanced datasets, only these performance measures were used. Results with SMOTE oversampling sampling method are presented in Table3. We carried out experiments with different ratios of minority class and majority class data points. The results on the original data points were also presented. Results suggest that the best AUROC was 0.872 by random forest with the original dataset, whereas the best AUPRC was 0.648 by bagging with the original dataset. For bagging and random forest, the results improved with oversampling. Except for a single decision tree, SMOTE oversampling method had a negative effect on the performance of other ensembles. The presence of noisy minority points may be the reason for the poor performance of SMOTE oversampling method [38].RUS was done on the majority class to change the ratio of minority class and majority class. The best results (AUROC and AUPRC) were obtained with XGBoost. The best AUROC was 0.873 with the data with a ratio of 0.5 whereas the best AUPRC was 0.554. XGBoost and AdaBoost performed best for the dataset with a ratio of 0.5 whereas random forest performed best for the original data. The results suggest that the sampling methods did not have similar effects on all the ensembles. However, the best results among all the classifiers were obtained with the XGBoost for the data with a ratio of 0.5 created with RUS.


## 4.3. Effects of the Ensemble Size

An ensemble is a combination of classifiers. The number of classifiers in an ensemble is the size of the ensemble. An experiment is carried out to study the effect of ensemble sizes on different classifier ensembles. For the study, those ensembles were selected which performed better with default values. AUROC and AUPRC performance measures are used for the study. Results for AUROC and AUPRC are presented in Tables5 and 6, respectively. Results suggest that generally the performance slightly improves or remains constant with size. The results are consistent with the theory of classifier ensembles that most of the performance improvement comes with the first few classifiers in ensembles, adding more classifiers may not be very useful [39].


## 4.4. Effects of the Age Variable

The data has 18 lab findings. The data also has the age of each patient. The previous experiments [12] used 18 lab tests for the Covid-19 prediction. They did not use age in the experiments. The age of a patient plays a very important part in the severity of Covid-19. Therefore, it is important to understand the effect of age on the Covid-19 prediction. An experiment is carried out with a dataset with 19 attributes (18 lab findings + age variable) and the results are compared with that of 18 attributes. Experiment settings were the same as discussed for the dataset with 18 attributes. Two sets of experiments were done, one with the ensemble size equal to 50 and the other with ensemble size equal to. Results are presented in Tables 7 and 8. For the AUROC performance measure with an ensemble size of 50, seven out of nine ensembles performed better for the dataset with 19 attributes. Similarly, with an ensemble size of 100, six out of nine ensembles performed better with the dataset with 19 attributes. For the AUPRC performance measure, eight out of nine ensembles performed better for the dataset with 19 attributes, with ensemble sizes of 50 and 100. The results suggest that including age variable in the dataset can improve the prediction performance.Following are the findings of the experiments:(I)
Covid-19 dataset based on laboratory test [12] is an imbalanced dataset. However, it has not been studied using machine learning algorithms developed for imbalanced datasets. We studied them using decision tree ensembles for imbalanced datasets. The study demonstrates that decision tree ensembles for imbalanced datasets perform better for this Covid-19 dataset.(II)
Experiments with different sampling techniques suggest that that the sampling methods did not have similar effects on all the general decision tree ensembles. However, the best results among all the classifiers were obtained with the XGBoost for the data with a ratio of 0.5 created with RUS.III.
The previous experiments [12] did not use the AUPRC performance measure, which is a better performance measure as compared to AUROC [37]. The results could be misleading with inappropriate performance measures. As in Table 2, the performance of balanced random forest (RUS) is best for AUPRC, whereas RUSBagging is best for AUROC. The classifier based on the AUPRC performance measure is used.(IV)
The dataset has 19 attributes (18 lab tests + age). The previous experiments [12] used 18 lab tests for the Covid-19 prediction. We also studied the effect of the age attribute on the Covid-19 prediction. It is found that including age attribute with 18 lab tests can improve the Covid-19 prediction accuracy.


## 5. Conclusion and Future Work

The prediction of Covid-19 positive cases is an important step for managing Covid-19 positive patients. Machine learning algorithms can be useful for this classification task. Various kinds of decision tree ensembles are applied on a Covid-19 dataset. The dataset has commonly taken laboratory tests. Therefore, these kinds of datasets are easy to collect. The dataset has a class imbalance problem. The results demonstrate that decision tree ensembles developed for imbalanced datasets perform better than standard decision tree ensembles. This suggests that the selection of classification methods should be based on the properties of data. If the data is imbalanced, classifiers developed for imbalanced datasets should be used. Similarly, the appropriate performance measures should be used for a given classification problem. Otherwise, the results could be misleading. The results also suggest that combining the age variable with the other laboratory tests can improve the prediction performance. In the future, we will compare the performance of decision tree ensembles with the other type of classifiers such as SVM and deep learning classifiers. We will further study the combination of laboratory tests with X-ray data for the prediction of Covid-19 positive cases. The prediction of the severity of Covid-19 by using datasets with laboratory tests will also be investigated.



---

*Source: 5550344-2021-05-08.xml*