Introduction

The healthcare system (HCS) is one of the biggest in emerging nations, with yearly growth in both employment and income1. The essence of the HCS is collaboration2. This is because many stakeholders work together to achieve common goals of reducing medical expenses and mistakes, including nurses, radiologists, laboratory techs, physicians with various specialties, and pathologists, delivering high-quality, improved healthcare services3. In the past, diagnosing uncommon illnesses required a thorough physical and analytical examination performed in hospitals4. These days, a smartwatch may assist us in determining the cause of any health anomaly5. In the event an epidemic illness like Ebola strikes, technology is crucial in preventing its fast spread and notifying people about the necessary precautions to adopt6. Technology advancements are causing a transition in healthcare services from hospital-centric care to individualized, personalized treatment7. Numerous clinical tasks, including blood tests, diabetes monitoring, and pressure monitoring, may be completed in real-time and at a distance8. The development of data services and connectivity in developing nations has made remote healthcare system monitoring practical and valuable9. As the HCS grows, it requires big data technology to gather, analyze, manage, and store massive amounts of data10. Big Data analytics is becoming a common way to manage vast volumes of data and improve decision-making11.

Big data signifies the quantity of the data utilized and analyzed and includes the potential for data to provide essential insights through various features12. It is categorized into a few terms. i.e.13, volume is the quantity of information developed; velocity is the rate of data transmission, and Variety is used to describe the range of data types that may be contained in plain text files, including database, excel, and CSV14, value indicates the worth of the data. However, it’s essential to realize that not all data are helpful; veracity indicates the comprehension of data15, validity assures the correctness and Precision of data for future uses, variability is the reliability and significance of data, Viscosity denotes delay or time lag in data transfer between the source and destination16, viability denotes the speed with which data is transferred and received from multiple sources. Visualization represents the complexity of extensive data and helps organizations acknowledge its relevance17. It is essential to pay close attention to the increasing demands for improved technologies that can handle problems with processing large data sets without affecting security and privacy18,19. Healthcare organizations employ tools for extensive data analysis that guarantee the availability20, confidentiality21, and integrity of protected health information22. The World Health Organization’s estimates show that cardiac disease is the world’s most significant cause of demise, which accounts for 17.9 million fatalities every year23. The most common behaviors drinking alcohol is a contributing factor to the risk of stroke and heart disease, smoking, poor dietary habits, and not exercising24. Deep learning (DL) has become a necessary tool in the healthcare industry to help diagnose patients.

The key contribution of the proposed work is;

  • Initially, the IoT healthcare dataset was gathered and trained using the Python system.

  • A novel Deep Red Fox Belief Prediction System (DRFBPS) is introduced as a predictive method with the necessary features for prediction.

  • The collected data is preprocessed to remove noise, and feature analysis is performed using Red Fox optimization to select the required features from the vast data.

  • Using these selected features, the DRFBPS analyzes and predicts heart disease risk factors.

  • The model’s effectiveness is assessed using measures including accuracy, F-score, Precision, AUC, Recall, error rate, p-value, and confidence intervals.

This paper contains recent related works in the second portion, the model issue is described in the third portion, the obstacles are developed in the fourth portion, and the case study and performance validation for the developed Framework are discussed in the fifth. In the sixth portion, the work is finally concluded.

Related work

A few of the most current studies in this area include;

Alizadehsani et al.25 have examined the majority of COVID-19 cases that had flu-like symptoms, according to the investigation carried out in Iran from March to April 2020. 319 individuals participated in the research. The primary indications and manifestations were advanced age, fever, sweating, dyspnea, disorientation, weakness, ageusia, shivering, anosmia, anorexia, exhaustion, and dry cough. There was no discernible association between COVID-19 and the following variables: sputum-producing cough, eczema, conjunctivitis, travel, asthma, corticosteroids, liver illness, rheumatological diseases, and chest discomfort. The limitation is the extremely little (2-month) follow-up period may not have captured the disease’s long-term effects on death.

Dritsas and Trigka26 have assessed many models to provide an efficient basis for predicting long-term stroke risk incidence using ML. The primary contribution of this work is a stacking technique that produces excellent results. The experiment’s findings demonstrated that with an accuracy of 98%, the stacking classification works better than the other approaches. This study’s dependence on a publicly accessible dataset raises certain limitations. Data gathering techniques may not be standardized, and public datasets may not undergo strict quality control processes.

