Understanding of Normal and Abnormal Hearts by Phase Space Analysis and
  Convolutional Neural Networks
Cardiac diseases are one of the leading mortality factors in modern,
industrialized societies, which cause high expenses in public health systems.
Due to high costs, developing analytical methods to improve cardiac diagnostics
is essential. The heart's electric activity was first modeled using a set of
nonlinear differential equations. Following this, variations of cardiac spectra
originating from deterministic dynamics are investigated. Analyzing a normal
human heart's power spectra offers His-Purkinje network, which possesses a
fractal-like structure. Phase space trajectories are extracted from the time
series electrocardiogram (ECG) graph with third-order derivate Taylor Series.
Here in this study, phase space analysis and Convolutional Neural Networks
(CNNs) method are applied to 44 records via the MIT-BIH database recorded with
MLII. In order to increase accuracy, a straight line is drawn between the
highest Q-R distance in the phase space images of the records. Binary CNN
classification is used to determine healthy or unhealthy hearts. With a 90.90%
accuracy rate, this model could classify records according to their heart
status.
Bekir Yavuz Koc, Taner Arsan, Onder Pekcan
# Understanding of Normal and Abnormal Hearts by

###### Abstract

Cardiac diseases are one of the leading mortality factors in modern, industrialized societies, which cause high expenses in public health systems. Due to high costs, developing analytical methods to improve cardiac diagnostics is essential. The heart's electric activity was first modeled using a set of nonlinear differential equations. Following this, variations of cardiac spectra originating from deterministic dynamics are investigated. Analyzing a normal human heart's power spectra offers His-Purkinje network, which possesses a fractal-like structure. Phase space trajectories are extracted from the time series electrocardiogram (ECG) graph with third-order derivate Taylor Series. Here in this study, phase space analysis and Convolutional Neural Networks (CNNs) method are applied to 44 records via the MIT-BIH database recorded with MLII. In order to increase accuracy, a straight line is drawn between the highest Q-R distance in the phase space images of the records. Binary CNN classification is used to determine healthy or unhealthy hearts. With a 90.90% accuracy rate, this model could classify records according to their heart status.

Electrocardiogram, Phase Space, Convolutional Neural Networks.

## 1 Introduction

It is well known that the human heart has an electrical activity that can be detected by measuring the potential difference from various points on the body. Electrocardiogram (ECG), which measures electric potential versus time, has three distinct parts. P -wave is associated with the excitation of the atria, the QRS complex presents the ventricles (His-Purkinje network), and T -wave shows the recovery of the initial electrical state of ventricles (Figure 1a). Although ECG
presents periodic behavior, some irregularities can be observed in the details of the records. In fact, these irregularities belong to the intrinsic part of heart activity and/or to the random noise that can be found in such systems. These activities in ECG spectra help us to understand cardiac dynamics. Cardiac oscillations are sometimes perturbed by unpredictable contributions, which are part of the cardiac dynamics and, therefore, physiologically important. Due to these reasons, the heart is not a perfect oscillator and/or cardiac muscles do not continuously vibrate harmonically.

For researchers, transforming a sequence of values in time to a geometrical object in space is a highly considered topic [1]. This procedure replaces an analysis over time with an analysis in space. Space is considered as phase space and the transforming of time series into an object called an embedding (Figure 1b). After this step, topological properties of the object are determined based on its fractal dimension. In this fractal dimension, not the original time series but the fractal dimension characterizes the properties of the phase space set. In the phase space set, the measured dimension determines whether a data set is generated by random or deterministic processes. A large fractal dimension value indicates the time series' random generation. The number of variables and equations is immense, and there are no ways to predict the future values from the early parameters. This shows that the multiplicity of interacting factors precludes the possibility of understanding how the underlying mechanisms work.

