How shanigarapusheshanth2007-wq/sdc-project-1 works
This repository implements a loan-risk prediction API: a client submits loan attributes to a FastAPI endpoint and receives an approval prediction, probability, and feature-influence explanation. At startup, the backend loads and cleans the configured loan dataset, removes rows without a target, splits the data, and loads a trained model. The prediction endpoint aligns submitted features to the model’s expected columns, predicts, and computes an explanation using the training data. The README is empty; the graph reflects the sampled backend code, and configured data/model files are not present in the tree.
Main entry points: main.py Prediction API · preprocessing.py Dataset loader · paths.py Data and model paths · cleaning.py Cleaning and encoding
Components 10
Prediction service
- Prediction API
BACKEND/main.py - Prediction response
BACKEND/main.py
Data preparation
- Dataset loader
BACKEND/SRC/preprocessing.py - Cleaning and encoding
BACKEND/SRC/cleaning.py - Train-validation-test split
BACKEND/SRC/splitting.py
Configuration and inputs
- Configured loan dataset
- Data and model paths
BACKEND/CONFIGS/paths.py
Inference and explanation
- Trained risk model
- Feature influence analysis
BACKEND/SRC/analysis.py
Other components
- Loan applicant client
Connections 12
- Loan applicant client → Prediction API: submits loan data
BACKEND/main.py - Prediction API → Dataset loader: loads dataset
BACKEND/main.py - Dataset loader → Data and model paths: reads data paths
BACKEND/SRC/preprocessing.py - Configured loan dataset → Dataset loader: provides rows
- Prediction API → Cleaning and encoding: preprocesses data
BACKEND/main.py - Prediction API → Train-validation-test split: splits data
BACKEND/main.py - Prediction API → Data and model paths: loads model path
BACKEND/main.py - Trained risk model → Data and model paths: located by
BACKEND/CONFIGS/paths.py - Prediction API → Trained risk model: loads and predicts
BACKEND/main.py - Prediction API → Feature influence analysis: requests explanation
BACKEND/main.py - Prediction API → Prediction response: returns prediction
BACKEND/main.py - Prediction response → Loan applicant client: sends response