Reddy et al.27 have developed 10 ML classifications for predicting heart disease risk by utilizing the Cleveland heart dataset and the best attributes determined by attribute assessors. With the whole collection of attributes, the sequential minimum algorithm classifier produced 85%ccuracy; with the optimum characteristics, the classifier produced 86% accuracy. The best ROC area of 0.91 was obtained. The limitation is that it performs with a small dataset, which may cause overfitting.

Mahmud et al.28 investigated Veterans’ Results and Costs Related to Liver Disease (VOCAL) data used in a retrospective cohort analysis and found 4712 surgical operations in 3785 cirrhosis patients. The research classified procedures and utilized multivariable logistic regression to estimate postoperative mortality using the models. The models showed good discrimination and higher performance, but the limitation is they face misclassifications with the large dataset.

Yang et al.29 have developed a computational technique to predict people with diabetes by merging multiple forms of physical assessed data. Data on physical tests of both healthy persons and diabetic patients were gathered between 2011 and 2017 in Luzhou City, China. An eXtreme Gradient Boosting (XGBoost)-based model was created to distinguish between diabetic patients and healthy people. Additionally, a diabetes risk scorecard was developed to assess people’s health. Based on this information, an online diabetes risk evaluation approach was created to improve personal lifestyle management and diabetes cascade screening to offer recommendations for managing human health. It demonstrates poor performance in feature analysis.

Alqammash et al.30 have developed an advanced model to predict COVID-19 cases in high-altitude and low-sea-level regions of Saudi Arabia. In addition to three machine learning methods—random forest, gradient boosting, and naive Bayes—this model integrates binary particle swarm optimization. The results show that the gradient boosting model outperforms both the random forest and naive Bayes models. However, it has problems with computational complexity.

Elshewey et al.31 have developed a novel method for accurately classifying potato late blight disease. This approach employs pre-trained models such as ResNet-50, GoogLeNet, AlexNet, and VGG19Net. Specifically, the AlexNet model is utilized to extract features, which are subsequently optimized using ten different algorithms. The most accurate is the Binary Waterwheel Plant Algorithm Sine Cosine (WWPASC). Five machine learning models train the specified features. With high classification accuracy, it outperforms the previous four optimization methods. However, it has limitations due to the risk of overfitting.

Elshewey et al.32 have introduced a model that uses an optimized gradient-boosting classifier to predict HCV disease in Egypt. The model’s accuracy is improved by optimizing hyperparameters with the OPTUNA framework. The model uses a 1385-instance dataset and a forward selection-wrapped method to identify essential features. The study compares the performance of five machine learning models, achieving a 95.3% accuracy rate. However, it faces challenges in computationally expensive and requires high processing time.

Alqammash et al.33 have developed an improved linear regression model using multivariate adaptive regression splines (LR-MARS) to forecast crude oil demand in Saudi Arabia using the social spider optimization (SSO) algorithm. The performance of this model was higher than other models, as demonstrated by the ANOVA results. However, this study did not compare it with other commonly used optimization algorithms.

A Convolutional neural network with long short-term memory (CNN-LSTM) model for potato disease detection was proposed by Alsakhari et al.34, which was evaluated on a Z-score-standardized dataset. The model was tested against five classic machine learning algorithms: Random Forest, Extra Trees, K-Nearest Neighbors, Adaptive Boosting, and Support Vector Machine. The CNN-LSTM model has the highest accuracy of 97.1%, outperforming other models in terms of Precision, sensitivity, specificity, F-score, and AUC. However, the uneven distribution of disease groups in the dataset is a major drawback.

Research gap

Despite significant advances in predictive models for heart disease risk assessment, several challenges persist. Many existing models suffer from issues like overfitting, inadequate feature selection, and limited scalability when applied to diverse and large datasets. Traditional machine learning approaches often fail to incorporate the complex interactions among multiple risk factors, which can lead to inaccurate predictions. Moreover, while Deep Learning (DL) techniques have shown promise in handling such complexities, they often require substantial computational resources and are prone to overfitting, especially when trained on imbalanced datasets.