On the other hand, a low fractal dimension value indicates that the data is generated by deterministic mechanisms based on a small number of independent variables, which helps to understand how the values in the past can be used to predict the values in the future. The system would be considered chaotic if the mechanism generating the data is deterministic, but the time series behaves like generated by random processes. A chaotic system is deterministic but not predictable in the long range. In a deterministic approach that is not chaotic, the value of a variable at a given time can be used to always generate the value of that variable in the future.
At early times, the heart's electric activity was modeled using a set of nonlinear differential equations [2-4]. Afterward, variations of cardiac spectra originating from deterministic dynamics called "chaotic dynamics" highly sensitive to the heart's initial conditions are analyzed [5-6]. Analyzing the power spectra of a normal human heart shows that the His-Purkinje network possesses a fractal-like structure [7], and the existence of chaotic behavior of the heart can be found from the phase space picture by evaluating a fractal dimension, \(D\), where phase space trajectories are extracted from the time series graph of ECG [8]. Lower values of \(D\) indicate more coherent dynamics. If \(D=1\), the oscillation is periodic, and the phase space picture shows a limiting cycle. However, \(D\) becomes larger than one when a limiting cycle is perturbed by random noise [9]. \(D\) has non-integer values greater than two when the system becomes chaotic or strange attractor [9]. In this case, although trajectories in time do not converge towards a limiting cycle, they stay in a bounded region in the phase space.

It is also shown that a short-term heart rate variability analysis yields a prognostic value in risk stratification, independent of clinical and functional variables [10]. However, the detailed description and classification of dynamical changes using time and frequency measures

