How mehulcode12/advance_credit_risk_model_loan_prediction works
Project type and purpose
• This is a full-cycle credit-risk modeling application that trains an ML model on borrower/loan CSV data and then serves predictions via a Streamlit web UI.
• Key use case: ingest raw data → clean/engineer features → train & tune a logistic-regression model → serialize it → deploy as an interactive web app prioritizing recall for defaulters.
File structure
Top level:
• .devcontainer/… : development environment (VS Code + Docker)
• datasets/ : raw CSV data (bureau_data.csv, customers.csv, loans.csv)
• artifacts/ : serialized model artifact (model_data.joblib)
• main.py & prediction_helper.py : Streamlit app and inference logic
• requirements.txt : Python dependencies
• Untitled.ipynb : exploratory/training notebook
• images/ : screenshots & evaluation plots
Patterns & components:
– An offline “training pipeline” run in notebooks or scripts that reads from datasets/ → does EDA → feature engineering → Optuna tuning → saves model to artifacts/
– A “serving pipeline” in main.py + prediction_helper.py that loads model_data.joblib, accepts user inputs, applies same preprocessing, and runs inference in Streamlit.
– Devcontainer defines a reproducible environment for both training & serving.
README for additional insights
• Architecture described implicitly: data ingestion → preprocessing → modeling → deployment.
• Tech stack: Python, pandas, scikit-learn, imbalanced-learn (SMOTE-Tomek), Optuna, Streamlit, Docker/.devcontainer.
• Deployment target: Streamlit Cloud (external hosting service).