Furthermore, the current literature lacks comprehensive solutions that integrate effective feature selection methods with robust predictive models to enhance accuracy and reliability. The potential of optimization techniques, such as Red Fox Optimization, in selecting relevant features for improving prediction performance remains underexplored. Additionally, there is a need for models that can efficiently process large-scale healthcare data while maintaining the confidentiality and integrity of patient information.

The introduction of a novel Deep Red Fox Belief Prediction System (DRFBPS) aims to address these gaps by integrating advanced feature selection with deep learning for improved prediction accuracy and reliability. By focusing on these under-researched areas, this study seeks to contribute to the development of more effective heart disease risk prediction models, ultimately enhancing patient outcomes through early intervention and personalized treatment strategies.

System model with problem

Big data is necessary in the healthcare system to enable smooth communication between patients and healthcare professionals, to boost patient involvement in the treatment process, to provide evidence-based care, and to aid in the early identification of disease and security concerns. Heart disease continues to be a concern to world health. To avoid problems and enhance patient outcomes, early identification, and risk factor prediction are essential. Traditional risk assessment techniques have certain limitations in prediction due to the missing data and the inability of the methods to handle large datasets. The challenges faced by the existing techniques are shown in Fig. 1.

Fig. 1
figure 1

System model with problem.

As the healthcare system contains a vast amount of data, the predictive model should possess the capacity to manage big data for prediction. Specifically for large data healthcare systems, this paper proposes an efficient deep learning technique. The goal of this strategy is to create a more precise and effective model for predicting heart disease risk factors by using an enormous quantity of patient data.

Proposed methodology

Heart disease risk factor prediction is the identification of people with an increased chance of heart disease. This information helps healthcare professionals implement early interventions and preventive measures to reduce risk and improve cardiovascular health. Hence, a novel Deep red fox belief prediction system (DRFBPS) has been introduced as a predictive model. Initially, the datasets from the health care system are collected and preprocessed to eliminate errors and handle missing values. The red fox optimization is used to select the required features, and based on these selected features, the DRFBPS predicts the risk factors. Finally, the performance is evaluated.

The proposed model architecture is displayed in Fig. 2. A few measures are used to assess the predictive model’s performance and efficiency. Here is a description of the demonstrated model process.

Fig. 2
figure 2

Proposed DRFBPS architecture.

Process of proposed DRFBPS

The recommended Framework functions with deep belief network (DBN)35 and red fox optimization (RFO)36. Red Fox Fitness selects the required features to predict risk factors. The deep brief network is a DL technique; it can handle complex data and efficiently learn complex relationships among features for the best prediction. The DRFBPS layer diagram is provided in Fig. 3

Fig. 3
figure 3

DRFBPS layer.

The DRFBPS has three layers. Input layer, hidden layer, and output layer. The Input Layer takes healthcare data in the form of multiple health parameters. The Hidden Layer comprises three Restricted Boltzmann Machines (RBMs). The RBM 1 is employed for the preprocessing, the RBM 2 conducts feature selection with Red Fox Optimization, and the RBM 3 performs prediction. The RBMs used the sigmoid activation function for probabilistic feature learning and ReLU in the prediction layer to add non-linearity. The Cross-Entropy Loss function is utilized for classification. Training is done with the hyperparameters learning rate of 0.001, batch size of 32, and a dropout of 0.2 to avoid overfitting. Lastly, the Output Layer utilizes a Softmax activation function for binary prediction and classifies the heart disease risk as High Risk or Low Risk. Initially, the datasets have been gathered and trained. It is executed in Eq. (1)

$$T(H_{d} ) = H_{d} \{ 1,2,3,...,n\}$$
(1)

here, \(T\) denotes the training variable, \(H_{d}\) denotes the health care data, and \(\{ 1,2,3,...,n\}\) denotes the \(n\) amount of data.

Preprocessing

