This project is a machine learning-based web application that predicts the likelihood of credit card approval for a customer based on their personal and financial details. It leverages a Random Forest Classifier trained on historical credit and application records.
Many financial institutions face challenges in assessing credit card applications quickly and accurately. This project provides a predictive solution using machine learning to automate and improve this process.
The application offers:
- A user-friendly web interface (built using Flask)
- Real-time predictions
- Visual insights into model performance
├── Dataset/
│ ├── application\_record.csv
│ └── credit\_record.csv
│
├── Images/
│ ├── Decision Tree\_plot.png
│ ├── Logistic Regression\_plot.png
│ ├── Random Forest\_plot.png
│ ├── XGBoost\_plot.png
│ └── model\_comparison\_metrics.png
│
├── models/
│ ├── Random\_Forest\_best\_model.pkl
│ ├── best\_threshold.txt
│ └── train\_columns.pkl
│
├── notebooks/
│ ├── 1\_Visualizing\_and\_analyzing\_data.ipynb
│ ├── 2\_Data\_preprocessing.ipynb
│ ├── 3\_Model\_building.ipynb
│ └── 4\_Prediction.ipynb
│
├── static/
│ ├── credits-card.jpg
│ ├── landing_page.jpg
│ ├── input_page.png
│ ├── result_page.png
│
├── templates/
│ ├── landing\_page.html
│ ├── form.html
│ └── result.html
│
├── app.py
├── requirements.txt
├── LICENSE
├── .gitignore
└── README.md
-
Clone the repository
git clone https://github.com/your-username/credit-card-approval-prediction.git cd credit-card-approval-prediction -
Create a virtual environment (optional but recommended)
python -m venv venv source venv/bin/activate # On Windows: venv\Scripts\activate
-
Install dependencies
pip install -r requirements.txt
-
Run the Flask app
python app.py
-
Visit in browser: Navigate to http://127.0.0.1:5000 to use the application.
- Model Used: Random Forest Classifier
- Evaluation Metrics: Accuracy, F1 Score, Confusion Matrix
- Preprocessing: Handled using SMOTE, encoding, feature scaling
- Threshold Selection: Based on optimized F1 score
Located in the Images/ folder, these plots help analyze the performance of:
- Logistic Regression
- Decision Trees
- Random Forests
- XGBoost
- Model comparison metrics
landing_page.html: Landing page with a call-to-action to initiate predictionform.html: Takes user inputs for predictionresult.html: Displays prediction results and approval probability
- Rutuja Kumbhar - GitHub
This project is licensed under the MIT License. See the LICENSE file for more details.
If you have any questions or suggestions, feel free to reach out via GitHub or email.


