AI-Powered Credit Risk Analyzer
A full-stack machine learning application that predicts borrower credit risk, explains the model prediction using SHAP, generates an AI-written assessment summary, and produces a downloadable PDF report.
Project Overview
This application uses the German Credit Risk dataset to classify applicants as low, medium, or high risk based on their financial and personal credit attributes.
The system includes:
- Data cleaning and feature engineering in Python
- Logistic Regression credit-risk classification model
- FastAPI backend for predictions and report generation
- React frontend dashboard
- SHAP-based model explanation
- AI-generated analyst summary
- Downloadable PDF assessment report
Technology Stack
Backend
- Python
- Pandas
- Scikit-learn
- FastAPI
- SHAP
- OpenAI API
- ReportLab
Frontend
- React
- Vite
- Axios
- CSS
Application Workflow
- User enters borrower details in the React dashboard.
- React sends the application data to the FastAPI backend.
- The saved machine learning model predicts bad credit risk probability.
- SHAP identifies factors increasing and reducing predicted risk.
- The AI summary converts technical output into readable business language.
- The user can download a PDF credit-risk assessment report.
Project Structure
Credit_Risk_Analyzer/
├── main.py
├── train_model.py
├── predict.py
├── requirements.txt
├── models/
├── processed/
├── data/
└── frontend/