3.1 Attributes description
A dataset comprising 611 entries in seven different attributes—Age, Gender, Glucose, Systolic Blood Pressure (Sys BP), Diastolic Blood Pressure (Dia BP), Body Mass Index (BMI), and Outcome—is summarized statistically in the table 3. The count, mean, standard deviation (Std), minimum (Min), and maximum (Max) numbers were employed to specify each property.For the age range of 13 to 90 years in this study, the standard deviation was 15.79 and the average age was 55.08 years. Gender was almost evenly distributed, with a mean of 0.54 suggesting a minor bias toward one gender. Blood glucose levels range from 1.38 to 32.86 had an average of 10.38 and a significant variance (std: 4.63). The average blood pressure was 130.39 (standard deviation: 16.64) and 82.64 (standard deviation: 12.95) mmHg. The BMI had a standard deviation of 3.61 and an average of 23.65. The outcome variable represents two alternative states (0 or 1) which was a binary indicator.
Table 3 Data set description
Attributes
|
Count
|
Mean
|
Std
|
Min
|
Max
|
Age
|
611
|
55.08
|
15.79
|
13
|
90
|
Gender
|
611
|
0.54
|
0.49
|
0
|
1
|
Glucose
|
611
|
10.38
|
4.63
|
1.38
|
32.86
|
Sys BP
|
611
|
130.39
|
16.64
|
30
|
180
|
Dia BP
|
611
|
82.64
|
12.95
|
50
|
130
|
BMI
|
611
|
23.65
|
3.61
|
14.88
|
37.71
|
Outcome
|
611
|
0.52
|
0.5
|
0
|
1
|
As shown in Fig. 4, the histogram demonstrates a normal distribution pattern for the age attribute within the designated range of values. The x-axis indicates the age values, while the y-axis represents the density of the age attribute. The analysis reveals that within the dataset, the minimum age recorded was 13 years, while the maximum age reached 90 years. Furthermore, the fitted distribution line indicates a mean value of 55.08 years, shedding light on the central tendency of the age distribution within the studied population.
3.2 Effect of factors on hypertension
The table.4 and table.5 present the results of a logistic regression analysis examin- ing the relationship between various variables and a specific outcome of interest. The variables under evaluation included age, gender (male), body mass index (BMI ≥ 25), systolic blood pressure (Sys BP ≥ 140), diastolic blood pressure (Dia BP ≥ 90), and glucose levels (diabetes ≥ 7.8mmol/L ). The adjusted odds ratios (AOR) and crude odds ratios (COR) for each component are provided, along with the matching p-values and 95% confidence intervals (CI). While the adjusted impact did not reach statistical significance (AOR 0.9680, p=0.063), it is noteworthy that age exhibited a signifi- cant COR (1.0350, p=0.000), indicating a rise in risk with each additional year. The adjusted effect (AOR 0.6197, p=0.321) did not show significance, despite males show- ing a notable COR (1.6239, p=0.003). Strong associations were observed with elevated glucose levels in both adjusted (AOR 6.6786, p=0.001) and unadjusted (COR 5.8999, p=0.000) models. A significant association between diabetes and hypertension was identified. The COR stood at 5.8999 (95% CI of COR: 4.0965, 8.4973), indicating that individuals with diabetes had a 5.8999-fold higher risk of hypertension compared to those without diabetes. Following adjustment for significant risk factors, Model II dis- played an AOR of 6.6786 (95% CI of AOR: 2.2475, 19.846; p-value: 0.001), signifying a 6.6786-fold higher risk of hypertension among individuals with diabetes compared to those without diabetes. Previous studies have also highlighted the substantial influ- ence of diabetes on hypertension prevalence[23]. A strong correlation exists between high systolic blood pressure (COR 333.19, p=0.000; AOR 255.16, p=0.000) and hyper- tension. Similarly, a strong correlation was evident with high diastolic blood pressure (AOR 1507.0, p=0.000; COR 1345.6, p=0.000). Moreover, a BMI ≥ 25 indicates a robust positive correlation in both adjusted (AOR 7.8157, p=0.000) and unadjusted (COR 4.2696, p=0.000) models. Individuals with a BMI ≥ 25 were 4.2696 times more likely to have hypertension compared to those with a normal BMI below 25, highlight- ing a significant relationship between hypertension and obesity or overweight (BMI ≥ 25). Other studies have also indicated that being overweight, defined as a Body Mass Index (BMI) exceeding 25, significantly influences hypertension prevalence[24]. These findings underscore the importance of blood pressure, BMI, and glucose levels as key predictors of the outcome, even after accounting for other variables.
Table 4 Effect of factors on hypertension (Crude OR)
|
Model 1
|
Factors
|
COR
|
P-value
|
95% CI of COR
|
|
|
|
Lower
|
Upper
|
Age
|
1.0350
|
0.000
|
1.0238
|
1.0464
|
Gender
(Male)
|
1.6239
|
0.003
|
1.1793
|
2.2359
|
Glucose
(Diabetic>7.8mmol/L)
|
5.8999
|
0.000
|
4.0965
|
8.4973
|
Sys BP>=140
|
333.19
|
0.000
|
130.58
|
850.19
|
Dia BP>=90
|
1345.6
|
0.000
|
185.03
|
9785.9
|
BMI>=25
|
4.2696
|
0.000
|
2.9998
|
6.0769
|
Table 5 Effect of different factors on hypertension (Adjusted OR)
|
Model 2
|
Factors
|
AOR
|
P-value
|
95% CI of AOR
|
|
|
|
Lower
|
Upper
|
Age
|
0.9680
|
0.063
|
0.9354
|
1.0017
|
Gender
(Male)
|
0.6197
|
0.321
|
0.2409
|
1.5941
|
Glucose
(Diabetic>7.8mmol/L)
|
6.6786
|
0.001
|
2.2475
|
19.846
|
Sys BP>=140
|
255.16
|
0.000
|
66.299
|
982.06
|
Dia BP>=90
|
1507.0
|
0.000
|
138.18
|
16435
|
BMI>=25
|
7.8157
|
0.000
|
2.8636
|
21.331
|
3.3 Training: Test ratio based comparison
3.3.1 60% Training 40% Testing Dataset
The evaluation table 6 assesses the efficacy of various classification algorithms based on metrics such as Accuracy, Precision, Recall, and F1 Score, with and without the integration of blood pressure (BP) as a predictor where train:test ratio was 60:40. The presence of BP led to a substantial improvement in the algorithms’ performance across all measured metrics. For example, the accuracy of the Logistic Regression (LR) algorithm increased from 0.6694 without BP to 0.9673 with BP. Similarly, the Precision of the Random Forest (RF) algorithm rose from 0.7164 to 0.9764 when BP was included, and the Recall of the Support Vector Machine (SVM) algorithm escalated from 0.8189 to 0.9685 with the incorporation of BP. These results demon- strate that utilizing BP data enhanced the predictive accuracy, precision, and recall of the algorithms. Specifically, when BP was taken into account, the Support Vec- tor Machine (SVM) algorithm achieved the highest precision (0.9755), while Logistic Regression (LR) and Random Forest (RF) algorithms also displayed notable perfor- mance improvements. In the absence of BP, the AdaBoost model excelled in precision (0.7429), and SVM achieved the highest recall (0.8189). These outcomes underscore the significance of including BP as a predictor to enhance the predictive capabilities of the algorithms.
Table 6 Test 40%, Train 60% (with BP and without BP)
Model Name
|
Accuracy
|
With BP
Precision
|
Recall
|
F1 Score
|
Accuracy
|
Without BP
Precision
|
Recall
|
F1 Score
|
LR
|
0.9673
|
0.9837
|
0.9528
|
0.968
|
0.6694
|
0.6742
|
0.7008
|
0.6873
|
NB
|
0.9469
|
0.9523
|
0.9449
|
0.9486
|
0.6489
|
0.6847
|
0.5984
|
0.6387
|
SVM
|
0.9755
|
0.984
|
0.9685
|
0.9762
|
0.702
|
0.6753
|
0.8189
|
0.7402
|
KNN
|
0.9592
|
0.9606
|
0.9606
|
0.9606
|
0.7143
|
0.705
|
0.7717
|
0.7368
|
DT
|
0.9592
|
0.9756
|
0.9449
|
0.96
|
0.6571
|
0.6617
|
0.6929
|
0.6769
|
RF
|
0.9755
|
0.9764
|
0.9764
|
0.9764
|
0.7184
|
0.7164
|
0.7559
|
0.7356
|
Bagging
|
0.9633
|
0.9758
|
0.9528
|
0.9641
|
0.6857
|
0.6984
|
0.6929
|
0.6957
|
AdaBoost
|
0.9641
|
0.9758
|
0.9528
|
0.9641
|
0.7429
|
0.75
|
0.7559
|
0.7529
|
GB
|
0.9633
|
0.9758
|
0.9528
|
0.9641
|
0.7184
|
0.7197
|
0.748
|
0.7336
|
ET
|
0.9306
|
0.9741
|
0.8898
|
0.93
|
0.6
|
0.6074
|
0.6457
|
0.6259
|
3.3.2 70% Training 30% Testing Dataset
Table 7 illustrates a comparative assessment of ten different machine learning algo- rithms, elucidating their performance metrics such as Accuracy, Precision, and Recall, both with and without the inclusion of the blood pressure (BP) attribute where train: test ratio was 70:30. AdaBoost showcased the highest accuracy (98.37%) and preci- sion (100%) when utilizing the BP feature, while Random Forest (RF) achieved the highest recall rate (97.89%). Conversely, Extra Trees (ET) demonstrated the lowest accuracy (89.67%) and precision (87.25%), with Decision Tree (DT) and ET sharing the minimum recall rate (93.68%). In the absence of the BP attribute, AdaBoost con- tinued to perform well with the highest accuracy (73.37%) and precision (73.96%), while Support Vector Machine (SVM) obtained the highest recall rate (77.89%). Naive Bayes (NB) recorded the lowest accuracy (63.04%) and recall rate (58.95%), whereas Logistic Regression (LR) exhibited the lowest precision (64.58%). Clearly, the incor- poration of the BP attribute significantly enhanced the model performance across all metrics, positioning AdaBoost as the leading algorithm in both scenarios, followed by Random Forest (RF) and Gradient Boosting (GB) respectively. Removing the BP attribute resulted in a noticeable decline in accuracy, precision, and recall for all models, emphasizing the critical role of BP in predictive modelling.
Table 7 Test 30%, Train 70% (with BP and without BP)
Model Name
|
Accuracy
|
With BP
Precision
|
Recall
|
F1 Score
|
Accuracy
|
Without BP
Precision
|
Recall
|
F1 Score
|
LR
|
0.9619
|
0.9783
|
0.9474
|
0.9626
|
0.6359
|
0.6458
|
0.6526
|
0.6492
|
NB
|
0.9457
|
0.9474
|
0.9474
|
0.9474
|
0.6304
|
0.6588
|
0.5895
|
0.6222
|
SVM
|
0.9674
|
0.9785
|
0.9579
|
0.9681
|
0.663
|
0.6435
|
0.7789
|
0.7048
|
KNN
|
0.9511
|
0.9479
|
0.9579
|
0.9529
|
0.7011
|
0.6961
|
0.7474
|
0.7208
|
DT
|
0.9565
|
0.978
|
0.9368
|
0.9569
|
0.663
|
0.6701
|
0.6842
|
0.6771
|
RF
|
0.9728
|
0.9688
|
0.9789
|
0.9738
|
0.7011
|
0.7041
|
0.7263
|
0.715
|
Bagging
|
0.9619
|
0.9681
|
0.9579
|
0.9629
|
0.6957
|
0.7053
|
0.7053
|
0.7053
|
AdaBoost
|
0.9837
|
1
|
0.9684
|
0.9839
|
0.7337
|
0.7396
|
0.7474
|
0.7435
|
GB
|
0.9674
|
0.9684
|
0.9684
|
0.9684
|
0.7283
|
0.7272
|
0.7579
|
0.7423
|
ET
|
0.8967
|
0.8725
|
0.9368
|
0.9036
|
0.6793
|
0.6875
|
0.6947
|
0.6912
|
3.3.3 80% Training 20% Testing Dataset
The comparison presented in Table 8 illustrates the performance contrast of various machine learning algorithms with and without BP under an 80:20 train-test ratio. Evaluation metrics such as Accuracy, Precision, and Recall were utilized in the assess- ment. When models were compared with and without BP, those incorporating BP demonstrated significantly superior performance across all metrics. For instance, the Logistic Regression (LR) model achieved an accuracy of 0.9675 with BP, whereas it only reached 0.6748 without BP. Similarly, the Support Vector Machine (SVM) achieved perfect precision of 1.000 with BP, which decreased to 0.6585 without BP. This consistent trend was observed across all models, highlighting the critical role of BP in enhancing model efficacy. Notably, in the presence of BP, the Support Vector Machine (SVM) emerged as the model with the highest Accuracy (0.9756) among all models, while the Extra Trees (ET) model exhibited the lowest Accuracy (0.9268). Conversely, in the absence of BP, the AdaBoost model recorded the highest Accuracy (0.7886), whereas the Logistic Regression (LR) model displayed the lowest Accuracy (0.6748).
3.4 F1 Score based comparison
The F1 score is widely regarded as the most effective metric for evaluating accuracy due to its incorporation of both false positives and false negatives. While accuracy may have its merits in certain scenarios, particularly when the repercussions of false positives and false negatives vary significantly, the F1 score is generally deemed more appropriate.
The graph depicted in Fig. 5 effectively showcases the models that have achieved the highest F1 scores, such as RF (0.9764) and SVM (0.9762), following an assessment
Table 8 Train 80% , test 20% (with BP and without BP)
Model
Name
|
Accuracy
|
With BP
Precision
|
Recall
|
F1 Score
|
Accuracy
|
Without BP
Precision
|
Recall
|
F1 Score
|
LR
|
0.9675
|
0.9839
|
0.9531
|
0.9683
|
0.6748
|
0.6667
|
0.75
|
0.7059
|
NB
|
0.9431
|
0.9524
|
0.9375
|
0.9449
|
0.6585
|
0.6774
|
0.6563
|
0.6667
|
SVM
|
0.9756
|
1
|
0.9531
|
0.976
|
0.6912
|
0.6585
|
0.8438
|
0.7397
|
KNN
|
0.9349
|
0.9242
|
0.9531
|
0.9385
|
0.7561
|
0.7429
|
0.8125
|
0.7761
|
DT
|
0.9431
|
0.9523
|
0.9375
|
0.9449
|
0.6748
|
0.6579
|
0.7813
|
0.7143
|
RF
|
0.9675
|
0.9545
|
0.9844
|
0.9692
|
0.7317
|
0.7183
|
0.7969
|
0.7556
|
Bagging
|
0.9593
|
0.9594
|
0.9688
|
0.9612
|
0.7073
|
0.7
|
0.7656
|
0.7313
|
AdaBoost
|
0.9756
|
0.9841
|
0.9688
|
0.9764
|
0.7886
|
0.7714
|
0.8438
|
0.8059
|
GB
|
0.9675
|
0.9545
|
0.9844
|
0.9692
|
0.7724
|
0.7647
|
0.8125
|
0.7879
|
ET
|
0.9268
|
0.9231
|
0.9375
|
0.9302
|
0.6585
|
0.6964
|
0.6094
|
0.65
|
procedure that employed a partitioning technique. This method involved allocating 40% of the dataset for testing purposes, while the remaining 60% was utilized for training. It is evident that these models exhibited optimal performance when consid- ering BP attributes. Excluding blood pressure attributes results in AdaBoost (0.7529) and SVM (0.7402) displaying the weakest performance among the models. The drop in their performance was noteworthy when compared to models that include blood pressure attributes. Eliminating BP features leads to a notable decrease in the F1 score, with the most substantial decline (from 0.968 to 0.6873) observed in the Logis- tic Regression model. This observation indicates the pivotal role of BP attributes in the prediction of hypertension. The effectiveness of the hypertension prediction model was heightened when BP measurements were incorporated. The impressive F1 scores of the model ”With BP” emphasize the crucial significance of BP data in ensuring accurate predictions. Conversely, the reduced F1 scores of the model ”Without BP” underscore the limitations associated with predictions made in the absence of this essential information.
Fig. 6 illustrates the F1 score achieved by ten different machine learning mod- els in the context of predicting hypertension within the selected region where the train: test ratio was set at 70:30. Similar to Fig. 5, the scenarios encompass both the presence and absence of blood pressure (BP) attributes. AdaBoost consistently out- performed other models in both scenarios, whether BP characteristics were present or not. In cases where BP variables were included, AdaBoost attained the highest F1 score of 0.9839, showcasing its adeptness in utilizing this information for hyperten- sion prediction. Remarkably, AdaBoost maintained a respectable F1 score of 0.7435 even in the absence of BP attributes, underscoring its robustness and capacity to effectively leverage other significant features. The collective performance of all models demonstrated improvement when BP attributes were part of the analysis, emphasiz- ing the crucial role of these attributes in hypertension prediction. Notably, models like AdaBoost, Gradient Boosting (GB), and Support Vector Machine (SVM) exhibited enhanced performance when BP attributes were considered. Conversely, Extra Trees (ET) experienced a significant performance decline when BP attributes were excluded.
Fig. 7 depicts the F1 score (with and without BP) during the training of 80% and testing of 20%. Within this visual representation, the Support Vector Machine (SVM) and AdaBoost techniques illustrated the most superior F1 scores, reaching close to 97.6%. In contrast, the Extra Trees (ET) approach with BP resulted in the lowest F1 scores, approximately at 93.02%. Furthermore, in the absence of BP, the ET method displayed the minimal F1 score at around 65%, while AdaBoost once again demonstrated the highest F1 score at approximately 80.59%.
3.5 Evaluation of prediction
Table 9 Predict result
Sl. No.
|
Age
|
Gender*
|
Glucose
|
Attributes
Sys BP
|
Dia BP
|
BMI
|
Outcome**
|
Accurate
|
1
|
70
|
0
|
14.75
|
140
|
90
|
21.86
|
1
|
Yes
|
2
|
64
|
1
|
26.7
|
150
|
100
|
25.7
|
1
|
Yes
|
3
|
38
|
0
|
6.88
|
120
|
70
|
22.73
|
0
|
Yes
|
4
|
45
|
1
|
12.5
|
120
|
80
|
23.8
|
0
|
Yes
|
5
|
44
|
1
|
9.9
|
150
|
100
|
26.65
|
1
|
Yes
|
6
|
41
|
1
|
7.2
|
-
|
-
|
25.23
|
1
|
Yes
|
7
|
55
|
0
|
7.9
|
-
|
-
|
28.43
|
0
|
No
|
8
|
73
|
0
|
5.6
|
-
|
-
|
19.83
|
0
|
Yes
|
9
|
66
|
1
|
9.9
|
-
|
-
|
27
|
1
|
Yes
|
10
|
60
|
1
|
11
|
-
|
-
|
26.65
|
1
|
Yes
|
Gender*: 0 = female,1 = male. Outcome**: 0 =non-hypertensive,1 = hypertensive
Upon evaluation of all ten models using various train-test ratios and taking into account the presence or absence of Blood Pressure (BP), the AdaBoost model emerged as the most superior predictor in the current investigation. Subsequent to the identi- fication of the optimal model, a set of ten manually inputted attributes was utilized for the purpose of predicting hypertension. The predictive performance of Adaboost is detailed in Table 9.
When predicting without the inclusion of BP feature, 80% of the dataset was assigned to the training subset, while the remaining 20% was designated for testing. Conversely, in cases where BP was factored into the prediction, a train-test ratio of 70:30 was implemented. Within this phase of the research, variables such as age, gender, glucose levels, systolic blood pressure (Sys BP), diastolic blood pressure (Dia BP), and body mass index (BMI) were taken into consideration for each individual. The initial five parameters were included in predictions involving BP, whereas the latter five parameters excluded BP from the analysis. Notably, all entries comprising BP data demonstrated accurate prognostications. In contrast, the five entries that did not incorporate BP yielded an accuracy rate of 80%.
The initial record in the table pertained to a 70-year-old male individual (Gender = 0), where parameters such as a glucose concentration of 14.75 mmol/L, systolic BP of 140, diastolic BP of 90, and a BMI of 21.86 were taken into account. The corresponding result was denoted by 1, signifying the prediction of hypertension, which was indeed precise (”Yes”). In contrast, the seventh record in this tabular presentation involved a 55-year-old male individual (Gender = 0), with a glucose concentration of 7.9 mmol/L, absence of BP data, and a BMI value of 28.43. In this instance, the outcome indicated 0, suggesting the absence of hypertension. Nevertheless, this particular prognosis proved to be inaccurate (”No”). This investigation highlights that forecasts related to hypertension were more prone to inaccuracies in scenarios where blood pressure readings were omitted, as opposed to cases where such data was integrated into the predictive models.