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

Data preparation

Financial and demographic variables were cleaned, checked, encoded, and prepared with a protected train, validation, and test workflow for an imbalanced default-classification problem.

02

Baseline & model comparison

Interpretable Logistic Regression establishes the baseline before Random Forest and XGBoost test nonlinear relationships and feature interactions.

03

Imbalance-aware evaluation

Precision-recall curves, ROC curves, F1, class-level precision and recall, and confusion matrices expose performance on defaults instead of allowing the majority class to dominate the conclusion.

04

Threshold selection

The operating threshold is tuned on validation evidence to balance capturing defaults against unnecessary false alarms, then assessed on untouched test data.

05

Reporting value

The final report explains model trade-offs and limitations in decision language, demonstrating both analytical work and structured communication.

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