AB.Credit risk is shaped by the cost of errors, not accuracy alone.All projects

Financial Analytics

Credit Risk Prediction

An end-to-end classification and reporting project covering preparation, imbalance-aware comparison, threshold selection, and credit-default risk communication.

Imbalanced ClassificationXGBoostThreshold TuningPR-AUC / F1Analytical Reporting
View source repository
Credit Risk Prediction interface

Why it matters

Frames model errors around missed defaults and unnecessary false alarms.

My role

Data scientist and analytical report author

  1. 01Cleaned financial and demographic variables, separated validation and test evidence, and prepared an imbalance-aware default-classification workflow.
  2. 02Compared Logistic Regression, Random Forest, and XGBoost with ROC, precision-recall, confusion matrices, F1, precision, and recall rather than relying on accuracy alone.
  3. 03Optimized the probability threshold around missed-default and false-alarm trade-offs, then produced a structured analytical report explaining evidence and limitations.
01

Situation

Credit-default classifiers are often judged on accuracy alone, which hides the real cost imbalance between missed defaults and unnecessary false alarms.

02

Task

Build an imbalance-aware default-classification workflow that compares models on the metrics that actually matter for lending decisions, then communicates the trade-offs in decision language.

03

Action

  • Financial and demographic variables were cleaned, encoded, and validated with a protected train, validation, and test split for an imbalanced default-classification problem.
  • Interpretable Logistic Regression establishes the baseline before Random Forest and XGBoost test nonlinear relationships and feature interactions.
  • Precision-recall curves, ROC curves, F1, class-level precision and recall, and confusion matrices expose performance on defaults instead of letting the majority class dominate the conclusion.
  • The operating threshold is tuned on validation evidence to balance missed defaults against false alarms, then assessed on untouched test data.
04

Result

The final report explains model trade-offs and limitations in decision language rather than a metric dump, demonstrating both the analytical work and the ability to communicate it to a non-technical audience.

Technical implementation

How the solution was built.

Each layer connects an implementation choice to the decision or workflow it supports.

06 layers
LayerImplementationOperational purpose
Data preparationCleaning, encoding and validation of financial and demographic variablesCreate a consistent modelling dataset while protecting test evidence
Class imbalanceImbalance-aware training and evaluation focused on the default classPrevent majority-class accuracy from hiding missed defaults
Model comparisonLogistic Regression, Random Forest and XGBoostCompare an interpretable baseline with nonlinear ensemble models
EvaluationROC, precision-recall, F1, class precision, recall and confusion matricesMeasure both discrimination and the practical cost of classification errors
Threshold selectionValidation-based probability cutoff optimizationBalance missed defaults against unnecessary false alarms
ReportingStructured analytical report covering method, evidence, trade-offs and limitationsCommunicate model results in decision language rather than metric lists