A Machine Learning project developed as part of the CodeAlpha Machine Learning Internship. This project predicts whether a customer is creditworthy based on their financial information using various classification algorithms.
Financial institutions need to assess whether a customer is likely to repay a loan. This project builds a Credit Scoring Model that classifies applicants into Good Credit or Bad Credit categories using machine learning.
The project compares multiple classification algorithms and selects the best-performing model based on evaluation metrics.
- Predict customer creditworthiness.
- Compare multiple Machine Learning models.
- Evaluate models using standard classification metrics.
- Deploy the best model using a Streamlit web application.
CodeAlpha_CreditScoringModel/
│
├── dataset/
│ └── german_credit_data.csv
│
├── models/
│ ├── model.pkl
│ ├── scaler.pkl
│ └── feature_columns.pkl
│
├── src/
│ ├── config.py
│ ├── preprocessing.py
│ ├── train.py
│ ├── predict.py
│ └── utils.py
│
├── app.py
├── notebook.ipynb
├── requirements.txt
├── README.md
├── LICENSE
└── .gitignore
Dataset: German Credit Dataset
Target Column
- Creditability
- 1 = Good Credit
- 0 = Bad Credit
- Account Balance
- Credit Duration
- Previous Payment Status
- Purpose
- Credit Amount
- Savings
- Employment Length
- Installment Percentage
- Age
- Occupation
- Number of Credits
- Telephone
- Foreign Worker
- and more...
- Python
- Pandas
- NumPy
- Scikit-learn
- Matplotlib
- Streamlit
- Joblib
The following models were trained and compared:
- Logistic Regression
- Decision Tree
- Random Forest
- Gradient Boosting
- AdaBoost
- Extra Trees
- K-Nearest Neighbors (KNN)
- Support Vector Machine (SVM)
- Gaussian Naive Bayes
The model with the highest ROC-AUC score is automatically selected and saved.
The models were evaluated using:
- Accuracy
- Precision
- Recall
- F1-Score
- ROC-AUC Score
- Confusion Matrix
git clone https://github.com/simhadris17012005/CodeAlpha_CreditScoringModel.git
cd CodeAlpha_CreditScoringModelpip install -r requirements.txtpython src/train.pystreamlit run app.pyThe Streamlit application allows users to:
- Enter customer details
- Predict creditworthiness
- View prediction confidence
Example Prediction:
Prediction : Good Credit
Confidence : 94.81%
- Hyperparameter tuning
- Cross-validation
- Feature importance visualization
- SHAP explainability
- Better Streamlit UI with dropdown menus
- Cloud deployment
simhadri
Machine Learning Intern – CodeAlpha
This project is licensed under the MIT License.