Preprocessing is a critical initial step in leveraging IoT healthcare data to forecast heart disease risk using DRFBPS. It entails cleaning and handling missing values, identifying and eliminating outliers, and deleting extraneous information. The RFO Worst function handles preprocessing. It detects the worst-performing features that cause redundancy and eliminates them. It initiates by checking each feature statistically and heuristically, i.e., variance, correlation with the target variable, and the contribution of the feature. The RFO makes a dynamic ranking of features and eliminates the least optimal ones. Thus, it minimizes dimensionality and improves the data quality. By using this method, the system produces more precise and efficient results and performs better at filtering than a traditional filter. By using this method, the system produces more accurate and efficient results and performs better at filtering than a traditional filter37. The preprocessing is done in Eq. (2)

$$P(H_{d} ) = \frac{{\lambda (H_{d} ) - e}}{P}$$
(2)

here, \(P\) signifies the preprocessing variable, \(\lambda\) signifies the noise filtering function of the RFO, and \(e\) denotes the error constraints. It enhances data quality, and these strategies increase model performance, eventually leading to more accurate forecasts.

Feature selection

Feature selection is the technique of selecting pertinent traits from a large quantity of data. The Fitness function of the red fox fitness is used in the feature selection process. It enhances the model’s effectiveness and accuracy for predicting the risk of heart disease by selecting the most relevant features that differentiate the heart as a risk factor. Feature selection is executed in Eq. (3)

$$F(H_{d} ) = P(H_{d} )^{t} + \alpha \left[ {P\left( {H_{d}^{best} } \right)^{t} } \right]$$
(3)

here, \(F\) denotes the feature extraction variable, \(P(H_{d} )\) denotes preprocessed data, \(t\) denotes the iteration, \(\alpha\) denotes the red fox fitness function, \(P\left( {H_{d}^{best} } \right)\) is the best feature that is randomly selected for each iteration. RFO imitates the wise hunting and escape behavior of red foxes. The Algorithm selects optimal feature subsets by iteratively improving candidate solutions based on exploration and exploitation rules. RFO adaptively modifies the search process in terms of balancing exploitation that optimizes promising subsets and exploration for searching new feature combinations. So that local optima may be avoided and an optimal feature subset identified. This method of reduction in dimension, improved model performance, and prevention of overfitting occurs.

Prediction

Heart disease risk factor prediction determines and evaluates the variables that influence a person’s risk of heart disease. With several features, such as heart rate, cholesterol level, age, gender, etc., that are analyzed in the feature selection process, the predictive model determines the risk of heart disease. It is shown in Eq. (4)

$$D(H_{d} ) = \frac{{F(H_{d} )*\left( {R,H} \right)}}{E}$$
(4)

\(D\) denotes the disease risk prediction variable, \(F(H_{d} )\) denotes selected features, \(R,H\) denotes the heart at risk and health, respectively, and \(E\) denotes the Established standard score. Based on the prediction, the disease is classified, and it is executed in Eq. (5)

