Loan Approval ML Pipeline
I built an end-to-end tabular ML pipeline: preprocessing, exploratory analysis, a five-model comparison, model selection, serialisation and a Streamlit app that serves the saved model.
- 01Applicant CSV
- 02ColumnTransformer encode + scale
- 03Five-model comparison
- 04Logistic Regression selected
- 05joblib model.pkl
- 06Streamlit prediction app
01Problem
Loan applications get reviewed manually and inconsistently, so the useful baseline question is how much of the approval decision a small tabular model can recover from applicant attributes alone.
02Implementation
- Wrapped preprocessing in a scikit-learn ColumnTransformer, one-hot encoding categorical columns and standard-scaling numeric ones, inside a Pipeline so the same transforms apply at inference.
- Compared Logistic Regression, SVM, Random Forest, Decision Tree and KNN on accuracy and F1.
- Selected Logistic Regression and serialised the fitted pipeline to model.pkl with joblib.
- Explored distributions, correlations and class balance in a notebook, which showed credit history dominating approval rates.
- Built a Streamlit app that loads the saved pipeline and predicts from user input.
03Models
- Logistic Regression
- Selected as the final model and serialised into the served pipeline.
- SVM, Random Forest, Decision Tree, KNN
- Compared against the baseline on accuracy and F1 during model selection.
04Input data
Tabular loan application records covering gender, marital status, dependents, income, loan amount and credit history, committed to the repository.
05Results
Runs end to end from raw CSV to a served model: the comparison selects Logistic Regression, the fitted pipeline is saved, and the Streamlit app predicts from it.
The repository reports Logistic Regression as the strongest model on accuracy and F1 but does not publish the numeric scores, so none are quoted here.
06Stack
07Visuals
Screenshot or architecture diagram to be added