Figure 1: PQRST in ECG and phase space. (a) ECG (b) Phase space.
are often insufficient, especially in dynamical diseases characterized by Mackey and Glass [11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63, 64, 65, 66, 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, 78, 79, 80, 81, 82, 83, 84, 85, 86, 87, 88, 89, 90, 91, 92, 93, 94, 95, 96, 97, 98, 99, 100, 101, 102, 103, 104, 105, 106, 107, 108, 109, 110, 111, 112, 113, 114, 115, 116, 117, 118, 119, 120, 121, 122, 123, 124, 125, 126, 127, 128, 129, 130, 131, 132, 133, 134, 135, 136, 137, 138, 139, 140, 141, 142, 143, 144, 145, 146, 147, 148, 149, 150, 151, 152, 153, 154, 155, 156, 157, 158, 159, 160, 161, 162, 163, 164, 165, 166, 167, 168, 169, 170, 171, 172, 173, 174, 175, 176, 177, 178, 179, 180, 181, 182, 183, 184, 185, 186, 187, 188, 189, 190, 191, 192, 193, 194, 195, 196, 197, 198, 199, 200, 201, 202, 203, 204, 205, 206, 207, 208, 209, 210, 211, 222, 231, 232, 241, 242, 251, 252, 253, 254, 255, 256, 257, 258, 259, 260, 261, 262, 263, 264, 265, 266, 267, 268, 269, 270, 271, 272, 273, 274, 275, 276, 277, 278, 279, 280, 281, 282, 283, 284, 285, 286, 287, 288, 289, 290, 282, 285, 286, 288, 287, 289, 288, 289, 280, 281, 282, 283, 285, 289, 286, 287, 288, 289, 280, 283, 281, 284, 285, 287, 288, 289, 281, 285, 289, 282, 286, 283, 287, 288, 289, 280, 284, 285, 289, 286, 287, 288, 289, 281, 282, 289, 280, 281, 283, 285, 282, 286, 287, 288, 289, 281, 288, 289, 282, 283, 285, 289, 286, 287, 288, 289, 280, 281, 282, 283, 284, 286, 288, 289, 282, 285, 287, 289, 288, 289, 280, 282, 289, 283, 284, 285, 286, 287, 288, 289, 280, 289, 281, 282, 285, 286, 288, 289, 287, 289, 288, 289, 280, 281, 282, 283, 285, 284, 286, 287, 288, 289, 282, 289, 280, 283, 285, 286, 287, 288, 289, 281, 289, 282, 284, 285, 286, 287, 288, 289, 280, 289, 281, 285, 286, 287, 288, 289, 282, 288, 289, 283, 286, 289, 287, 288, 289, 280, 284, 288, 285, 289, 281, 286, 287, 288, 289, 282, 289, 283, 285, 286, 287, 288, 289, 289, 280, 281, 282, 286, 288, 287, 289, 288, 289, 280, 282, 283, 284, 285, 286, 288, 287, 289, 288, 289, 280, 284, 288, 289, 280, 285, 286, 287, 288, 289, 281, 288, 289, 282, 28, 281, 283, 286, 289, 284, 287, 288, 289, 285, 289, 286, 287, 288, 289, 289, 280, 281, 283, 288, 282, 285, 286, 289, 287, 288, 289, 289, 280, 284, 289, 281, 285, 286, 287, 288, 289, 288, 289, 281, 289, 282, 28, 283, 289, 284, 285, 286, 287, 288, 289, 289, 280, 281, 282, 288, 289, 283, 285, 286, 287, 288, 289, 280, 289, 281, 282, 283, 288, 28, 284, 285, 286, 287, 288, 289, 288, 289, 280, 281, 282, 283, 284, 285, 286, 287, 288, 289, 280, 289, 282, 283, 286, 288, 289, 284, 285, 289, 286, 287, 288, 289, 28, 289, 28, 281, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, 2, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, 2, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, 2, 28, 28, 28, 28, 28, 2,
Additionally, a morphological descriptor is implemented in the study. It depends on the sample and amplitude distance by calculating Euclidean distance in the R-peak and the other four waves of the beat. The study reported that the best parameters were adjusted, and the models were retrained with a training set and tested with a testing set. It is specified that due to the unbalanced dataset, the mean or overall accuracy did not show the true performance of the classifier. On top of that, it is indicated that if the classifier is assigned to a normal testing class, it is expected that it would classify with at least eight-nine percent overall accuracy [16].

Nowadays, it is well understood that cardiac diseases are one of the main reasons of mortality in modern, industrialized societies, and they cause high expenses in public health systems. Due to high costs, it is essential to develop analytical methods to improve cardiac diagnostics. In this work, we investigated 44 ECG recordings taken from abnormal and normal hearts, and CNN was applied for binary classification. We aim to classify healthy and unhealthy hearts by converting the ECG recordings into phase spaces in the third-order derivate Taylor series.

The rest of the paper is organized as follows. Section 2 introduces the algorithms and describes the dataset used in this study. Results obtained from phase space diagrams of healthy and unhealthy records are given and discussed in Section 3. The conclusions, Section 4, complete our paper.

## 2 Methodology

### Phase Space Approach

We construct the phase space based on heart voltage values over time (i.e., \(f(t)\)) and their first derivative (i.e., \(\frac{df(t)}{dt}=f^{\prime}(t)\)) (see Figure 1b). We know the function \(f(t)\), but we need to obtain \(f^{\prime}(t)\). When we sketch the diagram of \(f(t)\) and \(f^{\prime}(t)\), we can construct the phase space graph. As described in [17-19], the simple approximation of \(f^{\prime}(x)\), the first derivative of a function \(f\) at a point \(x\) is specified as the limit of a difference quotient as follows:
\[f^{\prime}(x)=\lim_{h\to 0}\frac{f(x+h)-f(x)}{h} \tag{1}\]

If \(h\ >\ 0\), meaning that h is a finite positive number, then

\[f^{\prime}(x)=\frac{f(x+h)-f(x)}{h} \tag{2}\]

is called the first-order forward difference approximation of \(f^{\prime}(x)\). The approximation of \(f^{\prime}(x)\) can be obtained by combining Taylor series expansions. If the values \((x_{i+1}\,f_{i+1}\ ),(x_{i+2}\,f_{i+2}\ )\) and \((x_{i+3}\,f_{i+3}\ )\) are known, the first-order derivative of \(f_{i}(x)\) can be calculated as shown by \(f^{{}^{\prime}}_{i}(x)\).

\[f_{i+1}=f_{i}+\frac{f_{i}^{{}^{\prime}}}{1!}h+\frac{f_{i}^{{}^{ \prime\!\!\!\!\!\!\!\!\!\!\!\!\!\!\!\!\!\!\!\!\!\!\!\!\!\!\!\!\!\!\!\!\!\!\!\!\! \!\!\!\!\!\!\!\!\!\!\!\!\!\!\!\!\!\!\!\!\!\!\!\!\!\!\!\!\!\!\!\!\!\!\!\!\!\!\! \!\!\!\!\!\!\!\!\!\!\!\!\!\!\!\!\!\!\!\!\!\!\!\!\!\!\!\!\!\!\!\!\!\!\!\!\!\! \!\!\!\!\!\!\!\!\!\!\!\!\!\!\!\!\!\!\!\!\!\!\!\!\!\!\!\!\!\!\!\!\!\!\!\!\!\! \!\!\!\!\!\!\!\!\!\!\!\!\!\!\!\!\!\!\!\!\!\!\!\!\!\!\!\!\!\!\!\!\!\!\!\!\!\! \!\!\!\!\!\!\!\!\!\!\!\!\!\!\!\!\!\!\!\!\!\!\!\!\!\!\!\!\!\!\!\!\!\!\!\!\!\! \!\!\!\!\!\!\!\!\!\!\!\!\!\!\!\!\!\!\!\!\!\!\!\!\!\!\!\!\!\!\!\!\!\!\!\!\! \!\!\!\!\!\!\!\!\!\!\!\!\!\!\!\!\!\!\!\!\!\!\!\!\!\!\!\!\!\!\!\!\!\!\!\!\! \!\!\!\!\!\!\!\!\!\!\!\!\!\!\!\!\!\!\!\!\!\!\!\!\!\!\!\!\!\!\!\!\!\!\!\!\! \!\!\!\!\!\!\!\!\!\!\!\!\!\!\!\!\!\!\!\!\!\!\!\!\!\!\!\!\!\!\!\!\!\!\!\!\!\! \!\!\!\!\!\!\!\!\!\!\!\!\!\!\!\!\!\!\!\!\!\!\!\!\!\!\!\!\!\!\!\!\!\!\!\!\!\! \!\!\!\!\!\!\!\!\!\!\!\!\!\!\!\!\!\!\!\!\!\!\!\!\!\!\!\!\!\!\!\!\!\!\!\!\!\! \!\!\!\!\!\!\!\!\!\!\!\!\!\!\!\!\!\!\!\!\!\!\!\!\!\!\!\!\!\!\!\!\!\!\!\!\!\!\!\! \!\!\!\!\!\!\!\!\!\!\!\!\!\!\!\!\!\!\!\!\!\!\!\!\!\!\!\!\!\!\!\!\!\!\!\!\!\!\!\!\!\!\! \!\!
### Convolutional Neural Networks

In order to make classifications in the field of computer vision, Convolutional Neural Networks (CNN), which are inspired by human visual perceptions, have been discovered [20]. As shown in Figure 2, CNN can have one or more layers and increases its complexity with high-level features.

CNN has weights coefficients that provide learning which is equivalent to classical neural networks. CNN has achieved great success, especially with problems with images. There are convolutional layers, a pooling layer, fully connected layers, and a training process in CNN [21].

#### 2.2.1 Convolutional Layer

In the convolution layer, image or video information is extracted from the input data, as shown in Figure 3. Convolution works by learning image attributes and considering or preserving spatial relationships between pixels. If each image is considered a pixel matrix, convolution reduces data blocks to a smaller size than the given matrix. By moving the "feature detector" or "filter" matrix, the "Feature Map" or "Evolved Feature" matrix can be obtained (see Figure 3). This sequence is repeated when the input image is transformed into multiple feature map sets [23].

Figure 2: General Structure of Convolutional Neural Networks [22].
#### 2.2.2 Activation Functions and ReLU

In CNN, the activation function is frequently used as Rectified Linear Unit (ReLU). This is the stage after the convolution process. ReLU is used for including nonlinearity in training. ReLU produces zero if a function gets a negative value, or it returns the positive value, as in Figure 4.

#### 2.2.3 Pooling Layer

When there is a lot of input data, the number of trainable records and the computational load can be redundant. This load can be reduced by reducing the width and height and keeping the input data's depth. Moreover, with the pooling layer, reducing the size provides information

Figure 4: Rectified Linear Unit (ReLU).

Figure 3: Feature map in the convolution layer [24].
loss and prevents the model from memorizing [25]. Mostly, max pooling is used in the industry. Max pooling is used by taking the highest, which is the maximum value, in each specified part of the attribute map [26].

\[\text{S}_{\text{i}}=\text{max}\;\text{a}_{\text{i}}\;(\text{i}\in\text{R}_{ \text{i}}) \tag{10}\]

#### 2.2.4 Fully Connected Layers

Fully Connected Layers are the last layer of the CNN model. In order to transform the CNN model into a classical artificial network, a flattening process needs to be used. The flattening process indicates that the concatenation and the final (or any) output of the convolutional neural network, i.e., a 3-dimensional matrix, the flattened output of the convolutional layer or final merging is transmitted as input to the fully connected layer that will be transformed into a vector as shown in Figure 5. Softmax or sigmoid activation functions are used in fully connected layers in classification determination. These functions will provide a non-negative value up to one in the output layer [27].

### Model Training and Loss Function

CNN aims to minimize the wrong classes in the test set. In order to achieve that, the weight coefficients are updated. Since the correct tags of training examples are known during the training of the network, the difference between the tags estimated by CNN (with the current

Figure 5: Flattening in CNN.
weight coefficients) and the actual class tags defined in the training set is calculated with the loss function.

The parameters of neurons in convolutional and fully connected layers are updated with a gradient descent algorithm. With this algorithm, the class scores of the convolutional network can be calculated according to the tags in the training set for each image [21].

\[w_{ij}{}^{t+1}=w_{ij}{}^{t}-\alpha\left(dL/\ dw_{ij}\right) \tag{11}\]

where \(w_{ij}\) is the weight coefficient of the \(j\) neuron in layer \(i\), \(t\) is the iteration step, \(\alpha\) is the learning rate, and \(L\) is the loss function [28].

### Dataset

MIT-BIH Database contains two-channel half-hour 48 extracts of ambulatory ECG recordings taken from 47 people by the BIH Arrhythmia Laboratory between 1975 and 1979. Each of the 48 recordings is nearly over 30 minutes. In 46 of the 48 recordings, the subjects were measured with the MLII signal obtained by placing the electrodes on the subject's chest. Record 102 and record 104 could not measure in the MLII signal; they are measured in the V5 signal. These two records are excluded from the database in this thesis due to this reason. Figure 6 presents the records for healthy (101) and unhealthy (210) people taken from MIT-BIH Database. In addition, the records with paced beats were not considered, which are record 107 and record 217.

Figure 6: ECG signal of two different records. r101 Healthy, r210 Unhealthy.
In the "Hearbeat classification fusing temporal and morphological information of ECGs via ensemble of classifiers" study which was published in 2019 by Mondejar-Guerra, ECG-based automatic classifications are combined with multi-ended SVMs. The database contains nearly 110.000 beats in total. The beats are grouped under SVEB (Supraventricular ectopic beat), VEB (Ventricular ectopic beat), F (Fusion), normal and unknown. On the other hand, in this study, records data are taken individually, and CNN methodology is applied for 47 records. In order to increase the success rate of the classification, a single line was drawn in the phase space images from the Q wave connected to the highest R wave.

## 3 Results and Discussions

Phase Space Diagrams of Healthy and Unhealthy records are presented in Figure 7 and Figure 8, respectively, for the CNN analysis, where Keras and Tensorflow libraries are used in Python to implement the CNN model.

Figure 7: Phase Space Diagram of Healthy Records:

Healthy Records, Phase Space Diagram: 101, 103, 112, 113, 115, 117, 121, 122, 123, 230, and 234.
Figure 8: Phase Space Diagram of Unhealthy Records:

Unhealthy Records, Phase Space Diagram: 100, 105, 106, 108, 109, 111, 114, 116, 118, 119, 124, 200, 201, 202, 203, 205, 207, 208, 209, 210, 212, 213, 214, 215, 219, 220, 221, 222, 223, 228, 231, 232 and 233.
Input shape of 64 x 64 x 3 feature vectors were fed to the convolution layers followed by the pooling layer, where the padding features were kept the same as the input to the pooling layer. Dense layers are used to minimize the size of the output vector gradually.

The data augmentation method is used to create more pictures per epoch (see Figure 9). Zoom range, shear range, and horizontal flip parameters are adjusted with the Keras library. Two convolutional layers and max pooling are used related to the ReLU activation function. One hundred twenty-eight neurons are used in the hidden layer, and one neuron is used for the output layer due to binary CNN classification. One hundred seventy-five epochs are used to train the model.

The training set includes 33 records, and the test set consists of 11 records (Table 1). The training set ratio is 75%, and the test set ratio is 25%. The Healthy test set includes three different records, and the training set contains eight different records. 27.27% of healthy records exist in the testing set and 72.72% in the training set. The disease test set includes eight disease records, and the training set contains 25. There 24.25% of disease records exist in the test, and 75.75% exist in the training set. The model generally results in higher accuracy in training and testing sets. Although there is an outlier epoch performance in the 105th epoch after the 75th epoch, the training set accuracy and testing set accuracy increase with higher parallel performance (Figure 10).

Figure 9: The architecture of CNN model.
It can be seen that the training and testing loss are parallel. The results show that the training ratio and data augmentation prevented the overfitting problem (see Figure 11). Therefore, the model can train itself to classify the training dataset and accurately classify the test dataset. As a result, model accuracy improves in the training and test sets with a well-trained model to classify healthy hearts and diseased hearts.

\begin{table}
\begin{tabular}{|c|c|c|} \hline
**SET** & **Training Set** & **Testing Set** \\ \hline Healthy & 101, 113, 115, 117, & 103, 112, 234 \\ records & 121, 122, 123, 230 & 103, 112, 234 \\ \hline  & 106, 108, 109, 114, & \\  & 116, 118, 119, 124, & \\ Unhealthy & 201, 203, 205, 207, & 100, 105, 111, 200, \\ records & 208, 209, 214, 215, & 202, 210, 212, 213 \\  & 219, 220, 221, 222, & \\  & 223, 228, 231, 232, 233 & \\ \hline \end{tabular}
\end{table}
Table 1: Training Set and Test Set

Figure 10: Phase Space model loss comparison of training set and testing set in altered dataset.
Among 11 test records, the model can correctly classify 10 test records with only one faulty record. Healthy test set accuracy is 100%. Among three healthy records, the model can classify all the records correctly. On the other hand, the disease test set accuracy is 87.5%. The model can correctly classify all records except r100 among eight disease records. This record is classified under a healthy record, although it is an unhealthy heart. Figure 12 summarizes the output of the phase space results with altered data records.

Figure 11: Phase Space accuracy comparison of training set and testing set in altered dataset

Figure 12: Phase Space model outputs of training set and testing set in altered dataset
As shown in Table 2, it can be observed that model can classify health records with the best accuracy reaching almost 100% in the test set. The model has 87.5% accuracy that classifies disease records. There are no overfitting problems reported in this model training. The training accuracy and testing accuracy are similar, with very high accuracy rates.

## 4 Conclusion

After the transformation of the data into phase diagrams, despite the insufficient number of data, this model can achieve remarkable accuracy rates. The model can classify healthy and unhealthy heart image records with 90.90% accuracy using only 44 images and the Data Image Generator feature.

Overfitting problems are inevitable when the number of data is limited. CNN can extract essential features and make valuable distinctions between healthy and unhealthy hearts as a result of transforming the data into phase diagrams. The overfitting problem is outperformed, and the model obtains a healthy learning process.

The model holds an excellent performance for the determination of the classification of healthy hearts. The three records (r103, r112, and r234) are classified correctly. Furthermore, the model learned the essential features of healthy hearts and clearly classified unhealthy hearts. The results show the model's success with 87.50% accuracy rates in the classification performance of unhealthy hearts.

\begin{table}
\begin{tabular}{|c|c|} \hline
**Model** & **Accuracy** \\ \hline
**Training Set** & 96.97\% \\ \hline
**Test Set** & 90.90\% \\ \hline
**Healthy Test Set** & 100.00\% \\ \hline
**Disease Test Set** & 87.50\% \\ \hline \end{tabular}
\end{table}
Table 2: Results of the Model
Finally, it may be concluded that more than 2 layers in convolutional layer can be included to improve the model design and increase the accuracy. In addition, more hidden layers can be added to update weights to classify the outcome.