$$C = \left\{ {\begin{array}{*{20}c} {\begin{array}{*{20}c} {ifD(H_{d} ) > E} & {\begin{array}{*{20}c} {High} & {Risk} \\ \end{array} } \\ \end{array} } \\ {\begin{array}{*{20}c} {ifD(H_{d} ) \le E} & {Low\,Risk} \\ \end{array} } \\ \end{array} } \right.$$
(5)

here, \(C\) implies the classification variable. The classification is based on the high and low-risk condition of the heart. Hence, the proposed DRFBPS performs better in predicting and classifying the disease.

Algorithm 1
figure a

DRFBPS.

figure b

The Algorithm for the proposed DRFBPS is displayed. The Python system executes the entire computing process employing a pseudo-code pattern. Figure 4 shows the process diagram for the designed Framework.

Fig. 4
figure 4

Flowchart for the proposed DRFBPS.

The workflow for the designed Framework is displayed in Fig. 4. It presents the working methodology for the suggested DRFBPS sequentially. Algorithm 1 shows some mathematical operators. Some criteria are used to compute the proposed DRFBPS model successfully.

Results and discussion

The Windows 10 Python Environment is used to validate the proposed DRFBPS model. The datasets have been collected, and they undergo preprocessing to remove errors and feature selection to select the needed features for accurate prediction. The Red Fox Fitness function selects this feature. Based on the selected features, the disease has been predicted. The computational time of the suggested DRFBPS is also a major concern for healthcare applications. Here, the training took an efficient time of 150 s. Furthermore, memory usage was measured at 209.87 MB, which reflects effective resource usage. For inference, the DRFBPS model is optimized to run with optimal feature selection to achieve quicker prediction times with little computational overhead. The necessary metrics for the proposed DRFBPS are depicted in Table 1.

Table 1 Execution parameters.

Case study

Initially, the healthcare dataset was gathered and loaded from the Kaggle standard site. It is the heart attack risk prediction (HARP) dataset. The dataset contains 88,414 records with a size of 18.43 MB. The dataset has 46,944 low-risk samples and 41,470 high-risk samples. Of that data, it is split into 70% for training as 32,861 low-risk and 29,029 high-risk instances. Similarly, the data is split into 30% for testing as 14,083 low-risk and 12,441 high-risk instances. The key information gathered from the health care data includes age, gender, blood pressure readings (systolic and diastolic), body temperature, and cholesterol rates (low, high, and total). Table 2 illustrates the risk characteristics and the embedded value consideration for each.

Table 2 Risk factors, codes, and range.

Table 2 demonstrates the risk features for heart disease with its labeled code for two stages: low and high risk 0 and 1, which are the two states in which the model is intended to establish high and low levels of characteristics.

The Shapley Additive Explanations (SHAP) plot in Fig. 5 provides an insight into the impact of different features on the model output. The top bar plot shows the SHAP values on average, and the features Heart, LDL Cholesterol (LDL Chol), and Age have the highest impact on model predictions. The bottom summary plot shows the direction and magnitude of feature contributions, where each point represents an instance in the data, with color coding (blue for low values and pink for high values). Features like Heart and LDL Cholesterol have high impacts on predictions, with high values (pink) contributing positively to the model output. Features like HDL Cholesterol and Body Temperature have relatively lower impacts. The SHAP values also show feature interactions and their impact on prediction variability, and hence, it is an appropriate tool for explainable AI in medicine and medical diagnostics.

Fig. 5
figure 5

SHAP feature impact.

The feature importance heat map in Fig. 6 displays the correlation matrix of different features, and color intensity shows the strength and direction of associations. A value close to 1 (red) shows a strong positive correlation, and a value close to − 1 (blue) shows a strong negative correlation. Features such as heart rate (Hea) and systolic BP (Sys) are strongly and positively related, indicating that rising systolic pressure is related to heart conditions. Similarly, diastolic BP (Dia) and age are strongly and positively related, implying that pressure rises with age. Gender (Gen) and age are strongly and negatively related, implying gender-based patterns. LDL Cholesterol (LDL) and HDL Cholesterol (HDL) are weakly negatively correlated. The heatmap is useful in interpreting feature interactions, is important in predictive modeling, and demonstrates the greater influence of features on results. Figures 7 and 8 show the accuracy and loss curves, respectively, that were acquired throughout the training and testing phases. An accuracy and loss curve visually represents the model’s accuracy and loss throughout training and testing epochs. It shows the capacity of the model to distinguish heart disease between normal and risky.

Fig. 6
figure 6

Feature importance heat map.

Fig. 7
figure 7

Training and testing accuracy curve.

Fig. 8
figure 8

Training and testing loss curve.

The loss curve represents the model’s error throughout training and testing epochs. A loss curve that starts high and gradually falls throughout testing indicates higher performance, whereas a loss curve that continuously drops during training indicates more accurate predictions.

Figure 9 shows the confusion matrix of a classification model’s performance. The matrix displays true labels against the predicted labels. The model correctly classified 14,081 instances as class 0 low risk and 12,441 instances as class 1 high risk. There are merely two instances of misclassification. This implies that the model acts exceptionally well with very few errors. To verify the importance of the red fox optimizations, feature selection, the results are evaluated and compared before and after feature selection. The results are displayed in Fig. 10

Fig. 9
figure 9

Confusion matrix.

Fig. 10
figure 10

Performance before and after feature selection.

The p-value attained before feature selection is 0.07, and after feature selection is 0.001. Moreover, the error rate attained before feature selection is 0.1369, and after feature selection is 0.014. Feature selection with the RFO technique improves the model’s performance by selecting the most relevant features and removing noisy and redundant information. This leads to improved generalization, reduced error rates, and improved statistical significance, as indicated by the decrease in p-value. Feature selection also improves computational efficiency to the largest possible degree, such that the model can make faster and better predictions. Overall, feature selection improves the model’s learning by improving predictive performance and accuracy. The ablation study is provided in Table 3

Table 3 Ablation study.

Performance analysis

The Python environment is used to verify the developed model’s efficacy. To analyze the model’s abilities in prediction, it is compared with metrics such as Accuracy, F score, Precision, AUC, Recall, and error rate. To assess the proposed DRFBPS model performance with other techniques, it is compared with a few existing approaches such as ML Voting Classifier (MLVC)38, ML stacking classifier MLSC39, Light Gradient Boosting Classifier (LGBC)40, Extreme Gradient Boosting with Random Forest (EGBRF)40, CNN Sparse Autoencoder (CNNSA)41 and Linear SVM (LSVM)42.

Accuracy

Accuracy is a significant performance measure used to predict heart disease risk factors. It demonstrates that the percentage of the model correctly predicts whether heart disease risk variables are present or absent. Accuracy is evaluated by Eq. (6)

$$Accuracy = \frac{CP + CA}{{CP + CA + IP + IA}}$$
(6)

here, \(CP\) denotes the correctly predicted risk present, \(CA\) denotes correctly predicted absence of risk, \(IP\) denotes incorrectly predicted the risk present, and \(IA\) denotes the incorrectly predicted absent of risk. The accuracy is compared with the existing approaches and is shown in Fig. 11

Fig. 11
figure 11

Accuracy comparison.

The accuracy rate achieved by the existing MLVC is 80.1%, MLSC is 90.9%, LGBC is 77.84%, EGBRF is 75.63%, CNNSA is 83.56% and LSVM is 86.43%. The developed DRFBPS achieved an accuracy of 98.6%, and with a high attained accuracy rate, the proposed model shows better performance.

Precision

Precision, also known as optimistic prediction, is a measurement used to validate the accuracy of a predictive model, especially in classification tasks like recognizing heart disease risk factors. Precision measures the proportion of correct risk forecasts among all risk forecasts. It is computed by Eq. (7)

$$Precision = \frac{CP}{{CP + IP}}$$
(7)

The precision metric is assessed and compared with existing techniques displayed in Fig. 12. High Precision indicates that the model has high accuracy in its optimistic predictions, implying that most of the occurrences it predicts as having the heart disease risk factor are correct.

Fig. 12
figure 12

Precision comparison.

The existing techniques MLVC, MLSC, LGBC, EGBRF, CNNSA, and LSVM attained a precision rate of 80.4%, 96.7%, 74.6%, 73.13%, 85.2%, and 87.5% respectively. The proposed DRFBPS model attained 94.7%, which performs better than the existing approaches.

Recall

Recall is an important metric to assess the model’s efficiency. It measures the predicted risk instances to the total actual risk. It assesses the model’s capacity to detect every risk instance accurately. It is evaluated by Eq. (8)

$$Recall = \frac{CP}{{CP + IA}}$$
(8)

High Recall ensures that most patients with heart disease are appropriately recognized. It is assessed, and the abovementioned techniques are compared in Fig. 13.

Fig. 13
figure 13

Recall comparison.

The Existing MLVC gained a recall rate of 80.1%, MLSC gained 87.6%, LGBC gained 73.26%, EGBRF gained 68.25%, CNNSA gained 82.9% and LSVM gained 85.9%. The proposed model DRFBPS gained a recall rate of 97.9%. In comparison to the other methods, DRFBPS achieved a relatively greater recall rate.

F score

Precision and Recall are combined in a statistic called the F score. It combines the Precision and recall measures and assesses the Framework’s ability to correctly predict the risk factors by avoiding errors. It is equated in Eq. (9)

$$\begin{array}{*{20}c} F & {score = 2 \times \left[ {\frac{x \times y}{{x + y}}} \right]} \\ \end{array}$$
(9)

here, \(x\) denotes the precision rate and \(y\) denotes the recall rate. The F score value for the DRFBPS model is assessed, and its comparison is shown in Fig. 14.

Fig. 14
figure 14

F-score comparison.

The F score for the existing MLVC is 80.1%, MLSC is 92.15%, LGBC is 73.93%, EGBRF is 70.61%, CNNSA is 84.05%, LVSM is 86.7% and the proposed technique attained a 97.7% F score value. The attained higher F score demonstrates better performance of the model in predicting.

Error rate

Error rate represents the proportion of incorrect predictions to the total prediction number. It is evaluated to determine the negative predictions done by the model. It describes the overall performance of the model. It is evaluated by Eq. (10)

$$\begin{array}{*{20}c} {Error} & {rate = \frac{IP + IA}{{CP + CA + IP + IA}}} \\ \end{array}$$
(10)

Figure 15 displays the error rate comparison. The error rate achieved by the existing MLVC is 0.199, MLSC is 0.091, LGBC is 0.2216, EGBRF is 0.2437, CNNSA is 0.1644, and LSVM is 0.1375. The designed model DRFBPS has an error rate of 0.014. The error rate obtained by the developed technique is lower, so it performs better.

Fig. 15
figure 15

Error rate comparison.

AUC

The AUC is the performance indicator for classification models that is significant in evaluating the model’s capacity to differentiate. In performance categorization, a high AUC value is more effective. Its comparison is shown in Fig. 16.

Fig. 16
figure 16

AUC comparison.

The AUC for MLVC, MLSC, LGBC, EGBRF, CNNSA, and LVSM is 88.4%, 96.1%, 72.27%, 74.71%, 90.3% and 92.1% respectively, and the proposed DRFBPS obtained 98.2%.

P-vale and confidentiality interval

The p-value and confidence interval (CI) are important statistical validation metrics to evaluate the robustness of predictive models. P-value aids in identifying the significance of correlations between risk factors. The CI gives an interval of values. The CI is narrow for greater precision and wide for greater variability of the estimates. Both these measures combined increase the statistical validity of heart attack risk prediction, so predictive models should be accurate and generalizable to larger populations. The results of the statistical validation p-value and confidence intervals are described in the Table 4

Table 4 Overall comparisons.

Moreover, the overall effectiveness of the designed Framework demonstrates a better predictive technique. The entire functionality of the planned DRFBPS with current techniques is depicted in Table 4.

DRFBPS’s higher performance compared to existing models is due to its capability of capturing intricate, non-linear interactions in the data more efficiently. The model delivers a remarkable accuracy rate, which greatly surpasses existing approaches. This enhancement is seen in all the evaluation metrics, with DRFBPS having a very low error percentage among all other models, which reflects its low misclassification rate. Its high Precision and Recall also reflect its strength in true positive detection while keeping false positives and false negatives to a minimum. Its high F-score verifies its equitable performance in Precision and recall, further establishing its dependability. In addition, DRFBPS has the best AUC value, demonstrating its best discriminant ability in classifying. The low p-value indicates a statistically significant relationship. While so, the CI gives an interval of values in which the actual effect size will probably fall, generally at a 97% confidence level. The wide gap in performance implies that DRFBPS has optimized feature selection processes that maximize its predictability, generality, and resilience to intricacies in the data structure to make it the best-performing model among the compared methods.

Additionally, to verify the selection of RFO, other optimization algorithms such as the genetic Algorithm (GA), Particle swarm (PS), and Bayesian optimization (BO) are hybrid with DBN, and the results are shown in Table 5

Table 5 DBN with other optimizations.

Table 5 shows that the proposed DBN + RFO model performs the best with accuracy, which signifies an excellent selection of RFO. It also possesses the lowest error rate and highest AUC, indicating superior discrimination ability. The lowest p-value, indicating statistical significance and a high confidence interval, supports its credibility. These findings demonstrate the efficiency of the proposed DBN + RFO method in enhancing prediction accuracy.

Discussion

The proposed DRFBPS demonstrates better performance in predicting risk factors. It leverages a novel strategy, Red Fox Optimisation, and a Deep belief neural network that uses the capabilities of both approaches as the data for the current research were obtained from Kaggle, which might expose the model to potential biases and make generalization a challenge. The RFO was used to address the biases in the Kaggle data during successful processing. This approach served as a tool for preprocessing and feature selection by filtering noise and retaining only the most informative features, reducing the impact of data that is either overrepresented or underrepresented. The red fox fitness function ensures the most predictive and useful variables are included, minimizing dimensionality and boosting model performance. It ensures that the DRFBPS makes accurate and reliable predictions in a wide range of patient populations, enhancing its generalizability and clinical utility. This robust Framework accurately identifies individuals at risk of heart disease, potentially assisting in early diagnosis and intervention efforts. Additionally, to prove the generalizability, the developed model is validated with the Cleveland dataset, and the results are displayed in Table 6.

Table 6 DRFBPS performance.

Evaluations were performed on the Cleveland and the HARP datasets to validate the robustness of the proposed model. The results are uniformly high performance on both datasets, exhibiting the reliability of the model in the prediction of heart disease risk. The small differences in performance metrics illustrate the strength of the model. These findings provide evidence that the approach illustrates the model’s ability to perform well on diverse datasets.

  • The study proves that DRFBPS outperforms the prediction of heart disease risk by overcoming difficulties of inappropriate feature selection and overfitting.

  • Applying Red Fox Optimization, the model efficiently chooses applicable features, thereby improving predictive Precision.

  • The model is extensively evaluated using Accuracy, F-score, Precision, AUC, Recall, error rate, P value, and confidence intervals, depicting consistent and higher performance than existing approaches.

  • The findings verify that DRFBPS makes accurate and stable disease risk predictions with probable applications in early diagnosis, personal treatment planning, and enhanced patient outcomes in practical healthcare environments.

Implications: The DRFBPS can be integrated into hospital procedures by incorporating it in clinical decision support systems and electronic health records. The model can run based on real-time patient data like lab reports, history, and so on to aid healthcare providers in making diagnosis and treatment decisions. It can be interoperable with hospital information systems using secure APIs, facilitating working with the available infrastructure and fulfilling regulatory requirements such as HIPAA and GDPR. It can even be applied in predictive resource planning analysis, prioritization of the patient, and treatment plans based on the patient, and makes it more efficient.

The pipeline in Fig. 17 shows the real-time deployment architecture of the DRFBPS for disease prediction and healthcare monitoring. The workflow begins with patient data gathering, where raw health information is collected and assembled into reports. The collected dataset is fed into the DRFBPS model, where it is preprocessed to eliminate noise and select the feature to evaluate the risks associated with the disease. Additionally, it transfers patient health data to cloud storage for scalable and convenient access. Subsequently, Edge computing is introduced to improve efficiency and minimize latency by processing the data in real-time near the source of data. This promotes quicker decision-making and minimizes the reliance on centralized cloud servers. Finally, the information is implemented across various healthcare platforms.

Fig. 17
figure 17

Real-time deployment pipeline of DRFBPS.

Conclusion

In summary, the Proposed DRFBPS model for identifying heart disease risk factors that combine Red Fox Optimisation and deep belief neural network shows a reliable and effective method for managing IoT healthcare data. To ensure data integrity, the gathered dataset is first trained and preprocessed to remove noise. The novel DRFBPS approach uses the Red Fox fitness function to perform a thorough feature analysis, selecting the most relevant characteristics from the large dataset to improve prediction accuracy and lower computing complexity. The proposed DRFBPS accurately assesses and predicts the risk factor for heart disease using these features. The developed model performance is thoroughly examined, and the findings show that the DRFBPS model provides greater prediction performance by attaining a high accuracy of 98.6%, 97.7% F score, 97.4% precision, 98.2% AUC, 97.9% recall, and low error rate of 0.014. It demonstrates its potential as an essential early identification and risk assessment tool. Though the model displays high predictive performance in predicting heart disease risk, it has severe security issues. The model processes large-scale medical data, privacy, confidentiality, and potential breaches become severe issues, particularly when sensitive patient information is involved. However, security is crucial in big data healthcare systems to protect patients’ sensitive information. Hence, future work will focus on implementing robust security measures for handling big data. It includes federated learning to facilitate decentralized care among multiple healthcare institutions and keeps sensitive patient information localized while permitting collaborative learning to enhance the risk prediction of diseases. By keeping data local and preventing data movement between institutions, FL minimizes data breaches and unauthorized access. Besides that, homomorphic encryption will also be investigated in order to reinforce the protection of data.