July 16, 2026
Black-box models limit the adoption of artificial intelligence in medicine due to their lack of interpretability and reproducibility. We introduce a statistically grounded framework that provides fully interpretable, rule-based clinical classification using the Bernoulli Naïve Bayes (BNB) model. The method applies supervised \(\chi^2\)-guided statistical binarization to continuous variables, identifying thresholds that maximize association with clinical outcomes within the training data. This transformation allows BNB to operate effectively on continuous medical data without sacrificing its inherent transparency. The approach was evaluated on three benchmark datasets, Pima Indians Diabetes, Wisconsin Breast Cancer, and Heart Failure Prediction, achieving area-under-the-curve (AUC) scores of 0.800 for the Pima analysis, 0.984 for Wisconsin Breast Cancer, and 0.919 for Heart Failure Prediction. In addition to discrimination, probabilistic reliability was assessed using leakage-safe cross-validated calibration analysis including Brier score, calibration intercept/slope, and post-hoc beta calibration, which improved probability calibration across datasets. These results suggest that a statistically interpretable framework can achieve performance comparable to more complex models while providing explicit, clinically meaningful decision rules and calibrated risk estimates. To illustrate this transparency concretely, a complete worked example demonstrates that model inference can be reproduced using only a reference table and basic arithmetic, without access to software or proprietary tools. This work offers a practical approach to supporting trustworthy and generalizable AI in real-world healthcare settings.
Keywords: Explainable AI; Bernoulli Naïve Bayes; Feature Binarization; Chi-Square Thresholding; Interpretable Machine Learning; Medical Classification; Threshold Optimization
Supervised classification is a fundamental task in medical data analysis. Its objective is the assignment of patients to clinically meaningful classes on the basis of their observed characteristics [1]. In practice, information such as demographics, medical history, and clinical measurements is combined to determine whether a patient has a condition or is at risk of developing one [2].
These predictions are not merely technical outputs, because diagnosis, treatment planning, and patient outcomes can be directly influenced by them [3]. Several practical challenges are also presented by medical datasets: both continuous and categorical variables are often included, missing values may be present, and skewed class distributions are common [4], [5]. For a classification model to be useful in clinical settings, these characteristics must be handled while maintaining sufficient interpretability for the resulting decisions to be trusted and understood by clinicians [6].
Artificial intelligence has demonstrated remarkable potential for improving diagnostic accuracy across a wide range of clinical applications [7]–[9]. However, many high-performing models, especially deep learning algorithms, are considered black boxes and may generalize poorly to diverse patient populations [10]. This lack of transparency can limit clinician trust and complicate regulatory adoption [11], [12], making interpretable probabilistic models attractive for medical decision support.
Among supervised learning approaches, probabilistic classifiers are considered an important family because predictions are based on estimated probability distributions over class labels. This perspective is especially useful in clinical settings, where uncertainty is common. A notable example is the Bayesian network, in which conditional dependencies among features are represented and data analysis and decision-making under uncertainty are supported [13]. Within this broader family, conditional independence among features is assumed by the Naïve Bayes model, resulting in models that are easy to interpret and that often perform well even when the independence assumption is not always satisfied [14].
Several likelihood variants adapted to different types of data are included in the Naïve Bayes family: Bernoulli for binary features, Gaussian for continuous, normally distributed features, Multinomial for count-based data, and Categorical for discrete categorical features. High effectiveness has been reported for Bernoulli models in text classification tasks where the presence or absence of words is indicated by features [15]–[17], while Gaussian and Multinomial variants are generally preferred for continuous and frequency-based inputs, respectively [18], [19]. Categorical models handle discrete features directly without any assumption of ordering or distance between categories, making them well-adapted to tabular data with nominal features.
Despite its simplicity and interpretability, limited application in medical data analysis has been seen for the Bernoulli variant because of its reliance on binary features. Continuous variables, such as age, blood pressure, and glucose levels, are often contained in medical datasets and cannot be directly used with Bernoulli models without preprocessing. As a result, the use of Bernoulli Naïve Bayes models in clinical settings has been restricted, despite the high value placed on interpretability, as preprocessing steps can introduce unnecessary complexity and introduce potential bias.
This limitation is addressed in the present work through the introduction of a statistical binarization method based on chi-square (\(\chi^2\)) independence tests. Continuous features are transformed by the proposed method into binary indicators through the selection of thresholds at which the association with the outcome is least likely to occur by chance under the independence assumption.
During method development, several thresholding criteria were evaluated, including mutual information, information gain, Gini gain, ROC-based criteria, Otsu thresholding, and distribution-based cut points. Among these alternatives, the \(\chi^2\) criterion was found to deliver the most consistent performance across the studied datasets while remaining closely aligned with the independence-testing rationale of the Bernoulli model. Threshold optimization was performed exclusively within the training folds, and final performance was evaluated only on held-out data to avoid information leakage and to obtain an unbiased estimate of generalization.
By this strategy, Bernoulli models can be applied effectively to continuous medical data while their interpretability is preserved. The main contributions of this paper are: (1) a clear formulation of the challenges involved in applying Bernoulli models to medical datasets with continuous features; (2) a \(\chi^2\)-based binarization approach for determining feature thresholds; (3) an empirical evaluation of the proposed method on three diverse and clinically relevant datasets; (4) binary features that correspond to explicit decision boundaries, thereby supporting transparent interpretation in clinical settings; and (5) a complete patient-level worked example demonstrating that the full classification pathway, from raw feature values to posterior probability, can be reproduced by a clinician using a printed reference table and a calculator, without requiring software access.
Alignment is also shown between this emphasis on transparent threshold-based rules and recent international frameworks, including the EU Artificial Intelligence Act and the WHO Ethics and Governance of Artificial Intelligence for Health guidance, in which explainability, fairness, and reproducibility are identified as key requirements for trustworthy clinical AI [20]. By embedding interpretability at the feature-engineering stage instead of relying only on post-hoc explanations, more trustworthy deployment within diverse clinical settings is intended to be supported by the proposed approach.
The remainder of this paper is organized as follows. Section 2 reviews prior work on Naïve Bayes models, supervised binarization, and interpretable clinical prediction. Section 3 describes the datasets, preprocessing procedures, Bernoulli and Categorical Naïve Bayes models, the proposed \(\chi^2\)-based threshold-selection method, alternative thresholding strategies, and the evaluation protocol. Section 4 presents the comparative results, calibration analysis, and explainability analyses for the three medical datasets. Section 5 discusses the main implications and limitations of the study. Section 6 concludes the paper and outlines directions for future work. Data and code availability statements are provided after the main text.
Naïve Bayes classifiers are one of the fundamental techniques of machine learning, often praised for their simplicity, efficiency, and interpretability [14], [21]. Although Naïve Bayes assumes conditional independence between features, it has consistently achieved good performance in medical classification tasks, especially when paired with effective feature transformations.
In the medical field, Bernoulli Naïve Bayes has proven to be effective for tasks involving binary or thresholded features. BNB has demonstrated competitive performance in clinical classification tasks when preprocessing is appropriately designed. [22]–[27]. Naïve Bayes has been successfully applied to predict lung cancer [24], detect cardiovascular diseases [25], and autism screening [26], showing their relevance in real-world medical contexts where interpretability matters.
One of the main challenges in using BNB for clinical data lies in handling continuous biomarkers, such as glucose levels, cholesterol, etc. Since BNB requires binary inputs, these continuous values must be converted into meaningful binarized features. In contrast, supervised methods use the target variable to identify thresholds that maximize predictive power. Unlike multi-interval discretization methods, the proposed approach focuses on identifying a single outcome-guided cutoff per feature, aligning with the binary structure required by Bernoulli Naïve Bayes [28]–[31]. This study demonstrates that statistically guided binarization provides a clear pathway for translating continuous clinical measurements into interpretable decision rules. Prior work suggests that supervised discretization can enhance predictive discrimination while preserving model interpretability [32]–[35].
Recent advances have further applied feature binarization to high-dimensional and domain-specific medical data sets. Optimized thresholding, for instance, has been shown to improve cardiovascular risk models [36], while statistical binarization methods have been shown to work well on gene expression data [37]. Hybrid methods combining discretization with evolutionary algorithms [38] or ensemble learning [39] have also reported success on biomedical domains. Such techniques demonstrate the potential of well-designed binarization techniques to transform raw clinical data into actionable interpretations without a loss of interpretability.
From a clinical modeling perspective, threshold-based transformations yield clear, rule-like representations that can be readily interpreted and audited. Compared with black-box models, statistical binarization in BNB results in understandable, rule-based outputs that can be justified and interpreted by clinicians themselves. A feature like this adheres to the traditional goals of interpretable machine learning, which emphasize simplicity, accountability, and dependability in clinical decision settings [40], [41]. Existing explainability approaches [42]–[44] have traditionally described the trade-off between predictivity and interpretability, and identified inherently interpretable models as the most preferable for clinical application. Building on this, the combination of \(\chi^2\)-based statistical binarization with BNB has been proposed in this study as a statistically sound and inherently interpretable solution.
This study presents a method for binarizing continuous features, making it possible to use the Bernoulli Naïve Bayes classifier with datasets that include continuous values. The approach is based on statistical hypothesis testing: for each feature, multiple thresholds are assessed using \(\chi^2\) tests of independence to measure the association between the binarized feature and the target variable. The threshold with the lowest p-value from the \(\chi^2\) test is chosen, as it marks the point where the observed relationship is least consistent with independence.
It should be noted that the p-value in this context does not indicate the probability that a feature is predictive nor the strength of the association. Instead, it measures how much the observed distribution differs from what would be expected if the feature and target variable were independent, and is used as a practical guide for selecting thresholds in supervised learning.
To evaluate the performance of the chi-square-based binarization method, other thresholding strategies were also implemented and compared, including mutual information, information gain, Gini gain, ROC-based criteria, Otsu thresholding, and distribution-based cut points.
The classification performance of the proposed method was compared with several reference models from the literature across three publicly available clinical datasets. Dataset characteristics and dataset-specific preprocessing protocols are detailed in Section 3.2.
Experiments were conducted on three publicly available medical datasets with binary targets: the Pima Indians Diabetes Dataset (PIDD), the Wisconsin Breast Cancer Dataset, and the Heart Failure Prediction Dataset. These datasets are widely used benchmarks in clinical machine learning and were selected to cover settings with continuous features, mixed feature types, and missing-value challenges.
Pima Indians Diabetes Dataset (PIDD): contains 768 records with 8 clinical predictors and a binary diabetes outcome [45].
Wisconsin Breast Cancer Dataset: contains 569 records with 30 predictors derived from digitized fine-needle aspirate images and a binary benign/malignant label [46].
Heart Failure Prediction Dataset: contains 918 records with 11 predictors, including both numerical and categorical clinical variables, and a binary heart-disease outcome [47].
Summary statistics and class distributions for the three datasets are reported in Tables ¿tbl:tab:diabetes95risk95factors?, ¿tbl:tab:breast95cancer?, and ¿tbl:tab:heart95dataset?.
For PIDD, zeros in Glucose, Blood Pressure, Skin Thickness, Insulin, and BMI were treated as missing values following prior studies. Two evaluation settings were considered for BNB: (i) mean-imputation preprocessing for direct comparability with published baselines, and (ii) a missing-aware BNB likelihood that excludes missing features from the product term at prediction time. This second setting preserves incomplete records and was tested specifically for this dataset.
For the Heart Failure dataset, which contains both numerical and categorical predictors, Categorical Naïve Bayes (CNB) was used for the categorical predictors using the encoding described in Table ¿tbl:tab:heart95dataset95encoding95summary?, while continuous predictors were evaluated in the BNB thresholding framework. As will be shown in the next section, CNB and BNB are mathematically equivalent for binary features, so the same \(\chi^2\)-based thresholding method can be applied to the continuous features, while categorical features are retained in their original form for CNB evaluation.
max width=
The BNB classifier is a probabilistic model specifically designed for feature vectors with binary values. It belongs to the broader family of Naïve Bayes classifiers, which rely on the assumption of conditional independence among features given the class label. Unlike Gaussian Naïve Bayes, which models continuous features using normal distributions, BNB models each binary feature using a Bernoulli distribution.
max width=
max width=
Let \(\mathbf{x} = (x_1, x_2, \dots, x_n) \in \{0,1\}^n\) denote a binary feature vector, and let \(\{C_1, \dots, C_K\}\) represent the set of possible class labels. For each feature \(x_i\), the class-conditional likelihood under class \(C_k\) is modeled as:
\[\mathbb{P}(x_i \mid C_k) = p_{k,i}^{x_i} (1 - p_{k,i})^{1 - x_i},\]
where \(p_{k,i} = \mathbb{P}(x_i = 1 \mid C_k)\) denotes the probability that feature \(x_i\) is active (equals 1) given class \(C_k\).
Assuming feature independence, the joint likelihood of the full feature vector \(\mathbf{x}\) conditioned on class \(C_k\) becomes:
\[\mathbb{P}(\mathbf{x} \mid C_k) = \prod_{i=1}^{n} p_{k,i}^{x_i} (1 - p_{k,i})^{1 - x_i}.\]
The posterior probability \(\mathbb{P}(C_k \mid \mathbf{x})\) of class \(C_k\) given the observed feature vector \(\mathbf{x}\) is obtained via Bayes’ theorem. The predicted class label \(\hat{y}\) is the one that maximizes this posterior:
\[\hat{y} = \arg\max_{k \in \{1, \dots, K\}} \mathbb{P}(C_k) \prod_{i=1}^{n} p_{k,i}^{x_i} (1 - p_{k,i})^{1 - x_i}.\]
Since BNB requires all features to be binary, applying it to continuous-valued datasets requires a binarization step. The method used for this transformation is detailed in the following subsection.
In this study, a modified version of the BNB model was employed in the Pima Indians Diabetes Dataset, which contains missing values in several features. To address this, the likelihood computation was adjusted to exclude missing values from the product term. Let \(\mathcal{I}_{\text{obs}} \subseteq \{1, \dots, n\}\) denote the indices of the observed (non-missing) features for a given instance. The modified likelihood is then computed as:
\[\mathbb{P}(\mathbf{x}_{\text{obs}} \mid C_k) = \prod_{i \in \mathcal{I}_{\text{obs}}} p_{k,i}^{x_i} (1 - p_{k,i})^{1 - x_i}.\]
This adjustment effectively marginalizes over the missing components, preventing them from influencing the posterior estimation and thereby maintaining the integrity of the prediction. The results of this evaluation can be seen in Table [tab:diabetes95statistical95comparison].
The Categorical Naïve Bayes classifier is another variant of the Naïve Bayes family, designed for discrete-valued features with more than two categories. While BNB is limited to binary features, CNB extends the likelihood model to handle features with multiple discrete values.
Let \(\mathbf{x} = (x_1, x_2, \dots, x_n)\) be a feature vector where each feature \(x_i \in \{v_1^{(i)}, v_2^{(i)}, \dots, v_{r_i}^{(i)}\}\) takes values from a finite set of \(r_i\) discrete categories. Given a set of classes \(\{C_1, \dots, C_K\}\), the likelihood of a specific categorical value \(x_i = v_j^{(i)}\) under class \(C_k\) is defined as:
\[\mathbb{P}(x_i = v_j^{(i)} \mid C_k) = \theta_{k,ij},\]
where \(\theta_{k,ij}\) denotes the class-conditional probability of observing value \(v_j^{(i)}\) for feature \(x_i\) in class \(C_k\), and satisfies the constraint:
\[\sum_{j=1}^{r_i} \theta_{k,ij} = 1 \quad \text{for all } i \text{ and } k.\]
Assuming conditional independence of features given the class label, the joint likelihood of the feature vector \(\mathbf{x}\) is:
\[\mathbb{P}(\mathbf{x} \mid C_k) = \prod_{i=1}^{n} \theta_{k,ij} \quad \text{where } x_i = v_j^{(i)}.\]
The posterior probability \(\mathbb{P}(C_k \mid \mathbf{x})\) is proportional to the product of the prior and the likelihood, as computed below:
\[\mathbb{P}(C_k \mid \mathbf{x}) \propto \mathbb{P}(C_k) \prod_{i=1}^{n} \theta_{k,ij}.\]
The predicted class label \(\hat{y}\) is determined by:
\[\hat{y} = \arg\max_{k \in \{1, \dots, K\}} \mathbb{P}(C_k) \prod_{i=1}^{n} \theta_{k,ij}.\]
If CNB is applied to binary features, it yields results equivalent to those of the BNB classifier, as both models reduce to the same probabilistic formulation under such conditions. This model was used to evaluate the Heart Failure Prediction Dataset, where categorical features were retained in their original form. Table ¿tbl:tab:heart95dataset95encoding95summary? summarizes the encoding scheme applied to categorical features prior to CNB evaluation.
Assume that each feature is binary, \(x_i \in \{0, 1\}\), with the two possible values defined as \(v_1^{(i)} = 1\) (“active”) and \(v_2^{(i)} = 0\) (“inactive”). For Categorical Naïve Bayes the class-conditional likelihood of a feature vector \(\mathbf{x}\) under class \(C_k\) is
\[\mathbb{P}(\mathbf{x}\mid C_k) =\prod_{i=1}^{n}\theta_{k,i1}^{\,\mathbf{I}[x_i=1]}\, \theta_{k,i2}^{\,\mathbf{I}[x_i=0]},\]
where the parameters satisfy \(\theta_{k,i1} + \theta_{k,i2} = 1\). Setting
\[p_{k,i} \;=\; \theta_{k,i1}, \qquad 1-p_{k,i} \;=\; \theta_{k,i2},\]
and noting that \(\mathbf{I}[x_i=1] = x_i\) and \(\mathbf{I}[x_i=0] = 1 - x_i\), the likelihood becomes
\[\mathbb{P}(\mathbf{x}\mid C_k) =\prod_{i=1}^{n} p_{k,i}^{\,x_i}\, (1-p_{k,i})^{\,1-x_i},\]
which is precisely the Bernoulli Naïve Bayes formulation. Because both models share the same class priors and employ an identical maximum-a-posteriori decision rule, they yield the same posterior probabilities and therefore identical predictions.
This result justifies treating Categorical NB as a seamless extension of Bernoulli NB to datasets that contain multi-level categorical variables while preserving interpretability for binary features.
Consider a dataset represented as:
\[\mathcal{D} = (x, y)\]
where \(x\) is a matrix of continuous features, and \(y\) is a binary target vector. The feature matrix is defined as:
\[x = \begin{bmatrix} x_{1,1} & x_{1,2} & \dots & x_{1,m} \\ x_{2,1} & x_{2,2} & \dots & x_{2,m} \\ \vdots & \vdots & \ddots & \vdots \\ x_{n,1} & x_{n,2} & \dots & x_{n,m} \end{bmatrix} \in \mathbb{R}^{n \times m}\]
where \(n\) is the number of samples and \(m\) the number of features. The corresponding binary target vector is given by:
\[y = [y_1, y_2, \dots, y_n], \quad y_i \in \{0,1\}\]
Each feature \(x_j \in \mathbb{R}^n\) is processed independently to identify its optimal binarization threshold.
To ensure meaningful comparisons, each feature vector \(x_j\) is first filtered to remove duplicate values. The resulting set of unique values defines the set of threshold candidates:
\[T_j = \{ x_{i,j} \mid i \in \{1, 2, \dots, n\} \}\]
For every threshold candidate \(t \in T_j\), a binarized vector \(x_{t,j} \in \{0,1\}^n\) is computed as:
\[x_{i,j}^{t} = \begin{cases} 1, & x_{i,j} \geq t \\ 0, & x_{i,j} < t \end{cases} \quad \forall i \in \{1, \dots, n\}\]
The relationship between the binarized feature vector \(x_{t,j}\) and the binary target \(y\) is assessed via a chi-square test of independence. A contingency table is constructed for each threshold \(t\):
\[C = \begin{bmatrix} n_{00} & n_{01} \\ n_{10} & n_{11} \end{bmatrix}\]
\(n_{00}\): number of samples with \(x_{t,j} = 0\) and \(y = 0\)
\(n_{01}\): number of samples with \(x_{t,j} = 0\) and \(y = 1\)
\(n_{10}\): number of samples with \(x_{t,j} = 1\) and \(y = 0\)
\(n_{11}\): number of samples with \(x_{t,j} = 1\) and \(y = 1\)
The chi-square statistic is computed as:
\[\chi^2 = \sum_{i=1}^2 \sum_{j=1}^2 \frac{(O_{ij} - E_{ij})^2}{E_{ij}}\]
where \(O_{ij}\) are the observed counts and \(E_{ij}\) the expected counts under the null hypothesis of independence (\(H_0\)). For a \(2 \times 2\) table, the degrees of freedom are:
\[df = (2 - 1)(2 - 1) = 1\]
The p-value for threshold \(t\), denoted \(p_t\), is then computed as:
\[p_t = \mathbb{P}(\chi^2 \geq \chi^2_{\text{obs}} \mid H_0) = 1 - F_{\chi^2}(\chi^2_{\text{obs}}, 1)\]
where \(F_{\chi^2}\) denotes the cumulative distribution function of the chi-square distribution with 1 degree of freedom, and \(\chi^2_{\text{obs}}\) is the observed value of the chi-square statistic calculated from the contingency table for threshold \(t\).
The optimal threshold is selected as the one that minimizes the p-value:
\[t_j^* = \arg\min_{t \in T_j} p_t\]
Using this optimal threshold, the final binarized feature vector is computed as:
\[x_{i,j}^{t_j^*} = \begin{cases} 1, & x_{i,j} \geq t_j^* \\ 0, & x_{i,j} < t_j^* \end{cases}\]
The process is repeated for each feature \(j = 1, \dots, m\), yielding an optimal threshold \(t_j^*\) and a corresponding binary feature vector. The final binarized feature matrix is:
\[x^* = \begin{bmatrix} x_{1,1}^{t_1^*} & x_{1,2}^{t_2^*} & \dots & x_{1,m}^{t_m^*} \\ x_{2,1}^{t_1^*} & x_{2,2}^{t_2^*} & \dots & x_{2,m}^{t_m^*} \\ \vdots & \vdots & \ddots & \vdots \\ x_{n,1}^{t_1^*} & x_{n,2}^{t_2^*} & \dots & x_{n,m}^{t_m^*} \end{bmatrix}\]
This matrix \(x^* \in \{0,1\}^{n \times m}\) serves as input for training a Bernoulli Naïve Bayes classifier.
To evaluate the robustness of the proposed \(\chi^2\)-guided thresholding, nine additional well-known binarization strategies were implemented and tested under the same cross-validation procedure. Methods were grouped into two families based on how the threshold is determined.
Score-based methods scan all unique feature values as threshold candidates and select the value that maximises a scoring function applied after binarization:
Chi-square (\(\chi^2\)): selects the threshold that minimises the p-value of the \(\chi^2\) test of independence between the binarized feature and the binary target.
Mutual information: selects the threshold that maximises \(I(X_t; Y)\), the mutual information between the thresholded feature and the target.
Gini gain: selects the threshold that maximises the reduction in Gini impurity induced by the binary split.
Information gain: selects the threshold that maximises the reduction in Shannon entropy (information gain) induced by the split.
AUC split: selects the threshold that maximises \(\max(\mathrm{AUC}, 1 - \mathrm{AUC})\), where AUC is computed using the thresholded feature as a univariate binary classifier.
Youden’s \(J\): selects the threshold that maximises \(J = \mathrm{sensitivity} + \mathrm{specificity} - 1\).
Direct estimators compute the threshold analytically from the feature distribution without scanning candidates:
Otsu threshold: maximises the between-class variance of the feature histogram, computed via Otsu’s method.
Median threshold: sets the threshold at the feature median.
Mean threshold: sets the threshold at the feature mean.
K-means midpoint: fits a two-cluster K-means model (\(k = 2\)) and sets the threshold at the midpoint between the two cluster centroids.
For all methods, thresholding is applied as \(x_{i,j}^{t} = \mathbf{I}[x_{i,j} > t]\), and thresholds are estimated exclusively on the training fold within each cross-validation iteration to prevent data leakage.
Classifier performance is evaluated using standard metrics, including accuracy, weighted precision, weighted recall, weighted F1-score, and ROC-AUC [48]. Special attention is given to the area under the Receiver Operating Characteristic curve, which serves as an overall measure of binary classifier performance. ROC-AUC indicates the model’s ability to separate positive and negative classes by quantifying the total area under the ROC curve. As discussed in the literature [49], ROC-AUC is considered the most informative single metric for model evaluation in this study, as it does not depend on the classification threshold or class imbalance.
For each model, predictions from all held-out folds are concatenated to form pooled out-of-fold (OOF) vectors \((y_{\text{true}}, \hat{y}, \hat{p})\). Point estimates are then computed on these pooled OOF predictions. Alongside each point estimate, a 95% confidence interval (CI) is reported in the result tables using nonparametric bootstrap resampling with replacement (\(B=1000\) replicates). The CI bounds are the percentile limits: \[\mathrm{CI}_{95\%} = \left[q_{0.025}\!\left(\hat{\theta}^{*(1:B)}\right),\; q_{0.975}\!\left(\hat{\theta}^{*(1:B)}\right)\right],\] where \(\hat{\theta}\) denotes the metric of interest (accuracy, weighted precision, weighted recall, weighted F1-score, or ROC-AUC), and \(\hat{\theta}^{*(b)}\) is the value from bootstrap replicate \(b\).
To compare models statistically, paired tests are performed on matched OOF predictions obtained from the same samples. Each comparison is made against the proposed Bernoulli Naïve Bayes method. All hypothesis tests are two-sided with significance level \(\alpha = 0.05\).
Differences in discrimination between BNB and each comparator were assessed using DeLong’s test for correlated ROC-AUC values [50]. \[H_0: \mathrm{AUC}_A - \mathrm{AUC}_B = 0\] \[H_1: \mathrm{AUC}_A - \mathrm{AUC}_B \neq 0.\] Under \(H_0\), both models have the same discrimination performance. The test statistic is computed as \[z = \frac{\widehat{\mathrm{AUC}}_A - \widehat{\mathrm{AUC}}_B}{\mathrm{SE}\!\left(\widehat{\mathrm{AUC}}_A - \widehat{\mathrm{AUC}}_B\right)},\] with p-value \(p = 2\Phi(-|z|)\), where \(\Phi\) is the standard normal cumulative distribution function.
Differences in paired classification outcomes were evaluated using McNemar’s test [51], based on discordant counts \(b\) and \(c\) computed from matched predictions of BNB and each comparator on the same cases. \[H_0: b = c\] \[H_1: b \neq c.\] The null hypothesis states that both models have equal error rates on discordant pairs. When \(b+c \ge 25\), the continuity-corrected chi-square form is used: \[\chi^2 = \frac{(|b-c|-1)^2}{b+c}.\] When \(b+c < 25\), the exact binomial version of McNemar’s test is used.
Because relatively few published comparison studies report confidence intervals and the fold-level outputs required for paired statistical testing, additional self-implementations were developed for each comparator model. These implementations followed the methodological instructions described in each paper and were validated by reproducing the reported ROC-AUC as closely as possible before running the statistical comparisons. This can be seen in the tables [tab:diabetes95statistical95comparison], [tab:cancer95statistical95comparison], and [tab:heart95statistical95comparison] in the Results section.
In clinical practice, a predicted probability is not merely a model output; it is a number that a clinician may use to decide whether to refer a patient, initiate treatment, or counsel a family. A model that assigns \(70\%\) risk to a patient should, in practice, identify individuals who experience the outcome roughly seven times out of ten; if it does not, the probability estimate is misleading regardless of how well the model ranks patients relative to one another. In addition to ROC-AUC, calibration was evaluated to assess the reliability of predicted probabilities. While ROC-AUC measures discrimination, that is, the ability to rank cases correctly, it does not assess whether predicted probabilities correspond to observed event frequencies. For clinical decision support, this distinction is important because risk estimates may be used directly for interpretation and threshold-based decisions [52].
For this study, calibration analysis was incorporated into the same 10-fold cross-validation framework used for model evaluation. For each fold, \(\chi^2\)-guided thresholds were estimated on the training split only, the corresponding Naïve Bayes model was trained on the transformed training data, and predicted probabilities were generated for the held-out fold. Pooled out-of-fold predictions were then used for calibration assessment, preserving separation between training and testing data and avoiding information leakage.
Let \(y_i \in \{0,1\}\) denote the observed outcome for sample \(i\), and let \(\hat{p}_i \in (0,1)\) denote the predicted probability of the positive class. Using pooled OOF predictions, the following calibration metrics were computed.
Calibration-in-the-large evaluates whether predicted risks are too high or too low on average [53]. A simple descriptive summary compares the observed event rate \[\bar{y} = \frac{1}{n}\sum_{i=1}^n y_i\] with the mean predicted risk \[\bar{p} = \frac{1}{n}\sum_{i=1}^n \hat{p}_i.\] Good calibration-in-the-large is indicated when \(\bar{p} \approx \bar{y}\).
A model-based estimate of calibration-in-the-large is the calibration intercept, obtained from logistic recalibration. An intercept of \(0\) is ideal.
The Brier score measures the mean squared error of probabilistic predictions [54]: \[\mathrm{Brier} = \frac{1}{n}\sum_{i=1}^n \left(\hat{p}_i - y_i\right)^2.\] Lower values indicate better probabilistic accuracy, reflecting both discrimination and calibration.
Calibration intercept and slope were estimated by fitting a logistic recalibration model to pooled OOF predictions [54]: \[\mathrm{logit}\!\left(\Pr(y_i=1)\right) = \alpha + \beta \,\mathrm{logit}(\hat{p}_i),\] where \[\mathrm{logit}(p) = \log\!\left(\frac{p}{1-p}\right).\] Here, \(\alpha\) is the calibration intercept and \(\beta\) is the calibration slope. Ideal calibration corresponds to \[\alpha = 0, \qquad \beta = 1.\] An intercept \(\alpha < 0\) suggests overall overprediction of risk, whereas \(\alpha > 0\) suggests underprediction. A slope \(\beta < 1\) is commonly associated with overconfident predictions, while \(\beta > 1\) indicates underconfident predictions.
Because Naïve Bayes models can produce overconfident probabilities, especially when the conditional independence assumption is violated, an additional post-hoc beta calibration step was applied [54]. Beta calibration is a parametric probability transformation that generalizes Platt scaling and is well suited to correcting asymmetric distortions in predicted probabilities [55].
For each cross-validation fold, beta calibration was fit using training-fold predictions only and then applied to the corresponding held-out fold predictions. In one common parameterization, the calibrated probability \(\tilde{p}\) is obtained from the raw probability \(\hat{p}\) via \[\mathrm{logit}(\tilde{p}) = a \,\log(\hat{p}) + b \,\log(1-\hat{p}) + c,\] followed by \[\tilde{p} = \frac{1}{1+\exp\!\left[-\left(a \log(\hat{p}) + b \log(1-\hat{p}) + c\right)\right]}.\] This transformation was learned on the training fold and applied only to the held-out fold, producing calibrated OOF probabilities that were then evaluated using the same calibration metrics: calibration-in-the-large, Brier score, intercept, and slope.
To ensure a reliable evaluation of the Bernoulli Naïve Bayes classifier, stratified 10-fold cross-validation (\(k=10\)) is used. In stratified cross-validation, each fold preserves the overall class distribution of the dataset, which is especially important when dealing with imbalanced classes. The dataset is split into ten equally sized folds, maintaining the same proportion of class labels in each. In every iteration, nine folds form the training partition and the remaining fold serves as a held-out validation fold, so that each fold is used once for performance evaluation.
To avoid data leakage, threshold optimization and model fitting are performed exclusively within the training partition in each iteration. Binarization thresholds are calculated only on the training folds and are then applied to both the training data and the held-out validation fold, ensuring that the validation data does not influence preprocessing or parameter estimation.
After binarization, the classifier is trained on the binarized training data and evaluated on the corresponding validation fold. Metrics such as accuracy, weighted precision, weighted recall, and weighted F1-score are computed for each fold. Final results are reported as the average across all folds, providing a stable estimate of the model’s generalization performance. For each metric, a 95% confidence interval is computed via nonparametric bootstrap resampling with replacement (\(B = 1000\) replicates) on the pooled out-of-fold predictions.
Studies included for comparison in Tables [tab:diabetes95statistical95comparison], [tab:cancer95statistical95comparison], and [tab:heart95statistical95comparison] were identified by searching for research that used the same datasets and reported ROC-AUC values with a k-fold cross-validation approach. Preference was given to studies that described their preprocessing steps, allowing for fair and direct comparison. The selection was based on the relevance of the studies and the availability of results that could be matched to the evaluation criteria of the proposed method.
This section reports the comparative performance of the proposed Bernoulli Naïve Bayes framework on the three benchmark clinical datasets defined in Section 3.2. Methodological details on preprocessing, thresholding, cross-validation, and statistical testing are provided in Section 3.
The proposed \(\chi^2\)-based binarization was compared with alternative thresholding strategies within the same Bernoulli Naïve Bayes framework: mutual information, Gini gain, information gain, AUC-split, Otsu, median, mean, Youden’s \(J\), and k-means midpoint.
Table ¿tbl:tab:binarization95variants95three95datasets? reports AUC (95% CI) and pairwise DeLong/McNemar comparisons versus \(\chi^2\). No alternative showed statistically significant improvement over \(\chi^2\) in any dataset.
For the Pima Indians Diabetes Database, all variants were statistically comparable to \(\chi^2\) under both tests. For the Wisconsin Breast Cancer dataset, \(\chi^2\) and Gini gain achieved the highest AUC (0.984), while several alternatives underperformed in DeLong; McNemar identified only median thresholding as significantly worse than \(\chi^2\). For the Heart Failure Prediction dataset, mutual information, Gini gain, and information gain matched \(\chi^2\) (AUC 0.919), whereas Otsu, median, Youden’s \(J\), and k-means midpoint underperformed the top methods according to both Delong and McNemar tests.
Although \(\chi^2\) was not always the single highest-performing method, it demonstrated the most consistent performance among the three datasets. Some alternatives were equal or numerically better in individual settings, but those same methods showed significant underperformance in others (for example, mutual information and information gain in Breast Cancer). Among the alternatives, Gini gain was the most consistently comparable to \(\chi^2\).
max width=
Table [tab:diabetes95statistical95comparison] reports the Pima Indians Diabetes Database comparisons for the preprocessing settings described in Section 3.2. In these blocks, the self-implementations are generally aligned with the reported studies and frequently reproduce equal or higher values under the corresponding preprocessing protocols.
The statistical pattern in Table [tab:diabetes95statistical95comparison] is not one of uniform superiority over BNB. Most classical baselines are statistically comparable to BNB, with non-significant DeLong/McNemar outcomes in many rows. Significant advantages are concentrated in a limited subset, mainly neural/deep models and isolated variants (one random-forest block and selected non-linear SVM distance formulations), while significant underperformance appears repeatedly in tree-based baselines and some RBF-based variants.
For this dataset, the NaN-aware BNB implementation handles missing values internally by omitting likelihood contributions for missing entries rather than applying imputation. Its performance was comparable to that of standard BNB with \(\chi^2\)-based binarization; in most comparisons, differences were not statistically significant, although NaN-aware BNB showed slightly higher values in most settings.
Table [tab:cancer95statistical95comparison] reports the Wisconsin Breast Cancer dataset comparisons without missing-value preprocessing, including BNB and the reference models from [56]–[59]. The implemented results in this table also show broad reproducibility, with many rows matching or surpassing the corresponding paper-level values.
Compared with the Pima Indians Diabetes Database and Heart Failure Prediction tables, Table [tab:cancer95statistical95comparison] contains a larger number of statistically significant outperformance cases versus BNB. The models that outperform BNB are mainly ensemble methods and neural/deep-learning models, plus selected SVM configurations with non-linear kernels, whereas several classical comparators remain non-significant and some tree-based models are significantly below BNB. These alternatives generally improve predictive performance at the cost of interpretability, because their complex and non-linear decision structures are less transparent for direct clinical reasoning.
Table [tab:heart95statistical95comparison] reports Heart Failure Prediction dataset comparisons for BNB and the reference classifiers, including Gaussian Naïve Bayes [60]. As in the other datasets, the independent implementations are generally consistent with the reported studies and in many rows achieve equal or higher computed metrics.
The statistical outcomes in Table [tab:heart95statistical95comparison] are predominantly non-significant for many classical baselines, indicating broad overlap with BNB in practical performance. Significant outperformance is concentrated in selected ensemble-style configurations and isolated SVM cases, whereas repeated significant underperformance is observed for decision-tree baselines. This table reinforces the role of BNB as a competitive reference model and suggests that apparent SVM gains depending on non-linear kernel choices should be interpreted carefully, as such choices are less transparent for medical interpretation than linear kernel models.
In addition to ROC-AUC, calibration analysis was performed following the protocol described in Section 3. Calibration results are summarized in Table ¿tbl:tab:calibration95performance? and the corresponding calibration curves are shown in Figure 1. Four metrics are reported for both raw and beta-calibrated probabilities for each dataset: calibration-in-the-large, Brier score, calibration intercept, and calibration slope.
Raw BNB probabilities showed compressed slopes (ranging from 0.16 to 0.53), indicating overconfident probability estimates relative to the observed event rates. Beta calibration improved the slope substantially in all three datasets, with the Heart Failure dataset reaching a slope of 0.967 and an intercept of 0.006, close to ideal calibration. Brier scores also decreased after calibration in all cases. The Wisconsin Breast Cancer dataset had the lowest Brier score (0.043 post-calibration), consistent with its high discrimination (AUC 0.984).
The interpretability of the proposed BNB framework is supported by complementary graphical and tabular analyses. Figures 2, 3, and 4 present feature-wise thresholds on a normalized \([0,1]\) scale together with the mean and mean \(\pm\) standard deviation. This visualization makes the threshold location explicit relative to each feature distribution and clarifies how each predictor is partitioned into the Bernoulli states used for classification (\(x < t\) and \(x \geq t\)).
For the Heart Failure dataset (Figure 4), binary predictors (Sex, Fasting Blood Sugar, and Exercise-Induced Angina) are separated at 0.5, while encoded categorical predictors (Resting ECG and ST Slope) are partitioned at category boundaries, yielding directly interpretable decision splits.
max totalsize=0.84,center
| Statistical tests | ||||||||||
|---|---|---|---|---|---|---|---|---|---|---|
| 5-9 Reference | Preprocessing | Algorithm | Source | Accuracy | Recall | Precision | F1-score | AUC | DeLong test | McNemar test |
| [61] | Gaussian Naïve Bayes | Paper | ||||||||
| Implementation | [0.730,0.790] | [0.730,0.790] | [0.730,0.790] | [0.730,0.790] | [0.790,0.850] | |||||
| k-Nearest Neighbors | Paper | |||||||||
| Implementation | [0.700,0.760] | [0.700,0.760] | [0.700,0.760] | [0.700,0.760] | [0.740,0.810] | |||||
| J48 Decision Tree | Paper | |||||||||
| Implementation | [0.700,0.760] | [0.700,0.760] | [0.690,0.760] | [0.690,0.760] | [0.680,0.750] | 0.000\(^{**}\) | ||||
| Random Forest | Paper | |||||||||
| Implementation | [0.720,0.780] | [0.720,0.780] | [0.720,0.780] | [0.720,0.780] | [0.790,0.850] | 0.002\(^{*}\) | ||||
| Feedforward Neural Network | Paper | |||||||||
| Implementation | [0.740,0.800] | [0.740,0.800] | [0.730,0.790] | [0.730,0.790] | [0.810,0.860] | 0.000\(^{*}\) | ||||
| Convolutional Neural Network | Paper | |||||||||
| Implementation | [0.750,0.810] | [0.750,0.810] | [0.740,0.800] | [0.740,0.800] | [0.810,0.860] | 0.000\(^{*}\) | 0.030\(^{*}\) | |||
| Bernoulli Naïve Bayes | Implementation | [0.700,0.760] | [0.700,0.760] | [0.700,0.760] | [0.700,0.760] | [0.760,0.830] | 0.045\(^{**}\) | |||
| - | Bernoulli Naïve Bayes (NaN-aware) | Implementation | [0.720,0.770] | [0.720,0.770] | [0.710,0.770] | [0.710,0.770] | [0.770,0.840] | - | - | |
| Gaussian Naïve Bayes | Paper | |||||||||
| Implementation | [0.730,0.810] | [0.730,0.810] | [0.730,0.820] | [0.730,0.810] | [0.790,0.870] | |||||
| 3-11 | J48 Decision Tree | Paper | ||||||||
| Implementation | [0.750,0.830] | [0.750,0.830] | [0.770,0.850] | [0.760,0.830] | [0.750,0.850] | |||||
| 3-11 | Random Forest | Paper | ||||||||
| Implementation | [0.740,0.830] | [0.740,0.830] | [0.740,0.830] | [0.740,0.830] | [0.810,0.900] | |||||
| 3-11 | Logistic Regression | Paper | ||||||||
| Implementation | [0.740,0.820] | [0.740,0.820] | [0.730,0.820] | [0.730,0.810] | [0.810,0.890] | |||||
| 3-11 | Bernoulli Naïve Bayes | Implementation | [0.750,0.830] | [0.750,0.830] | [0.750,0.830] | [0.750,0.830] | [0.780,0.870] | - | - | |
| Classification Tree | Paper | |||||||||
| Implementation | [0.686,0.776] | [0.686,0.776] | [0.688,0.778] | [0.687,0.776] | [0.649,0.749] | 0.000\(^{**}\) | 0.015\(^{**}\) | |||
| 3-11 | Support Vector Machine | Paper | ||||||||
| Implementation | [0.719,0.804] | [0.719,0.804] | [0.710,0.799] | [0.710,0.798] | [0.790,0.878] | |||||
| 3-11 | k-Nearest Neighbors | Paper | ||||||||
| Implementation | [0.719,0.804] | [0.719,0.804] | [0.711,0.801] | [0.712,0.801] | [0.750,0.845] | |||||
| 3-11 | Gaussian Naïve Bayes | Paper | ||||||||
| Implementation | [0.730,0.814] | [0.730,0.814] | [0.732,0.816] | [0.731,0.814] | [0.790,0.872] | |||||
| 3-11 | Random Forest | Paper | ||||||||
| Implementation | [0.742,0.829] | [0.742,0.829] | [0.739,0.826] | [0.739,0.827] | [0.811,0.892] | |||||
| 3-11 | Multilayer Perceptron | Paper | ||||||||
| Implementation | [0.712,0.798] | [0.712,0.798] | [0.710,0.801] | [0.711,0.799] | [0.752,0.851] | |||||
| 3-11 | AdaBoost | Paper | ||||||||
| Implementation | [0.737,0.819] | [0.737,0.819] | [0.730,0.817] | [0.731,0.817] | [0.798,0.886] | |||||
| 3-11 | Logistic Regression | Paper | ||||||||
| Implementation | [0.742,0.821] | [0.742,0.821] | [0.732,0.819] | [0.733,0.818] | [0.808,0.890] | |||||
| 3-11 | Bernoulli Naïve Bayes | Implementation | [0.750,0.830] | [0.750,0.830] | [0.750,0.830] | [0.750,0.830] | [0.780,0.870] | |||
| Gaussian Naïve Bayes | Paper | |||||||||
| Implementation | [0.690,0.750] | [0.780,0.860] | [0.700,0.780] | [0.740,0.810] | [0.770,0.840] | |||||
| 3-11 | Decision Tree | Paper | ||||||||
| Implementation | [0.710,0.770] | [0.710,0.770] | [0.700,0.770] | [0.700,0.770] | [0.720,0.790] | 0.020\(^{**}\) | ||||
| 3-11 | Random Forest | Paper | ||||||||
| Implementation | [0.730,0.790] | [0.730,0.790] | [0.720,0.780] | [0.720,0.780] | [0.780,0.840] | |||||
| 3-11 | k-Nearest Neighbors | Paper | ||||||||
| Implementation | [0.740,0.800] | [0.820,0.890] | [0.750,0.810] | [0.780,0.840] | [0.810,0.860] | |||||
| 3-11 | Bernoulli Naïve Bayes | Implementation | [0.680,0.750] | [0.680,0.750] | [0.680,0.740] | [0.680,0.740] | [0.750,0.820] | |||
| 3-11 | - | Bernoulli Naïve Bayes (NaN-aware) | Implementation | [0.690,0.770] | [0.690,0.770] | [0.680,0.760] | [0.690,0.760] | [0.770,0.830] | ||
| SVM (Linear) | Paper | |||||||||
| Implementation | [0.730,0.790] | [0.710,0.780] | [0.730,0.800] | [0.720,0.780] | [0.740,0.810] | |||||
| 3-11 | SVM (Polynomial) | Paper | ||||||||
| Implementation | [0.690,0.750] | [0.690,0.750] | [0.680,0.750] | [0.690,0.750] | [0.740,0.810] | |||||
| 3-11 | SVM (RBF Minkowski) | Paper | ||||||||
| Implementation | [0.670,0.740] | [0.670,0.740] | [0.660,0.730] | [0.660,0.730] | [0.700,0.770] | 0.001\(^{**}\) | ||||
| 3-11 | SVM (RBF City Block) | Paper | ||||||||
| Implementation | [0.660,0.730] | [0.660,0.730] | [0.650,0.720] | [0.630,0.700] | [0.700,0.770] | 0.001\(^{**}\) | ||||
| 3-11 | SVM (RBF Mahalanobis) | Paper | ||||||||
| Implementation | [0.710,0.770] | [0.710,0.770] | [0.700,0.770] | [0.690,0.760] | [0.750,0.820] | |||||
| 3-11 | SVM (RBF Bray-Curtis) | Paper | ||||||||
| Implementation | [0.690,0.750] | [0.690,0.750] | [0.710,0.770] | [0.690,0.750] | [0.780,0.840] | |||||
| 3-11 | SVM (RBF Canberra) | Paper | ||||||||
| Implementation | [0.730,0.790] | [0.730,0.790] | [0.750,0.810] | [0.730,0.790] | [0.800,0.860] | 0.000\(^{*}\) | ||||
| 3-11 | SVM (RBF Euclidean Distance) | Paper | ||||||||
| Implementation | [0.710,0.780] | [0.710,0.780] | [0.710,0.770] | [0.710,0.770] | [0.800,0.860] | 0.007\(^{*}\) | ||||
| 3-11 | Bernoulli Naïve Bayes | Implementation | [0.680,0.750] | [0.680,0.750] | [0.680,0.740] | [0.680,0.740] | [0.750,0.820] | 0.016\(^{**}\) | ||
| 3-11 | - | Bernoulli Naïve Bayes (NaN-aware) | Implementation | [0.690,0.770] | [0.690,0.770] | [0.680,0.760] | [0.690,0.760] | [0.770,0.830] | ||
max totalsize=0.84,center
| Computed metrics | |||||||||
|---|---|---|---|---|---|---|---|---|---|
| 4-8 Reference | Algorithm | Source | Accuracy | Recall | Precision | F1-score | AUC | DeLong test | McNemar test |
| [62] | Multi-layer Perceptron (MLP) | Paper | |||||||
| Implementation | [0.954,0.982] | [0.954,0.982] | [0.954,0.982] | [0.954,0.982] | [0.984,0.998] | 0.018\(^{*}\) | |||
| Radial Basis Function Network (RBF) | Paper | ||||||||
| Implementation | [0.953,0.981] | [0.953,0.981] | [0.952,0.981] | [0.952,0.981] | [0.983,0.997] | 0.033\(^{*}\) | 0.007\(^{*}\) | ||
| Probabilistic Neural Network (PNN) | Paper | ||||||||
| Implementation | [0.960,0.986] | [0.960,0.986] | [0.960,0.986] | [0.959,0.986] | [0.987,0.998] | 0.015\(^{*}\) | 0.002\(^{*}\) | ||
| Bernoulli Naïve Bayes | Implementation | [0.924,0.963] | [0.924,0.963] | [0.924,0.963] | [0.924,0.963] | [0.974,0.992] | - | - | |
| SELF Stacking Ensemble | Paper | ||||||||
| 3-10 | Implementation | [0.954,0.982] | [0.954,0.982] | [0.954,0.982] | [0.954,0.982] | [0.984,0.998] | 0.020\(^{*}\) | 0.001\(^{*}\) | |
| 2-10 | Extra Trees | Paper | |||||||
| 3-10 | Implementation | [0.951,0.979] | [0.951,0.979] | [0.951,0.979] | [0.951,0.979] | [0.986,0.998] | 0.004\(^{*}\) | 0.012\(^{*}\) | |
| 2-10 | Random Forest | Paper | |||||||
| 3-10 | Implementation | [0.931,0.965] | [0.931,0.965] | [0.932,0.965] | [0.931,0.965] | [0.978,0.996] | |||
| 2-10 | AdaBoost | Paper | |||||||
| 3-10 | Implementation | [0.963,0.988] | [0.963,0.988] | [0.963,0.988] | [0.963,0.988] | [0.989,0.998] | 0.004\(^{*}\) | 0.001\(^{*}\) | |
| 2-10 | Gradient Boosting | Paper | |||||||
| 3-10 | Implementation | [0.940,0.974] | [0.940,0.974] | [0.942,0.974] | [0.940,0.974] | [0.983,0.996] | 0.021\(^{*}\) | ||
| 2-10 | K-Nearest Neighbor (k=9) | Paper | |||||||
| 3-10 | Implementation | [0.954,0.982] | [0.954,0.982] | [0.954,0.983] | [0.954,0.982] | [0.978,0.997] | 0.018\(^{*}\) | ||
| 2-10 | Support Vector Machine (RBF) | Paper | |||||||
| 3-10 | Implementation | [0.963,0.986] | [0.963,0.986] | [0.963,0.986] | [0.963,0.986] | [0.987,0.999] | 0.011\(^{*}\) | 0.000\(^{*}\) | |
| 2-10 | Multilayer Perceptron (MLP) | Paper | |||||||
| 3-10 | Implementation | [0.960,0.986] | [0.960,0.986] | [0.960,0.986] | [0.960,0.986] | [0.982,0.998] | 0.009\(^{*}\) | ||
| 2-10 | Classification and Regression Tree (CART) | Paper | |||||||
| 3-10 | Implementation | [0.891,0.935] | [0.891,0.935] | [0.891,0.935] | [0.891,0.935] | [0.882,0.932] | 0.000\(^{**}\) | 0.009\(^{**}\) | |
| 2-10 | Stochastic Gradient Descent (Log-loss) | Paper | |||||||
| 3-10 | Implementation | [0.960,0.986] | [0.960,0.986] | [0.960,0.986] | [0.959,0.986] | [0.988,0.998] | 0.004\(^{*}\) | 0.003\(^{*}\) | |
| 2-10 | Bernoulli Naïve Bayes | Implementation | [0.924,0.963] | [0.924,0.963] | [0.924,0.963] | [0.924,0.963] | [0.974,0.992] | - | - |
| Support Vector Machine (SVM) | Paper | ||||||||
| 3-10 | Implementation | [0.963,0.986] | [0.963,0.986] | [0.963,0.986] | [0.963,0.986] | [0.987,0.999] | 0.011\(^{*}\) | 0.000\(^{*}\) | |
| 2-10 | Random Forest | Paper | |||||||
| 3-10 | Implementation | [0.938,0.972] | [0.938,0.972] | [0.939,0.972] | [0.938,0.972] | [0.978,0.997] | |||
| 2-10 | Logistic Regression | Paper | |||||||
| 3-10 | Implementation | [0.948,0.977] | [0.981,0.999] | [0.939,0.970] | [0.959,0.985] | [0.977,0.995] | |||
| 2-10 | Decision Tree (C4.5 approximation) | Paper | |||||||
| 3-10 | Implementation | [0.914,0.954] | [0.914,0.954] | [0.915,0.955] | [0.914,0.954] | [0.909,0.954] | 0.000\(^{**}\) | ||
| 2-10 | K-Nearest Neighbors (KNN) | Paper | |||||||
| 3-10 | Implementation | [0.951,0.981] | [0.951,0.981] | [0.952,0.981] | [0.951,0.981] | [0.975,0.996] | 0.016\(^{*}\) | ||
| 2-10 | Bernoulli Naïve Bayes | Implementation | [0.924,0.963] | [0.924,0.963] | [0.924,0.963] | [0.924,0.963] | [0.974,0.992] | - | - |
| Artificial Neural Network (ANN) | Paper | ||||||||
| 3-10 | Implementation | [0.954,0.982] | [0.954,0.982] | [0.954,0.982] | [0.954,0.982] | [0.982,0.996] | 0.018\(^{*}\) | ||
| 2-10 | Support Vector Machine (SVM, RBF) | Paper | |||||||
| 3-10 | Implementation | [0.961,0.988] | [0.961,0.988] | [0.962,0.988] | [0.961,0.988] | [0.990,0.999] | 0.003\(^{*}\) | 0.000\(^{*}\) | |
| 2-10 | Random Forest | Paper | |||||||
| 3-10 | Implementation | [0.937,0.972] | [0.937,0.972] | [0.937,0.972] | [0.937,0.972] | [0.980,0.997] | 0.027\(^{*}\) | ||
| 2-10 | Bernoulli Naïve Bayes | Implementation | [0.924,0.963] | [0.924,0.963] | [0.924,0.963] | [0.924,0.963] | [0.974,0.992] | - | - |
| Decision Tree (Entropy) | Paper | ||||||||
| 3-10 | Implementation | [0.914,0.954] | [0.914,0.954] | [0.915,0.955] | [0.914,0.954] | 0.033\(^{**}\) | |||
| 2-10 | Gaussian Naïve Bayes | Paper | |||||||
| 3-10 | Implementation | [0.910,0.953] | [0.910,0.953] | [0.910,0.952] | [0.910,0.952] | [0.975,0.992] | |||
| 2-10 | Random Forest | Paper | |||||||
| 3-10 | Implementation | [0.942,0.974] | [0.942,0.974] | [0.942,0.974] | [0.942,0.974] | [0.978,0.997] | |||
| 2-10 | Bernoulli Naïve Bayes | Implementation | [0.924,0.963] | [0.924,0.963] | [0.924,0.963] | [0.924,0.963] | [0.974,0.992] | - | - |
max totalsize=0.84,center
| Computed metrics | |||||||||
|---|---|---|---|---|---|---|---|---|---|
| 4-8 Reference | Algorithm | Source | Accuracy | Recall | Precision | F1-score | AUC | DeLong test | McNemar test |
| [63] | SVM | Paper | |||||||
| Implementation | [0.842,0.888] | [0.842,0.888] | [0.843,0.889] | [0.841,0.888] | [0.902,0.940] | 0.029\(^{*}\) | |||
| Random Forest | Paper | ||||||||
| Implementation | [0.856,0.899] | [0.856,0.899] | [0.857,0.900] | [0.856,0.899] | [0.911,0.947] | 0.046\(^{*}\) | 0.000\(^{*}\) | ||
| Naïve Bayes | Paper | ||||||||
| Implementation | [0.829,0.877] | [0.829,0.877] | [0.829,0.877] | [0.829,0.877] | [0.891,0.930] | ||||
| Logistic Regression | Paper | ||||||||
| Implementation | [0.823,0.873] | [0.858,0.906] | [0.837,0.884] | [0.847,0.893] | [0.815,0.864] | ||||
| KNN | Paper | ||||||||
| Implementation | [0.837,0.882] | [0.837,0.882] | [0.837,0.883] | [0.836,0.882] | [0.887,0.929] | ||||
| Decision Tree | Paper | ||||||||
| Implementation | [0.773,0.825] | [0.773,0.825] | [0.774,0.825] | [0.774,0.825] | [0.771,0.823] | 0.000\(^{**}\) | 0.002\(^{**}\) | ||
| Bernoulli Naïve Bayes | Implementation | [0.819,0.867] | [0.819,0.867] | [0.820,0.868] | [0.820,0.867] | [0.901,0.938] | - | - | |
| Logistic Regression (LR) | Paper | ||||||||
| Implementation | [0.829,0.878] | [0.829,0.878] | [0.830,0.878] | [0.829,0.878] | [0.891,0.930] | 0.020\(^{**}\) | |||
| 2-10 | Random Forest (RF) | Paper | |||||||
| Implementation | [0.847,0.890] | [0.847,0.890] | [0.848,0.891] | [0.847,0.890] | [0.910,0.945] | 0.012\(^{*}\) | |||
| 2-10 | Extra Trees (ET) | Paper | |||||||
| Implementation | [0.840,0.885] | [0.840,0.885] | [0.840,0.885] | [0.839,0.884] | [0.908,0.944] | ||||
| 2-10 | GBDT | Paper | |||||||
| Implementation | [0.829,0.876] | [0.829,0.876] | [0.829,0.877] | [0.828,0.876] | [0.903,0.940] | ||||
| 2-10 | Multilayer Perceptron (MLP) | Paper | |||||||
| Implementation | [0.825,0.869] | [0.825,0.869] | [0.825,0.870] | [0.824,0.869] | [0.905,0.940] | ||||
| 2-10 | Stacking Ensemble | Paper | |||||||
| Implementation | [0.846,0.890] | [0.846,0.890] | [0.847,0.891] | [0.845,0.889] | [0.911,0.946] | 0.011\(^{*}\) | |||
| 2-10 | Bernoulli Naïve Bayes | Implementation | [0.819,0.867] | [0.819,0.867] | [0.820,0.869] | [0.819,0.867] | [0.902,0.939] | - | - |
| Logistic Regression | Paper | ||||||||
| Implementation | [0.819,0.867] | [0.819,0.867] | [0.819,0.867] | [0.819,0.867] | [0.891,0.930] | ||||
| 2-10 | Decision Tree | Paper | |||||||
| Implementation | [0.774,0.825] | [0.774,0.825] | [0.775,0.826] | [0.775,0.825] | [0.773,0.824] | 0.000\(^{**}\) | 0.003\(^{**}\) | ||
| 2-10 | Random Forest | Paper | |||||||
| Implementation | [0.839,0.884] | [0.839,0.884] | [0.839,0.884] | [0.838,0.884] | [0.908,0.944] | ||||
| 2-10 | Support Vector Machine (RBF) | Paper | |||||||
| Implementation | [0.836,0.882] | [0.836,0.882] | [0.837,0.883] | [0.835,0.882] | [0.894,0.935] | ||||
| 2-10 | K Nearest Neighbors | Paper | |||||||
| Implementation | [0.818,0.865] | [0.818,0.865] | [0.818,0.865] | [0.818,0.865] | [0.887,0.927] | ||||
| 2-10 | Gaussian Naïve Bayes | Paper | |||||||
| Implementation | [0.819,0.866] | [0.819,0.866] | [0.820,0.866] | [0.819,0.866] | [0.889,0.928] | ||||
| 2-10 | Bernoulli Naïve Bayes | Implementation | [0.818,0.868] | [0.818,0.868] | [0.820,0.868] | [0.819,0.868] | [0.901,0.936] | - | - |
| Random Forest | Paper | ||||||||
| Implementation | [0.855,0.898] | [0.855,0.898] | [0.856,0.898] | [0.855,0.898] | [0.911,0.947] | 0.042\(^{*}\) | 0.000\(^{*}\) | ||
| 2-10 | Logistic Regression | Paper | |||||||
| Implementation | [0.862,0.907] | [0.862,0.907] | [0.855,0.900] | [0.860,0.904] | [0.897,0.936] | ||||
| 2-10 | K-Nearest Neighbours (K=13) | Paper | |||||||
| Implementation | [0.831,0.879] | [0.831,0.879] | [0.831,0.879] | [0.831,0.879] | [0.901,0.939] | ||||
| 2-10 | Bernoulli Naïve Bayes | Implementation | [0.819,0.867] | [0.819,0.867] | [0.820,0.868] | [0.820,0.867] | [0.901,0.938] | - | - |
max width=
In the Heart Failure dataset, categorical features were encoded for Categorical Naïve Bayes (CNB), as summarized in Table ¿tbl:tab:heart95dataset95encoding95summary?.
max width=
Tables ¿tbl:tab:pima95feature95summary?, ¿tbl:tab:wisconsin95feature95summary?, and ¿tbl:tab:heart95feature95summary95cnb? report feature-level conditional probabilities inferred from the data, with 95% confidence intervals obtained by bootstrap resampling (\(n=1000\)). For thresholded variables, these tables compare outcome probability below and above the threshold and therefore quantify both the direction and magnitude of feature effects on class membership. The absolute difference, \(\Delta P\), is included as a practical proxy for class-separation strength, with larger values indicating stronger discrimination. For categorical rows in the Heart Failure CNB table, threshold-based \(\Delta P\) is not applicable.
max width=
max width=
max width=
Perhaps the most direct demonstration of the framework’s interpretability is that the entire classification procedure can be carried out by hand. Table ¿tbl:tab:pima95posterior95example? presents a complete leave-one-out worked example that integrates all explainability components. It shows how thresholds, class priors, selected likelihoods, and posterior terms are combined and normalized to classify a single sample. Intermediate feature-level computations are reported to enable direct inspection of each predictor’s contribution to both unnormalized and normalized posterior probabilities.
max width=
As shown in Table ¿tbl:tab:pima95posterior95example?, the sample is classified as Diabetes, with posterior probability 0.971, compared with 0.0295 for No Diabetes. This calculation does not include the usual logarithmic transformation of probabilities, which is commonly applied in Naïve Bayes implementations to avoid numerical underflow. This, however, does not affect the interpretability of the example, as the same terms are combined in the same way regardless of whether log transformation is applied.
The benchmark datasets used in this study, Pima Indians Diabetes, Wisconsin Breast Cancer, and Heart Failure Prediction, were selected for their broad adoption as evaluation standards in clinical machine learning, enabling direct comparison with published methods. However, the practical value of an interpretable, threshold-based framework extends well beyond these specific conditions. Consider the memory clinic setting: a nurse practitioner conducting a cognitive triage assessment needs not only a risk estimate but an accountable explanation, one that can be communicated to a worried patient or family member in real time, without reference to a black-box model or a proprietary algorithm. Similar requirements arise in community screening for type 2 diabetes in low-resource settings, in primary care cardiovascular risk communication, and in any clinical context where the decision-maker is not the data scientist who built the model. The Bernoulli Naïve Bayes framework proposed here is designed precisely for these conditions: settings where interpretability is not a desirable feature but an operational requirement, where the clinician must be able to trace, explain, and if necessary defend every classification to a patient, a colleague, or a regulatory body. Future work should evaluate the framework prospectively in such settings, including through clinician usability studies that assess whether the decision rules produced are not only formally interpretable but practically useful at the point of care.
Against this clinical backdrop, the present study evaluated whether Bernoulli Naïve Bayes combined with supervised \(\chi^2\)-guided binarization can provide an interpretable option for clinical prediction without a substantial loss in discriminatory ability. The comparative analyses place the method in a competitive position relative to many conventional tabular classifiers on the three benchmark datasets. Although BNB was not uniformly superior, it remained statistically comparable to a broad set of baselines in a large share of the comparisons. This pattern supports the view that a threshold-based Bernoulli representation can retain useful predictive information while preserving a verifiable decision structure.
A major strength of the proposed method is that the full classification pathway can be reconstructed directly from the training data. Once the thresholds have been estimated, each continuous predictor is converted into a binary rule, the relevant class-conditional probabilities can be tabulated, and the posterior probability for a new patient can be obtained with straightforward arithmetic. Table ¿tbl:tab:pima95posterior95example? demonstrates that the model can be presented as a complete worked example rather than as an opaque scoring mechanism. For clinical settings in which auditability and explanation are valued, this property is an important practical advantage.
The comparative results also clarify the nature of the trade-off between discrimination and interpretability. When BNB was surpassed, the gains generally came from ensemble methods, neural-network models, or selected non-linear SVM configurations. Such models can achieve stronger predictive performance, but their internal decision paths are less accessible for direct inspection at the level of an individual patient. By contrast, the proposed BNB approach expresses each predictor through an explicit threshold together with a compact set of conditional probabilities. In applications where explicit reasoning and reproducible calculation are necessary, that simplicity may justify accepting a modest reduction in raw performance.
The threshold sensitivity analysis provides further support for the proposed binarization rule. As shown in Table ¿tbl:tab:binarization95variants95three95datasets?, alternative thresholding strategies occasionally matched the \(\chi^2\) criterion numerically, yet none achieved a statistically significant improvement in any dataset. Several alternatives were significantly worse in at least one setting. This pattern suggests that the usefulness of the method does not depend on a narrowly tuned threshold rule. Rather, the \(\chi^2\) procedure appears to offer a stable and defensible way to convert continuous variables into Bernoulli features while preserving model clarity.
The calibration analysis adds a complementary perspective to the discrimination results. In clinical prediction, the quality of the probability estimates is often as important as rank-based separation, especially when probabilities may inform downstream decision thresholds. The observed improvement after beta calibration suggests that the raw Naïve Bayes probabilities can benefit from post hoc adjustment, which is consistent with the well-known tendency of conditionally independent models to produce imperfectly calibrated probabilities. From a practical standpoint, this means that the method may be used not only for classification but also for probability estimation, provided that calibration is assessed and, when needed, corrected.
The explainability analyses support the interpretability claims of the method. Figures 2, 3, and 4 place the selected thresholds in relation to the empirical feature distributions, while Tables ¿tbl:tab:pima95feature95summary?, ¿tbl:tab:wisconsin95feature95summary?, and ¿tbl:tab:heart95feature95summary95cnb? report class-conditional probabilities together with uncertainty intervals. Taken together with the patient-level posterior calculation in Table ¿tbl:tab:pima95posterior95example?, these components permit inspection of the model at the level of thresholds, feature-specific probabilities, and final posterior values. This level of detail is difficult to obtain from more complex classifiers without reliance on post hoc explanation methods.
The results also point to settings in which caution is warranted. Thresholding categorical predictors in the same manner as continuous variables can merge clinically meaningful categories and reduce the informational content of the original feature. A more appropriate strategy is to binarize only continuous variables while preserving categorical predictors in encoded form, as was done in the Categorical Naïve Bayes analysis for the Heart Failure dataset. As presented in the methods section, the Bernoulli Naïve Bayes classifier is a variant of Categorical Naïve Bayes classifier, only for two categories, which is binary classification. Using Categorical Naïve Bayes preserves the original category structure while maintaining the simplicity of the overall approach.
Similar caution applies to the interpretation of \(\Delta P\). The reported values provide an intuitive proxy for class-separation strength by describing how outcome probability changes on the two sides of a threshold, but they should not be treated as definitive measures of feature importance. Clinical predictors are often correlated, and the Naïve Bayes independence assumption does not fully represent those dependencies or their possible interactions. Consequently, the apparent contribution of one variable may change when other predictors are added or removed. Feature selection is therefore better regarded as a subset optimization problem than as a univariate ranking exercise [64]–[67]. Even so, the ordering of variables such as Glucose, Insulin, and Age in the Pima dataset remains clinically plausible and aligns with earlier reports [68], [69].
These considerations should be interpreted together with the standard limitations of Naïve Bayes. The independence assumption is unlikely to hold exactly in clinical data, the selected thresholds are sample-dependent and may vary under different resampling splits, and the present evaluation is restricted to benchmark datasets rather than external cohorts. These limitations constrain the scope of generalization. Within those bounds, the present work supports the use of statistically guided binarization as a way to make Bernoulli Naïve Bayes both transparent and practically competitive for tabular clinical prediction tasks. It should also be noted that interpretability in this study was assessed structurally, through explicit thresholds, conditional probability tables, and a worked classification example, rather than through formal evaluation with clinical users. Whether clinicians find these representations intuitive, actionable, and trustworthy in practice remains an open question, and usability studies in real clinical settings are an important direction for future work.
This study evaluated a Bernoulli Naïve Bayes method based on supervised \(\chi^2\)-guided binarization for tabular clinical prediction. The results support its use as an interpretable reference model that combines transparent decision rules with competitive predictive performance on the evaluated datasets. The framework achieved ROC-AUC values of 0.800 for the NaN-aware Pima Indians Diabetes analysis, 0.984 for the Wisconsin Breast Cancer dataset, and 0.919 for the Heart Failure Prediction dataset. In addition to interpretability, the method remains computationally light at both training and inference, because each predictor is reduced to a single thresholded Bernoulli term and classification requires only simple probability calculations. Rather than serving as a replacement for more flexible classifiers, the method is best viewed as a simple and auditable alternative when transparency and computational efficiency are primary design goals.
The method nevertheless retains the usual limitations of Naïve Bayes. The conditional independence assumption is unlikely to hold exactly in clinical data, threshold estimates are influenced by training data variability, and mixed continuous and categorical predictors require careful handling. Exhaustive threshold evaluation over all candidate cut points may also become burdensome for larger datasets, and the absence of built-in feature weighting may limit performance when predictors differ substantially in informativeness. Strong ROC-AUC performance should therefore not be interpreted as guaranteed superiority on threshold-dependent metrics such as accuracy, precision, recall, or F1-score. The present evaluation was also limited to benchmark datasets, which constrains the scope of immediate clinical generalization.
Future work should prioritize external validation in independent cohorts, formal assessment of threshold stability, and study of feature-selection or weighting strategies that preserve interpretability. Additionally, other classifiers could benefit from similar binarization strategies, so more research is needed to explore how broadly this method can be applied.
The datasets used during the current study are publicly available from the sources listed in the references:
Pima Indians Diabetes Database [45]
Breast Cancer Wisconsin (Diagnostic) Database [46]
Heart Failure Prediction Dataset [47]
The code generated and used during the current study are available from the corresponding author on reasonable request.