Edelweiss Applied Science and Technology ISSN: 2576-8484 Vol. 9, No. 10, 83-103 2025 Publisher: Learning Gate DOI: 10.55214/2576-8484.v9i10.10344 © 2025 by the authors; licensee Learning Gate © 2025 by the authors; licensee Learning Gate Received: 1 August 2025 / Revised: 14 September 2025 / Accepted: 17 September 2025 / Published: 3 October 2025 * Correspondence: nidhal.ziadiellouze@fst.utm.tn Smart risk prediction: The rise of Bayesian models in finance Nidhal Ziadi Ellouze1*, Nesrine Gafsi2, Nihel Ziadi Ben Fadhe3 1Faculty of sciences of Tunis, University of Tunis EL Manar, Laboratories LARIMRAF, Tunisia; nidhal.ziadiellouze@fst.utm.tn (N.Z.E.). 2College of Business, Imam Mohammad Ibn Saud Islamic University (IMSIU), Riyadh, Saudi Arabia; NWGafsi@imamu.edu.sa nesrine.gafsi@gmail.com (N.G.). 3Faculty of sciences of Tunis, University of Tunis El Manar, Laboratories ERMA, Tunisia; nihel.ziadi@fst.utm.tn (N.Z.B.F.). Abstract: This research aims to develop predictive models to estimate the probability of bank customer default based on socio-economic factors. Relying on Bayesian inference frameworks, the study implements both Naive Bayes classifiers and Bayesian Neural Networks (BNNs) to improve prediction accuracy. The methodology is grounded in Bayes’ theorem and conditional independence, with practical implementation using Python libraries such as scikit-learn and TensorFlow Probability. Following rigorous preprocessing and model training on financial datasets, the results show effective segmentation of customers according to their credit risk levels. The models enable personalized financial product recommendations, including tailored interest rates and guarantees. The findings demonstrate the statistical robustness of Bayesian approaches and their ability to deliver interpretable solutions for credit risk assessment. This approach supports strategic decision-making by aligning banking offers with individual risk profiles, ultimately contributing to risk mitigation and enhanced customer relationship management. Keywords: Bayesian inference, Bayesian neural networks (BNNs), Credit risk prediction, Customer segmentation, Naive Bayes classifier. 1. Introduction Banks play a crucial role in global credit risk evaluation, which is essential for financial stability and effective lending practices. According to the Basel Committee on Banking Supervision [1] credit risk is defined as the potential that a borrower or counterparty will fail to meet its obligations under agreed terms. To assess this risk, banks rely on both quantitative financial data and qualitative strategic factors. Regulatory frameworks such as the ECB’s Supervisory Review and Evaluation Process (SREP) adopt a dual approach, combining quantitative exposure analysis with qualitative assessments of internal risk management systems, including the validation of Expected Credit Loss (ECL) models [2]. Basel III further enhances this framework through the Internal Ratings-Based (IRB) approach, which allows banks to develop tailored models for different borrower profiles and portfolio types, using techniques like Value at Risk (VaR) to estimate potential losses [3]. Technological advances have significantly transformed credit risk assessment. While traditional statistical methods like logistic regression remain relevant, they are now complemented by machine learning models such as decision trees, neural networks, and Bayesian classifiers, which integrate financial data with qualitative insights to improve default prediction and enable early warning systems [4]. Credit risk grading systems are especially important for large banks, as they help categorize loans by risk level, influencing underwriting decisions, loan terms, portfolio management, and reserve requirements. The Current Expected Credit Losses (CECL) standard emphasizes the importance of segmentation based on grading to accurately forecast expected losses, Macias [5]. Ziadi Ben Fadhel [6] explores the application of predictive intelligence in banking to anticipate customer behavior and https://orcid.org/0009-0007-1860-4725 https://orcid.org/0000-0003-3915-9396 https://orcid.org/0009-0003-4125-6360 84 Edelweiss Applied Science and Technology ISSN: 2576-8484 Vol. 9, No. 10: 83-103, 2025 DOI: 10.55214/2576-8484.v9i10.10344 © 2025 by the authors; licensee Learning Gate improve strategic decision-making. The study emphasizes the use of Bayesian inference models, specifically Naive Bayes classifiers and Bayesian Neural Networks (BNNs), to estimate default probabilities based on socio-economic variables. Through rigorous preprocessing and model training, the research demonstrates how these probabilistic approaches enable effective customer segmentation by credit risk level, allowing for personalized financial recommendations. This contribution reinforces the relevance of Bayesian methods in financial analytics and supports their integration into customer relationship management frameworks. This study focuses on Bayesian modeling techniques, which offer a probabilistic framework to capture uncertainty in financial risk assessment. It investigates the practical application of Bayes’ theorem to predict credit defaults and guide marketing and financial decisions, using two key models: the Naive Bayes classifier and Bayesian Neural Networks (BNNs). Recent research by Shakurov [7] demonstrates the effectiveness of Bayesian networks in forecasting credit risk, while Shakurov [7] highlights the potential of neural models in adapting to complex financial environments. The research aims to analyze the theoretical foundations of Naive Bayes, apply it to real-world data, evaluate its performance, and compare it with BNNs to segment clients and propose targeted marketing strategies. 2. Literature Review Customer segmentation is widely recognized as a fundamental strategic tool in both marketing and financial services, allowing institutions to customize offerings and communications according to distinct client profiles. Anderson [8] highlights that segmentation in credit risk management enhances the precision of risk assessments and ensures that product parameters, such as loan rates and repayment terms, are appropriately aligned with customer risk profiles. This process reflects core marketing principles, whereby segmentation increases the relevance and appeal of services for diverse customer segments. Building on this, Gu et al. [9] proposed LASCA (Large-Scale Stable Customer Segmentation Approach) to overcome the instability and inconsistency issues common in traditional segmentation methods. Implemented within Alipay’s credit system, LASCA demonstrates superior stability and reliability, thereby supporting more accurate credit risk evaluations and informed lending decisions. This exemplifies how advanced segmentation techniques contribute to operational effectiveness in financial institutions. From a managerial viewpoint, Kaur et al. [10] assert that segmentation based on customer loyalty and switching intentions is critical for differentiating between “true loyals” and “spurious stayers.” Their research emphasizes the significance of relational factors such as trust, satisfaction, and switching barriers in influencing customer retention strategies. Understanding these behavioral dimensions enables financial institutions to tailor interventions for enhancing loyalty and reducing churn. Collectively, these studies illustrate the multifaceted value of customer segmentation: operationally, it refines risk management and product customization, while strategically, it empowers marketing efforts through personalized campaigns, improved customer retention, and more efficient resource allocation. These segmentation insights naturally lead to the exploration of classification methods, such as the Naive Bayes classifier, which has shown strong performance despite its simplifying assumptions. The Naive Bayes classifier, despite its foundational assumption of conditional independence among features, has demonstrated strong performance in binary classification tasks such as credit scoring. Originally developed for applications like spam filtering and text categorization, it has proven to be surprisingly robust in financial contexts. Hounnou [11] showed that, when applied to well- preprocessed data, Bayesian methods, including Naive Bayes classifiers and Bayesian Neural Networks (BNNs), offer statistically robust approaches for predicting bank customer default based on socio- economic factors. These models leverage Bayes’ theorem and conditional independence to provide interpretable probabilistic predictions, optimized through modern Python implementations such as scikit-learn and TensorFlow Probability. As demonstrated by Ziadi and Gafsi [12], this Bayesian 85 Edelweiss Applied Science and Technology ISSN: 2576-8484 Vol. 9, No. 10: 83-103, 2025 DOI: 10.55214/2576-8484.v9i10.10344 © 2025 by the authors; licensee Learning Gate framework enhances credit risk segmentation and supports personalized financial product recommendations, aiding strategic decision-making in the banking sector. Naive Bayes can rival more complex models in terms of predictive accuracy. This leads to the first hypothesis: Naive Bayes provides a reasonably accurate estimate of credit default risk despite its strong independence assumptions. Bayesian Neural Networks (BNNs) extend traditional neural architectures by treating weights as probability distributions rather than fixed parameters. This probabilistic approach allows for a more nuanced quantification of uncertainty, which is particularly valuable in high-stakes domains like lending. Gu et al. [9] demonstrated that BNNs outperform classical neural networks in terms of calibration and reliability, especially in sensitive fields such as medicine and finance. Thus, the second hypothesis is: the inclusion of relevant financial indicators such as income, debt levels, credit history, and domain-specific financial ratios has been shown to significantly enhance the performance of credit risk prediction models. These variables provide deeper insights into borrower behavior and financial stability, allowing models to capture more complex patterns. Therefore, the third hypothesis is: incorporating financial indicators and ratios significantly improves the accuracy and reliability of credit risk prediction models. Data quality plays a critical role in the performance of machine learning models. Techniques such as handling missing values, normalization, and de-duplication directly affect the model’s ability to generalize and produce accurate predictions. Poor data quality can introduce bias, reduce model robustness, and lead to misleading outcomes. Accordingly, the fourth hypothesis is: Data quality has a direct impact on the predictive accuracy and generalizability of credit risk models. 3. Mathematical Foundations of the Naive Bayes Model This paragraph presents the mathematical foundations of the Naive Bayes model, detailing its probabilistic assumptions, formal structure, and the underlying principles that govern its classification capabilities. 3.1. Preliminaries: Conditional Probability and Bayes’ Theorem Let A and B be two events in a probability space Ω. The conditional probability of A given B is defined as: The conditional probability of event A given event B is defined as: P(A | B) = P(A ∩ B) / P(B) (1) Bayes’ theorem allows the inversion of conditional probabilities: P(A | B) = P(B | A) · P(A) / P(B) (2) Bayesian inference is about fine-tuning our expectations. It helps us reassess how likely we think event A is when we encounter new evidence B. This concept is incredibly useful in supervised classification. It enables us to determine the likelihood that someone belongs to a specific category based on the characteristics we can observe. 3.2. Naive Bayes Model Formulation Let Y ∈ Y be a discrete random variable representing the class label (e.g., default or no default), and let X = (X1, X2, . . . , Xn) ∈ Rn be a feature vector. The conditional probability of event A given event B is defined as: P(A | B) = P(A ∩ B) / P(B) (3) Bayes’ theorem allows the inversion of conditional probabilities: P(A | B) = P(B | A) · P(A) / P(B) (4) We aim to estimate the posterior probability of a class label given a feature vector: 86 Edelweiss Applied Science and Technology ISSN: 2576-8484 Vol. 9, No. 10: 83-103, 2025 DOI: 10.55214/2576-8484.v9i10.10344 © 2025 by the authors; licensee Learning Gate P(Y = y | X = x) (5) Using Bayes’ theorem, the posterior probability is expressed as: P(Y = y | x) = P(x | Y = y) · P(Y = y) / P(x) (6) Assuming conditional independence among features, the likelihood can be factorized as: P(x | Y = y) = ∏ P(xᵢ | Y = y) (7) Substituting this into Bayes’ theorem yields the posterior probability: P(Y = y | x) ∝ P(Y = y) · ∏ P(xᵢ | Y = y) (8) The predicted class ŷ for a new instance x is the one that maximizes the posterior probability, known as the Maximum A Posteriori (MAP) decision rule: ŷ = arg max₍y∈Y₎ P(Y = y) · ∏ P(xᵢ | Y = y) (9) In the Gaussian Naive Bayes variant, each feature xᵢ conditioned on the class is assumed to follow a normal distribution: xᵢ | Y = y ∼ N (μᵢ,y, σ²) (10) This assumption leads to the following conditional likelihood for Gaussian Naive Bayes: P(xᵢ | Y = y) = (1 / √(2πσ²)) · exp (−(xᵢ − μᵢ,y)² / (2σ²)) (11) 3.3. Bayesian Neural Networks Bayesian Neural Networks (BNNs) are a probabilistic extension of classical neural networks, designed to incorporate uncertainty directly into model parameters. Instead of learning fixed values for weights, BNNs treat each weight as a random variable with an associated probability distribution. This allows for more robust predictions and better quantification of uncertainty, an essential feature in high- stakes applications such as credit scoring, medical diagnosis, and risk assessment. 3.4. Motivation and Bayesian Framework In conventional (frequentist) neural networks, the learning process involves finding a set of weight parameters θ that minimizes a loss function (e.g., mean squared error or cross-entropy). This results in point estimates of the weights, ignoring uncertainty in model parameters, known as epistemic uncertainty. In Bayesian neural networks, the posterior distribution over the weights given the observed training data D is estimated using Bayes’ theorem as follows: p(θ | D) = [p(D | θ) · p(θ)] / p(D) (12) Where: p(θ) is the prior distribution over the weights. p(D | θ) is the likelihood of the data given the weights. p(θ | D) is the posterior distribution over the weights. p(D) is the marginal likelihood or model evidence. This Bayesian approach allows the model to capture both prior knowledge and observed evidence, resulting in more principled learning and inherent regularization. 3.5. Prediction with a BNN Once the posterior distribution p(θ|D) is estimated, predictions for a new input x∗ are made by averaging over all possible weight configurations, weighted by their posterior probability. This is mathematically expressed as: 87 Edelweiss Applied Science and Technology ISSN: 2576-8484 Vol. 9, No. 10: 83-103, 2025 DOI: 10.55214/2576-8484.v9i10.10344 © 2025 by the authors; licensee Learning Gate (13) However, this integral is analytically intractable for deep neural networks due to the complexity of the posterior. Therefore, approximate inference methods are used. 3.6. Common Approximation Methods 3.6.1. Advantages of BNNs Monte Carlo sampling is a method used to estimate the predictive distribution by drawing multiple samples θ₁, θ₂, ..., θ_k from the posterior distribution or its approximation. The final prediction is obtained by averaging the outputs over these sampled weights, which helps capture uncertainty in the model's predictions. p(y* | x*, D) ≈ (1 / k) ∑_(i=1)^(k) p(y* | x*, θ_i) (14) Bayesian Neural Networks (BNNs) present a powerful alternative to classical neural networks by incorporating uncertainty directly into their predictions. This enables confidence-aware decision- making, which is particularly valuable in risk-sensitive domains. Their probabilistic nature also provides natural regularization, reducing overfitting in small datasets, while enhancing robustness and interpretability. However, BNNs face challenges such as high computational demands, implementation complexity, and sensitivity to prior specification. Despite these limitations, BNNs are widely applied in fields where uncertainty is critical, including medicine, finance, autonomous systems, time series forecasting, and explainable AI, offering models that not only predict but also quantify their confidence. 4. Methodology The methodology begins with thorough data cleaning, including handling missing values, removing duplicates, and encoding categorical variables. The dataset, sourced from Kaggle, contains 6,484 loan applications described by 15 demographic and financial features. Exploratory Data Analysis (EDA) was conducted to uncover variable distributions and relationships. Due to moderate class imbalance, advanced metrics like ROC AUC and F1-score were prioritized over simple accuracy. Table 1. Descriptive statistics for all dataset features. Feature Mean Std. Min. 25% Median 75% Max. Person Age 27.75 6.35 20.00 23.00 26.00 30.00 100.00 Person Income ($) 66091. 64 62015.58 4000.00 38542.00 55000.00 79218.00 60000.00 Home Ownership 1.68 1.43 0.00 0.00 3.00 3.00 3.00 Employment Length 4.79 4.09 0.00 2.00 4.00 7.00 123.00 Loan Intent 2.53 1.73 0.00 1.00 3.00 4.00 5.00 Loan Grade 1.22 1.17 0.00 0.00 1.00 2.00 6.00 Loan Amount ($) Loan Interest Rate (%) Loan Status 9593.85 11.02 0.22 6322.73 3.08 0.41 500.00 5.42 0.00 5000.00 8000.00 8.49 11.01 0.00 0.00 12250.00 35000.00 13.11 23.22 0.00 1.00 Loan-to-Income 0.17 0.11 0.00 0.09 0.15 0.23 0.83 Default on File 0.18 0.38 0.00 0.00 0.00 0.00 1.00 Credit History (yrs) 5.81 4.06 2.00 3.00 4.00 8.00 30.00 As seen above in Table 1, some variables exhibit high variability (e.g., income and loan amount), 88 Edelweiss Applied Science and Technology ISSN: 2576-8484 Vol. 9, No. 10: 83-103, 2025 DOI: 10.55214/2576-8484.v9i10.10344 © 2025 by the authors; licensee Learning Gate while others, like loan status, are binary. To better understand the distributions, we include boxplots for several key financial features. 4.1. Correlation Analysis A correlation matrix was computed for the numerical variables in the dataset. As shown in Figure 1 and 2, some features, such as loan amount and loan percent income, exhibit moderate correlation, while most other features remain relatively independent. This suggests a low risk of multicollinearity in model training. Figure 1 . Boxplots of key financial features. 89 Edelweiss Applied Science and Technology ISSN: 2576-8484 Vol. 9, No. 10: 83-103, 2025 DOI: 10.55214/2576-8484.v9i10.10344 © 2025 by the authors; licensee Learning Gate Figure 2. Correlation heatmap of numerical features. 4.2. Class Distribution Analysis To evaluate class balance, we analyzed the target variable (default vs. no default). An imbalance in the dataset was noted, which could bias model learning in Figure 3. Figure 3. Distribution of default vs. non-default classes. 90 Edelweiss Applied Science and Technology ISSN: 2576-8484 Vol. 9, No. 10: 83-103, 2025 DOI: 10.55214/2576-8484.v9i10.10344 © 2025 by the authors; licensee Learning Gate 4.3. Advanced Financial Ratios Used To enrich the financial profile of each client and improve model performance, we computed eight key financial ratios. These ratios are widely used in credit risk analysis and corporate finance to assess liquidity, profitability, solvency, and operational efficiency. 4.3.1. Current Ratio (R1) Measures a firm’s ability to meet short-term obligations. A value above 1 indicates good liquidity. 4.3.2. Quick Ratio (R2) A stricter liquidity test that excludes inventory, which is less liquid than cash or receivables. 4.3.3. Debt-to-Equity Ratio (R3) Shows the extent to which a firm is financed by debt relative to shareholders’ capital. 4.3.4. Interest Coverage Ratio (R4) Indicates the firm’s ability to pay interest on outstanding debt. Values below 1 imply financial stress. 4.3.5. Return on Equity (ROE, R5) Evaluates the company’s ability to generate profits from shareholders’ investments. 4.3.6. Fixed Asset Turnover (R6) Reflects how effectively a firm uses its fixed assets to generate sales. 91 Edelweiss Applied Science and Technology ISSN: 2576-8484 Vol. 9, No. 10: 83-103, 2025 DOI: 10.55214/2576-8484.v9i10.10344 © 2025 by the authors; licensee Learning Gate 4.3.7. Financial Expenses to Revenue Ratio (R7) Measures how much of the firm’s revenue is consumed by financial expenses. 4.3.8. Short-Term Debt to Sales Ratio (R8) Captures the proportion of short-term borrowing relative to generated revenue. Each ratio provides unique insights into a company’s financial health: • Liquidity Ratios (R1-R2): Measure short-term financial stability. The current ratio (R1) evaluates overall liquidity, while the quick ratio (R2) provides a more conservative measure by excluding inventory. • Leverage Ratios (R3, R4): Assess capital structure and debt servicing capacity. The debt-to-equity ratio (R3) shows the financing mix, and interest coverage (R4) indicates earnings relative to interest obligations. • Profitability Ratios (R5, R6): Evaluate operational efficiency. Return on equity (R5) measures shareholder returns, while fixed asset turnover (R6) shows asset utilization. • Coverage Ratios (R7-R8): Examine cost structure and short-term obligations. These reveal how much income is consumed by financial expenses and short-term debt. These features were normalized using z-score standardization: z = x − µ /σ (15) Where µ is the mean, σ is the standard deviation of each ratio, and then integrated into both the Naive Bayes and BNN models to improve credit risk predictions. These ratios were calculated during the preprocessing phase using the calculate_ratios(df) function and were included as features in all machine learning models to enhance risk discrimination power. Figure 4 demonstrates their relative predictive importance in our models. 92 Edelweiss Applied Science and Technology ISSN: 2576-8484 Vol. 9, No. 10: 83-103, 2025 DOI: 10.55214/2576-8484.v9i10.10344 © 2025 by the authors; licensee Learning Gate Figure 4. Financial Ratios' impact on predictions. As illustrated in Figure 4, preprocessing and exploratory data analysis (EDA) transformed the raw data into a clean, structured dataset ready for modeling. We handled missing values, removed duplicates, normalized features, and encoded categorical variables. Visual and statistical analysis revealed key patterns, outliers, and correlations, guiding our understanding of credit risk factors. We also created new financial ratios to better capture stability, liquidity, and solvency. With this enriched dataset, we moved on to building and evaluating Bayesian credit risk models. 4.4. Bayesian Model Construction and Implementation This paragraph presents the implementation and evaluation of a credit risk prediction system using Bayesian learning approaches, including a Gaussian Naive Bayes classifier and a Bayesian Neural Network (BNN). The system demonstrates the effectiveness of probabilistic models in financial risk assessment. 4.5. System Architecture Overview The implementation consists of two main components: Data preprocessing: Handles data loading, feature engineering (including financial ratio calculations), categorical encoding, and standardization. Model Training: Implements both the Naive Bayes classifier and the BNN model using scikit-learn and PyTorch. 4.6. Naive Bayes Model Training As illustrated in listing 1, the Naive Bayes classifier is implemented using scikit-learn’s GaussianNB module, providing a simple probabilistic baseline with the assumption of feature independence. 93 Edelweiss Applied Science and Technology ISSN: 2576-8484 Vol. 9, No. 10: 83-103, 2025 DOI: 10.55214/2576-8484.v9i10.10344 © 2025 by the authors; licensee Learning Gate class Simple BNN ( nn. Module ): def __init__( self , input_size ): super( SimpleBNN , self). __init__ () self. fc1 = nn. Linear( input_size , 16) self. fc2 = nn. Linear (16 , 8) self. out = nn. Linear (8 , 1) def forward ( self , x): x = F. relu ( self. fc1 ( x)) x = F. relu ( self. fc2 ( x)) x = torch . sigmoid ( self. out( x)) return x nb = Gaussian NB () nb. fit( X_train , y_train ) joblib . dump ( nb , ’ naive_bayes_model . pkl’) Listing 1 : Training the Naive Bayes Classifier 4.6.1. BNN Model Architecture and Training As illustrated in Listing 2, the Bayesian Neural Network is implemented using PyTorch with the following architecture: Listing 2: BNN Architecture using PyTorch The training process shows consistent convergence, as illustrated in Figure 5: 94 Edelweiss Applied Science and Technology ISSN: 2576-8484 Vol. 9, No. 10: 83-103, 2025 DOI: 10.55214/2576-8484.v9i10.10344 © 2025 by the authors; licensee Learning Gate Figure 5. BNN training loss curve showing convergence over 500 epochs with no signs of overfitting 4.7. Model Evaluation Both models were evaluated using standard classification metrics, confusion matrices, and F1 scores. The comparative performance is shown in Figure 6. Figure 6. Performance comparison between models. 4.8. Detailed Classification Reports The performance of both models was evaluated using standard classification metrics. The Naive Bayes classifier achieved an overall accuracy of 80.18%, with strong results for the non-default class: Precision 0.89, Recall 0.85, and F1-score 0.87. However, its performance on the default class was more modest, with a Precision of 0.54, a Recall of 0.65, and an F1-score of 0.59, resulting in a weighted 95 Edelweiss Applied Science and Technology ISSN: 2576-8484 Vol. 9, No. 10: 83-103, 2025 DOI: 10.55214/2576-8484.v9i10.10344 © 2025 by the authors; licensee Learning Gate average F1-score of 0.81. In contrast, the Bayesian Neural Network (BNN) demonstrated superior performance, achieving an overall accuracy of 90.19%. For the non-default class, it reached Precision 0.91, Recall 0.97, and F1-score 0.94, while for the default class, it obtained Precision 0.88, Recall 0.64, and F1-score 0.74, leading to a weighted average F1-score of 0.90. The confusion matrices presented in Figure 7 provide a visual comparison of the classification performance for each model, highlighting the BNN’s enhanced ability to distinguish between default and non-default cases. The confusion matrices in Figure 7 reveal the detailed classification performance for each model: Figure 7 . Confusion matrices 4.9. Overfitting Analysis To assess potential overfitting, several monitoring strategies were employed throughout model training. These included tracking the training versus validation loss curves (Figure 8), evaluating performance metrics on unseen test data, and applying early stopping criteria. The Bayesian Neural Network (BNN) demonstrated stable learning behavior, with validation loss closely following training loss across 500 epochs, indicating no signs of overfitting. In comparison, the Naive Bayes classifier, while inherently simpler and more resistant to overfitting, showed slightly lower performance in predicting minority class instances (i.e., default cases), highlighting the trade-off between model complexity and sensitivity. The ROC curves in Figure 8 demonstrate the models' discrimination ability, with the BNN achieving superior area under the curve (AUC) metrics. 96 Edelweiss Applied Science and Technology ISSN: 2576-8484 Vol. 9, No. 10: 83-103, 2025 DOI: 10.55214/2576-8484.v9i10.10344 © 2025 by the authors; licensee Learning Gate Figure 8. Receiver Operating Characteristic curves, BNN vs Naive Bayes. 4.10. Financial Ratio Feature Importance Feature importance analysis 9 reveals that financial ratios significantly impact model performance: Figure 9 . Feature importance scores from the Naive Bayes model showing t h e top predictive features. 97 Edelweiss Applied Science and Technology ISSN: 2576-8484 Vol. 9, No. 10: 83-103, 2025 DOI: 10.55214/2576-8484.v9i10.10344 © 2025 by the authors; licensee Learning Gate As illustrated in listing 3, the predictive models in this study were enhanced by incorporating a set of key financial ratios that provide deeper insights into client financial health. These include liquidity ratios such as the current ratio and quick ratio, which assess short-term financial stability. Leverage ratios, including debt-to-equity and interest coverage, evaluate the firm’s capital structure and ability to service debt. Profitability ratios, like return on equity (ROE), measure the efficiency of generating profits from shareholder investments. Activity ratios, such as fixed asset turnover, reflect operational effectiveness in utilizing assets. Finally, coverage ratios, including the financial expenses ratio, help determine the proportion of revenue consumed by financial obligations. Together, these indicators significantly improve the model’s ability to differentiate risk levels and support more accurate credit assessments. Listing 3: Financial Ratio Calculation 4.11. Streamlit Web Application and Interface To enhance accessibility and usability of credit risk prediction models, an interactive web application was developed using Streamlit. This dashboard enables users to input personal and financial data, select between a Naive Bayes classifier or a Bayesian Neural Network (BNN), and instantly receive a default risk prediction. The app’s core objectives include collecting user data through an intuitive interface, automatically calculating key financial ratios, allowing model selection, and presenting both visual and textual summaries of the prediction. The user interface is structured with a sidebar for model selection and ratio overview, a main panel for entering personal and financial details, and a results section displaying the predicted default probability, recommended financial action, and the model used. Financial ratios such as Current Ratio, Quick Ratio, Debt-to-Equity, Interest Coverage, and ROE are computed automatically from user inputs. Prediction results are delivered clearly, indicating either high or low default risk, accompanied by a progress bar that visualizes the probability score. Strategic recommendations (e.g., reject or approve the loan) as illustrated in Figure 10: Key influencing factors (Naive Bayes only). 98 Edelweiss Applied Science and Technology ISSN: 2576-8484 Vol. 9, No. 10: 83-103, 2025 DOI: 10.55214/2576-8484.v9i10.10344 © 2025 by the authors; licensee Learning Gate Figure 10. Home view of the dashboard showing input fields and model selection Figure 11. Prediction results interface with model selection and probability gauge. As illustrated in Figure 11, financial ratios contribute significantly to predictive power. The PyTorch implementation demonstrates BNNs’ feasibility for credit risk. The Streamlit application provides an effective interface for real-world deployment. The comparative analysis between Bayesian Neural Networks (BNNs) and Naive Bayes models highlights distinct strengths aligned with different operational needs. BNNs demonstrated superior recall on default cases (0.65 vs 0.64), making them 99 Edelweiss Applied Science and Technology ISSN: 2576-8484 Vol. 9, No. 10: 83-103, 2025 DOI: 10.55214/2576-8484.v9i10.10344 © 2025 by the authors; licensee Learning Gate particularly suitable for risk-averse applications where identifying potential defaulters is critical. In contrast, the Naive Bayes model, with its faster computation, proves advantageous for rapid screening scenarios. Both models significantly benefited from the inclusion of financial ratio features, which emerged as key predictors of credit risk. Moreover, the deployment of a web interface effectively bridged the gap between theoretical model implementation and practical usability, enhancing accessibility for end-users. The evaluation validated all four hypotheses: H1: Naive Bayes delivers reasonable performance, achieving 80.18% accuracy despite its simplifying assumptions. H2: BNNs outperform Naive Bayes, reaching 90.19% accuracy and offering richer probabilistic insights. H3: Financial ratios enhance model performance, proving essential in both approaches. H4: Data quality directly influences outcomes, with preprocessing steps like handling missing values and feature scaling playing a pivotal role. Together, these findings underscore the value of Bayesian approaches in credit risk modeling, balancing predictive power, operational efficiency, and practical deployment. 4.12. Business Applications and Client Segmentation The predictions generated by our Bayesian models serve not only academic interest but also support real-world decision-making. In this paragraph, we explore how the model output can guide credit- related business strategies and personalized financial services. 4.13. Risk-Based Client Segmentation Based on the probability of default forecasts, customers are risk-categorized. Risk categorization helps financial institutions to adjust their offers and strategies in turn. Interpretation and Theoretical Support: Following the argument of Shakurov [7] and Macias [5], customers with a Debt-to-Income (DTI) ratio above 0.4 have a statistically greater chance of default. Our observation confirms this: high DTI customers are predominantly found in the predicted "High Risk" category. This discovery informs Basel III and CECL models that accommodate credit segmenting methods considering financial behavior rather than historic defaults [13]. 4.14. Risk Segments As illustrated in Figure 12, low risk (default probability less than 0.3): reliable clients are eligible for larger loans and lower interest rates. Moderate risk (default probability between 0.3 and 0.6): Acceptable clients with medium loan limits and standard guarantees. High Risk (default probability greater than 0.6): Risky profiles requiring guarantees, higher interest rates, or potential rejection. 100 Edelweiss Applied Science and Technology ISSN: 2576-8484 Vol. 9, No. 10: 83-103, 2025 DOI: 10.55214/2576-8484.v9i10.10344 © 2025 by the authors; licensee Learning Gate Figure 12. Client segmentation by predicted default probability. 4.15. Personalized Credit Offers Using the output probabilities from Naive Bayes or BNN, loan offers can be dynamically adapted. This enables financial institutions to personalize offers, increasing client satisfaction while minimizing risk. 4.16. Demonstration Figure 1 3 . Example of personalized offers by risk profile. 101 Edelweiss Applied Science and Technology ISSN: 2576-8484 Vol. 9, No. 10: 83-103, 2025 DOI: 10.55214/2576-8484.v9i10.10344 © 2025 by the authors; licensee Learning Gate A client with a risk score of 15% was offered: $20,000 at 9.5% interest, no guarantee required. A client with a risk score of 65% can be offered: $8,000 at 15% interest, with a guarantor. Such segmentation, as shown in fig 13 based on Bayesian credit risk modeling, offers powerful advantages across marketing, financial strategy, and operational efficiency. By categorizing clients into risk bands, marketing teams can tailor their outreach: low-risk individuals are targeted with premium financial products, moderate- risk clients receive educational content on credit optimization, and high-risk profiles are flagged for manual review to prevent fraud and over-indebtedness. These segments can be seamlessly integrated into personalized communication channels such as email campaigns, product recommendation engines, and push notifications. On the financial side, model-driven segmentation enables banks to reduce losses from loan defaults, increase approval rates for qualified applicants, and improve client retention through fair and customized pricing. The estimated benefits are substantial: a reduction in the average default rate from 17% to 10%, a potential 12% increase in approved loans, and significant operational cost savings due to fewer manual checks and more efficient pre-screening. Altogether, this approach enhances profitability, strengthens risk management, and fosters deeper customer engagement. 5. Results Hypothesis 1: The Naive Bayes classifier provides a reasonably accurate estimate of credit default risk despite its strong independence assumptions. The results confirm this hypothesis. Although the model relies on a simplifying assumption of conditional independence among features, Naive Bayes has demonstrated robust performance in binary classification tasks. Its effectiveness in credit scoring, as highlighted by Hounnou [11], stems from proper data preprocessing and relevant feature selection. Ziadi and Gafsi [12] also showed that this model, despite its simplicity, can rival more complex architectures when applied to well-structured financial data. In this study, it served as a reliable baseline, delivering interpretable and trustworthy predictions, validating its relevance in financial environments. Hypothesis 2: Bayesian Neural Networks (BNNs) outperform classical neural networks in terms of accuracy and uncertainty quantification. This hypothesis is also validated. BNNs clearly outperformed in predictive performance and uncertainty management. By treating weights as probabilistic distributions, they allow for better risk calibration, which is crucial in credit decision-making. Gu et al. [9] demonstrated that BNNs surpass traditional neural networks in reliability, particularly in sensitive domains such as medicine and finance. The findings of this study confirm that BNNs produce richer and more informative outputs, reinforcing their utility in high-stakes environments like banking. Hypothesis 3: Incorporating financial indicators and ratios significantly improves the accuracy and reliability of credit risk prediction models. Empirical results strongly support this hypothesis. The inclusion of ratios such as debt-to-income and installment-to-income enhanced the explanatory power of the models. Despite some missing data, these variables improved both overall performance and interpretability. As noted by Hounnou [11], integrating relevant socio-economic variables enables Bayesian models to better segment clients and anticipate default behavior. These findings align with Ziadi Ben Fadhel [6], who emphasized that financial ratios are essential levers for capturing the complexity of borrower behavior. Hypothesis 4: Data quality has a direct impact on the predictive accuracy and generalizability of credit risk models. Data quality has direct implications for model predictive accuracy and credit risk model generalizability. Emphasis placed on data preprocessing in the study supports this hypothesis. Missing value handling, normalization, and de-duplication were critical to guarantee model stability. Poor- quality data could have introduced bias or jeopardized generalizability. Ellouze [14] refers in her credit risk prediction using behavioral characteristics in an AI chatbot environment, that precise data 102 Edelweiss Applied Science and Technology ISSN: 2576-8484 Vol. 9, No. 10: 83-103, 2025 DOI: 10.55214/2576-8484.v9i10.10344 © 2025 by the authors; licensee Learning Gate preprocessing exerts an impressive impact on the performance and accuracy of models. The study reveals that implementing such data preprocessing processes is crucial in attaining correct credit risk predictions, particularly in utilizing AI-based applications. Gu et al. [9] also underscored that probabilistic models, despite being robust, are sensitive to the quality of input data. The research shows that effectively prepared data are a prerequisite for valid and operational forecasts, especially in regulated and high-stakes settings like credit assessment. 6. Conclusion The integration of Bayesian modeling into credit risk prediction marks a significant advancement in both forecasting accuracy and strategic financial decision-making. Unlike traditional models that yield deterministic outputs, Bayesian approaches generate probabilistic predictions that quantify uncertainty as an essential feature in high-stakes domains such as lending and credit evaluation. This enables financial institutions to move beyond binary approval/rejection decisions and adopt more nuanced, risk- aware strategies. This study explored two complementary Bayesian model classes: the Gaussian Naive Bayes classifier, valued for its simplicity and interpretability, and Bayesian Neural Networks (BNNs), known for their robust probabilistic reasoning and uncertainty quantification. Our findings demonstrate the practical utility of both models, with Naive Bayes serving as a solid baseline and BNNs delivering superior predictive performance and richer, more informative outputs. A key contribution to this research was the segmentation of clients based on their predicted default probabilities. This approach allowed institutions to tailor credit strategies by adjusting interest rates, collateral requirements, or approval thresholds according to each applicant’s risk profile. Such personalization not only enhances profitability through optimized credit allocation but also reduces default risk by enabling more informed lending decisions. The study also emphasized the importance of incorporating financial ratios such as debt-to-income and installment-to-income, which proved to be strong predictors of default behavior. Despite some missing data, the available ratios significantly improved model performance and interpretability. Furthermore, the probabilistic outputs of Bayesian models support enhanced scenario analysis, stress testing, and regulatory compliance. By combining meticulous data preprocessing, rigorous theoretical modeling, and sound business judgment, this research demonstrates how Bayesian techniques can produce credit scoring systems that are both operationally effective and transparent. Future work may extend these systems to real-time credit scoring from streaming data and deploy them on GDPR-compliant platforms with integrated explainability tools, fostering greater accountability, trust, and responsiveness in automated credit evaluation. In addition to its technical contributions, this research offers important managerial implications, particularly in the field of strategic marketing. Segmenting clients based on their predicted default probabilities not only optimizes credit decision-making but also enables the personalization of marketing offers according to each risk profile. Financial institutions can thus develop targeted campaigns, tailor promotional messages, and offer financial products that are better aligned with each segment, thereby enhancing customer satisfaction and loyalty. This approach supports more efficient allocation of marketing resources by focusing efforts on the most profitable or promising segments. It also allows institutions to anticipate customer behavior and implement retention or risk mitigation strategies. By integrating insights from Bayesian models into CRM systems and marketing automation platforms, organizations can improve responsiveness, relevance, and operational efficiency. Beyond credit risk management, the client segmentation enabled by Bayesian modeling holds substantial value for marketing and customer relationship strategies. By identifying distinct risk profiles, financial institutions can design tailored marketing campaigns that align with the financial behavior and needs of each segment. For instance, low-risk clients may be 103 Edelweiss Applied Science and Technology ISSN: 2576-8484 Vol. 9, No. 10: 83-103, 2025 DOI: 10.55214/2576-8484.v9i10.10344 © 2025 by the authors; licensee Learning Gate offered premium financial products with favorable terms, while higher-risk segments could receive educational content or alternative financial solutions aimed at improving creditworthiness. This targeted approach enhances customer engagement, increases conversion rates, and fosters long-term loyalty. Moreover, integrating predictive insights into marketing analytics allows institutions to anticipate customer needs, personalize communication, and allocate resources more efficiently, ultimately driving both profitability and customer satisfaction. Transparency: The authors confirm that the manuscript is an honest, accurate, and transparent account of the study; that no vital features of the study have been omitted; and that any discrepancies from the study as planned have been explained. This study followed all ethical practices during writing. Copyright: © 2025 by the authors. This open-access article is distributed under the terms and conditions of the Creative Commons Attribution (CC BY) license (https://creativecommons.org/licenses/by/4.0/). References [1] Basel Committee on Banking Supervision, "Principles for the management of credit risk," Bank for International Settlements, 1999. https://www.bis.org/publ/bcbs54.htm [2] European Central Bank, "Credit risk SREP methodology," ECB Banking Supervision, 2024. https://www.bankingsupervision.europa.eu/activities/srep/2024/html/ssm.srep202412_creditrisksrepmethodology. en.html [3] Basel Committee on Banking Supervision, "Basel III: A global regulatory framework for more resilient banks and banking systems," Bank for International Settlements, 2011. https://www.bis.org/bcbs/basel3.htm [4] U. Soni and D. A. G. Gordhan Jethava, "Latest advancements in credit risk assessment with machine learning and deep learning techniques," Cybernetics and Information Technologies, vol. 24, no. 4, pp. 22-44, 2024. https://doi.org/10.2478/cait-2024-0034 [5] M. Macias, "Credit risk grading systems: Observations from a horizontal assessment," Supervisory Insights, vol. 15, no. 1, pp. 24–31, 2018. [6] N. Ziadi Ben Fadhel, "Leveraging predictive intelligence to understand banking customer behavior," International Journal of Innovative Research and Scientific Studies, vol. 8, no. 5, pp. 1771–1788, 2025. [7] A. A. Shakurov, "Modern approaches to credit risk assessment in banking," Economics: Yesterday, Today and Tomorrow, vol. 15, no. 12, p. 20, 2024. https://doi.org/10.36871/ek.up.p.r.2024.12.15.020 [8] R. Anderson, The credit scoring toolkit: Theory and practice for retail credit risk management and decision automation. Oxford, UK: Oxford University Press, 2007. [9] Y. Gu et al., "A large-scale stable customer segmentation approach to credit risk assessment," in Proceedings of the 30th ACM SIGKDD Conference on Knowledge Discovery and Data Mining, 2024, pp. 5006-5017, doi: https://doi.org/10.1145/3637528.3671550. [10] P. Kaur, A. Sharma, and R. Mahajan, "Customer segmentation based on loyalty and switching intentions: Implications for banks," Vision: The Journal of Business Perspective, vol. 18, no. 4, pp. 309–317, 2014. [11] L. Hounnou, "Harnessing the power of machine learning, Bayesian neural networks, and spatial analysis in modeling a predictive system, credit risk, and organizational performance across continents," Doctoral Dissertation, University of Illinois Urbana-Champaign IDEALS, 2024. https://hdl.handle.net/2142/125604 [12] N. Ziadi and N. Gafsi, "Leveraging AI to uncover the effects of pivotal moments in the LIBOR framework and its evolution on the banking industry," Revue Internationale de Recherche Innovante et d'études Scientifiques, vol. 8, no. 2, pp. 886-896, 2025. [13] M. Bhati, "Credit risk assessment guide: Strategies for effective credit risk monitoring," Nected, 2025. https://www.nected.ai/blog/credit-risk-assessment [14] N. Z. Ellouze, "Credit risk prediction using behavioral features in an AI chatbot interface," International Journal of Innovative Research and Scientific Studies, vol. 8, no. 6, pp. 2099–2120, 2025. https://doi.org/10.53894/ijirss.v8i6.10083 https://creativecommons.org/licenses/by/4.0/ https://www.bis.org/publ/bcbs54.htm https://www.bankingsupervision.europa.eu/activities/srep/2024/html/ssm.srep202412_creditrisksrepmethodology.en.html https://www.bankingsupervision.europa.eu/activities/srep/2024/html/ssm.srep202412_creditrisksrepmethodology.en.html https://www.bis.org/bcbs/basel3.htm https://doi.org/10.2478/cait-2024-0034 https://doi.org/10.36871/ek.up.p.r.2024.12.15.020 https://doi.org/10.1145/3637528.3671550 https://hdl.handle.net/2142/125604 https://www.nected.ai/blog/credit-risk-assessment https://doi.org/10.53894/ijirss.v8i6.10083