Experimental Environment
All experiments in this study were conducted on a computer equipped with an Intel Core i7-14700K processor, 64GB of RAM, and an NVIDIA GeForce RTX 4090 GPU. The CUDA version used was 12.6, the PyTorch version was 2.1.2, and the Python environment was set up using Visual Studio Code from Anaconda Navigator.
DNNCM
Data sources
The Deep Neural Network Classification Model (DNNCM) was trained and evaluated using the UCI dataset. This dataset is a compilation of four sub-datasets: "Cleveland," "Hungary," "Switzerland," and "Long Beach V." Each sub-dataset originates from a different medical research institution: the Cleveland Clinic, the Hungarian Institute of Cardiology, a medical research facility in Switzerland, and the University of California, Long Beach. The dataset consists of a total of 1,025 samples, 13 feature fields, and 1 target field.
Model Architecture
As shown in Fig. 2, The first fully connected layer of the model transforms the input features into 64 hidden nodes. This is followed by a ReLU activation function, which introduces non-linearity to the model, allowing it to learn complex feature representations. The ReLU activation function has advantages such as simple computation and a constant gradient in the positive interval, which helps mitigate the vanishing gradient problem. Next is a Dropout layer, which randomly drops nodes with a probability of 0.3. Following this, another fully connected layer reduces the 64 nodes to a single output node, used to generate the final prediction. Finally, a Sigmoid activation function is employed to map the output layer's values to the (0, 1) range, making it suitable for probability predictions in binary classification tasks.
Training
After conducting small-scale exploratory training, this model can consistently achieve an accuracy of over 0.9. Based on these results, the model undergoes training for 100,000 iterations, with 200 epochs per iteration, to find the optimal model parameters. During the training process, the accuracy is tracked after each epoch. Whenever a new accuracy high is achieved, the accuracy is recorded, and the model parameters are saved. After a total of 20 million epochs of training, the model achieved a peak accuracy of 0.9655.
HDRPMα
Data sources
The development of HDRPMα is primarily based on a modified version of the UCI dataset.
As mentioned earlier, the main objective of HDRPS is to reduce the cost of screening and warning for heart disease, and to improve the efficiency of heart disease prediction and prevention. Therefore, the data accepted by HDRPMα must be low-cost and easy-to-obtain health data to align with the initial design goals of the system. The dataset is preprocessed according to this standard.
Initially, the dataset contains 13 feature fields, some of which require hospital visits and even professional medical diagnosis to obtain. After careful examination, we identified five features that are relatively difficult to obtain: restecg, oldpeak, slope, ca, and thal. By removing these five features, the remaining eight features are easily accessible, thus facilitating users' everyday use of HDRPS. The rest of the dataset remains unchanged, and this modified 8-feature UCI dataset will be used for the development of HDRPMα.
Model Architecture
The first fully connected layer accepts 8 input features and outputs 16 nodes. This is followed by a ReLU activation function, which introduces non-linearity and helps capture complex relationships within the input data.
The first Dropout layer randomly drops 30% of the features to reduce overfitting. The second fully connected layer further maps the output of the first layer to 32 nodes. The ReLU activation function and Dropout layer in the second layer serve the same purpose as before. The third fully connected layer expands the features to 64 nodes, followed by a ReLU activation function.
The fourth fully connected layer maps the 64-node features to 2 output nodes, which is suitable for binary classification problems.
The Sigmoid activation function compresses the output of the fourth fully connected layer to the (0, 1) range, which is typically interpreted as a probability, making it appropriate for outputs in binary classification tasks.
Fig. 3 shows the architecture of HDRPMα.
Training
After finalizing the model structure, extensive training was conducted. HDRPMα consists of 2,994 learnable parameters. Throughout the development process, the model was trained for approximately 130 million epochs, achieving a maximum accuracy of 0.917. Reaching this level of accuracy with only the 8-feature UCI dataset is a highly commendable result.
HDRPMβ
Data sources
As previously mentioned, research on heart disease prediction using electrocardiograms (ECGs) often relies on highly specialized ECG signal data that is difficult for the average person to access and understand. Fortunately, current smart wearable devices can perform mobile ECG monitoring and export the data as PDFs, allowing people to obtain ECG images conveniently. Therefore, the development and training of HDRPMβ must utilize an ECG image dataset. We selected ECG images extracted from the MITBIH Arrhythmia Dataset to represent the diseased portion of the training data, and 50 ECG images from the European ST-T Database were chosen to represent the healthy portion of the training data.
Model Architecture
HDRPMβ is a convolutional neural network model designed for heart disease prediction, consisting of multiple convolutional layers, pooling layers, and fully connected layers , shown in Fig. 4, with the inclusion of activation functions and Dropout regularization to enhance model performance and robustness. The model input is a single-channel (grayscale) ECG image. Initially, the input passes through a convolutional layer that includes 16 filters of size 3×3, with a stride of 1 and padding of 1, to extract preliminary features. This is immediately followed by a ReLU activation function to introduce non-linearity, and a 2×2 max pooling layer is applied for down-sampling, followed by a 30% Dropout to reduce overfitting. Subsequently, the second convolutional layer increases the feature map to 32 channels, using the same 3×3 filter size, stride of 1, and padding of 1, followed by ReLU activation, max pooling, and another 30% Dropout. The third convolutional layer further extracts features, outputting 64 channels, with the same filter and pooling configuration. After completing the convolution and pooling process, the three-dimensional feature maps are flattened into a one-dimensional vector, passing through a fully connected layer with 128 nodes, utilizing a ReLU activation function and a 50% Dropout. In the output layer, a fully connected layer maps the 128 nodes to 2 output nodes, employing a Sigmoid activation function to compress the outputs into the range of 0 to 1, suitable for probability predictions in binary classification tasks.
Training
HDRPMβ consists of approximately 1.45 million learnable parameters, and the development process involved training for a total of about 5 million epochs. The model achieved a maximum accuracy of 0.95.