{'fraction_non_alphanumeric': 0.03419802703690172, 'fraction_numerical': 0.01987577639751553, 'mean_word_length': 4.8662666095156455, 'pattern_counts': {'":': 0, '<': 0, '<?xml version=': 0, '>': 0, 'https://': 1, 'lorem ipsum': 0, 'www.': 1, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
A Tree Based Machine Learning Approach for PTB Diagnostic Dataset

The primary objective of this particular paper is to classify the health-related data without feature extraction in Machine Learning, which hinder the performance and reliability. The assumption of our work will be like, can we able to get better result for health-related data with the help of Tree based Machine Learning algorithms without extracting features like in Deep Learning. This study performs better classification with Tree based Machine Learning approach for the health-related medical data. After doing pre-processing, without feature extraction, i.e., from raw data signal with the help of Machine Learning algorithms we are able to get better results. The presented paper which has better result even when compared to some of the advanced Deep Learning architecture models. The results demonstrate that overall classification accuracy of Random Forest, XGBoost, LightGBM and CatBoost, Tree-based Machine Learning algorithms for normal and abnormal condition of the datasets was found to be 97.88%, 98.23%, 98.03% and 95.57% respectively.


Introduction
As a sum of potential differences, bio-medical signals refer to variations in current created by a cells, tissues or organs in the human system [1]. Electrocardiogram (ECG), is a notable signal among many in our human ecosystem, because of its important function of visualizing the heart's electrical activity. The heart is our human system's main central organ, and its primary purpose is to pump blood to various organs, giving oxygen and nutrition while also eliminating carbon dioxide and other pollutants via the circulatory system. The sinus node is our body's natural pacemaker, sending electrical signals to keep us alive. As a result, if there is an issue with our human system, we can use ECG to diagnose it. From figure 1, PQRST waveform (sometimes include U wave) produces the typical ECG signal. Features, morphological segmentation, duration, and intervals of the ECG waveform can all be used to assess any problem in our human body condition.
Previously, doctors calculated using a manual approach from the vital signs in order to find out the condition of a particular patient. The situation will change if something goes wrong, so the numerical method of the Early Warning Score (EWS) [2] comes into play for better calculation using a mathematical approach while also being efficient. Hand-calculations are eventually superseded by Machine Learning (ML) methods (subset of Artificial Intelligence). The notion of Machine Learning comes into play if the systems learn correctly and predict abnormalities, and they can be fine-tuned by various kernels based on the data characteristics we utilize.  Figure 2 depicts the process that takes place in ML techniques. So here after the dataset, we will be doing pre-processing and feature engineering in general with ML modelling along with metrics like sensitivity, specificity, accuracy, confusion matrix, and Receiver Operating Characteristics curve (ROC) curve, Mean Squared Error (MSE), Rate of Misclassification (RMC) [3], etc. The rest of the paper is organized as follows. In section 2, we present the experimental methodologies, which are done before modelling, i.e., Machine Learning algorithms, in section 3, we are discussing about the results of Machine Learning algorithms and in section 4 discussing about the PTB (Physikalisch-Technische Bundesanstalt) Diagnostic ECG database and lastly before conclusion, in section 5, we are discussing about the metrics of Machine Learning algorithms and compare with some advanced Deep Learning models for the same dataset and Section 6 concludes the paper.

Experimental Methodology
PTB Diagnostic ECG Database: After importing the datasets (here we have two data's, one is normal -0 sample, another is abnormal -1 sample of data from the same PTB Diagnostic ECG Database). We need to concatenate and shuffle the data, so that normal and abnormal type can be mingled and became robust for classification process so that we can get one single dataset for classification process. Here in this dataset we don't have any missing values also. Here in the dataset we have in total of 188 features, out of that last column i.e., 187 th column which represents target / dependent variable.
Another important thing we need to note it down before modelling is, whether the class are balanced or imbalanced one? From the figure 2 shown below it is evident that, we are having imbalanced class (1.0 class has 10505 samples and 0.0 class has 4045 samples). What if we model the dataset with imbalanced condition? We will conflict with overfitting and as well as the model became more biased to majority class and hence the accuracy became poor with the test data. Hence to avoid to the imbalanced condition there are many methods, and here we will be using Synthetic Minority Oversampling Technique (SMOTE) [9], after using this the imbalanced condition got sorted out for the dataset. Once after SMOTE technique applied, the imbalanced condition (as in figure 3) is take over by introducing 'synthetic data' along with over-sampling steps to make it as balanced dataset, like after SMOTE process, the dataset which has 0 -10505 and 1 -10505, before that the condition is 0 -4045 and 1 -10505. We may infer how our model would be affected in terms of accuracy or overfitting if we didn't use the SMOTE approach based on these statistics.
As with the SMOTE approach, which uses an oversampling procedure to produce synthetic data. For the same dataset without changing the dataset, there is a minor variation in metric outcomes while using SMOTE in table 2 and without using SMOTE in table 3.
Once we are set with dataset, next important step before modelling our data is the splitting of dataset for training and testing before classification model is in standard format of 70% training and 30% testing to make the modelling robust.

Machine Learning Models
Though in table 1, we have used many Machine Learning models for modelling process, we are not going to discuss all the models here, but some of the algorithms like Tree based ML algorithms are going to discuss here are, Random Forest [10], Extreme Gradient Boosting (XGBoost) [11], LightGBM [12] and CatBoost [13]. The above-mentioned models are called as Ensemble methods because each algorithm which combines several base models (here it is Decision Tree) for producing best results.
Here in Random Forest Machine Learning algorithm, when we predict with test data we are getting the accuracy as 97.95 % and again for cross validation with training data we are getting the same result and we thought to arrange gridsearch for best feature selection but the good thing here is we are getting the same result for the feature max_depth of 30, max_features for auto and n_estimators as 700.
XGBoost algorithm, are mainly processed from Decision Tree models (Ensemble) and also it is categorized under Boosting type of ML. The speciality of this algorithm is. XGBoost is a combination of arbitrary loss function and gradient descent optimization algorithm, hence it gives better result when compared to traditional algorithms. When we predict with the test data we are getting the accuracy as 98.20 and again for cross validation with training data we are getting 98.19% and we thought to arrange gridsearch for best feature selection, we are getting 98.15% for the feature colsample_bytree:0.6, gamma:0.5, max_depth:7, min_child_weight: 1 subsample:0.8.
LightGBM ML algorithm, are popular because they consume little memory, can handle massive datasets in a short amount of time, and provide improved accuracy. When we predict with the test data we are getting the accuracy as 97.50% and again for cross validation with training data we are getting as 97.91% and we thought to arrange gridsearch for best feature selection, we are getting 98.03% for the feature, n_estimators: 1000, colsample_bytree: 0.8, max_depth: 30, num_leaves: 200, reg_alpha: 1.1, reg_lambda: 1.1, min_split_gain:0.3, subsample: 0.8, sub_frequency: 20 .
CatBoost ML algorithms are popular because they are performing gradient boosting on Decision Tree algorithm, added they don't required hyper-parameter fine tuning for better result. When we predict with the test data we are getting the accuracy as 95.57% and again for cross validation with training data we are getting as 96.28%.

Dataset
In this article, we will be using two ECG datasets that we collect it from physionet.org [4], which is widely utilized for many research related things around the world related to complex Physiologic signals.
The first dataset is PTB Diagnostic ECG database [5] (https://www.physionet.org/content/ptbdb/1.0.0/), the total number of samples from this dataset is 14552 and are classified into two categories (normal and abnormal) and the sampling frequency is 125Hz. PTB dataset which comprises of 549 records from 290 persons / subjects, which has aged group between 17-87, Mean (age): 57.2, the dataset which has both men and women, totally 209 men subjects and their mean for age is 55.5, and total number of women is 81 and their mean for age is 61.6 (they didn't include 1 female and 14 male subjects). All the condition of the subjects is not same, and their distribution is given below in table 1.  From the figure 5, the dataset is simple to comprehend; each row represents a patient's ECG, and the columns reflect the split or sampling time, which is processed by a variety of signal processing techniques. [7].

Results and Discussion
What makes special about Machine Learning model? Getting the best result of 98.42% by using XGBoost algorithm, is not the only reason for highlight in this paper. It is well known that, what makes Deep Learning more special when compared to Traditional Algorithm like Machine Learning, apart from hardware components and other high-tech specifications, the most important one to consider is 'Feature Engineering', which is shown below in figure 6.

Figure 6. Difference between Machine Learning and Deep Learning
From the below figure 6, it can be understandable that in Machine Learning technique, before processing to modelling, the foremost important step is to do feature engineering and then only the data is eligible for modelling process, but in our dataset, best result can be achieved without feature engineering when compared to some of the Deep Learning algorithms. Here in the below table 4, there shows some comparison process for the same dataset, and compared with Machine learning model as in table 2 and table 3. For instance, in order to calculate accuracy value, as in equation (1), Precision is also known as Positive Predictive Value (PPV), and it is defined as the ratio of accurately anticipated positive values to total positives (True and False), as shown in equation (2), The F1 Score can be derived using precision and recall data; the main purpose of this metric is to examine the balance between precision and recall, as in equation (4), In order to calculate Area under the Curve Receiver Operating Characteristics (AUC-ROC) value, the basic requirements are True Positive Rate (TPR) and False Positive Rate (FPR). For ROC, the curve need draw between TPR (Y-axis) like in equation (5) and FPR (X-axis), as shown in equation (6). TPR is otherwise known as Recall or Sensitivity, which means how efficiently the model classified positive class correctly. And to calculate FPR, it is required to calculate Specificity or True Negative Rate (TNR), which means how efficiently the model classifies negative class correctly Unlike, other metrics that mentioned above, here the value is between 0 and 1. If the particular model which is close to 1 value, then it is considered as best classifier between classes and if the value is close to 0, then the condition is vice versa. From the above explanation, it is understandable that how far the model process works with the dataset, and correctly classifies each value of the metrics which    From table 2 and table 3, it is evident that, there won't be much difference with the usage of SMOTE imbalanced technique, might be useful for more database. And still some impacts w.r.t to the merits in machine learning algorithms.
In contrast to Machine Learning, some of the recent deep learning figures (accuracy) are as follows in table 3.

100%
Even though some of the Deep Learning architecture models which shows best result when compare to the Machine Learning models from table 2 and table 3, it is evident that even if many sophisticated layers are included in their deep learning architecture to make their model robust, still machine learning models gives best result close to deep learning architecture model.

Conclusion
The work presented paper in this paper gives better result compared to certain advanced deep learning architecture models. The results demonstrate that overall classification accuracy of Random Forest, XGBoost, LightGBM and CatBoost, Tree-based Machine Learning algorithms for normal and abnormal condition of the datasets was found to be 97.88%, 98.23%, 98.03% and 95.57% respectively and it is compared with some advanced Deep learning architectures like Convolution Neural Network (81%), Artificial Neural Network with class weights (98.06%), Deep Neural Network (95.9%), Simple Convolution Neural Network (87.50%), AlexNet (92.50%), GoogleNet (100%), ResNet (99.17%) and EECGNet (100%). The main highlight of this paper is, like in Deep Learning technology, feature extraction for the Machine Learning is not done but better results are achieved using Tree based approach.