This mini project addresses a classic use case in the banking sector: deciding whether to grant a loan to a customer based on various parameters. The app takes input data and uses a machine learning classification algorithm to assist banks in making informed decisions about lending money to a particular customer.
This diagram shows the number of steps involved in the development of this app.
The data used in the creation of the app consists of two CSV files named "train" and "test." The training set has 464 rows and 13 columns, while the test dataset has 123 rows and 13 columns.
In this step, we changed some of the columns' data types and identified and treated null values.
We used different libraries like Matplotlib and Seaborn to visualize the data and studied the relationships between various columns and our predictor variable.
We converted all categorical variables into numerical ones using the one-hot encoding method.
We split the data with a ratio of 70% for training the model and 30% for testing the model's performance.
We used the XGBoost model for this task, employing methods like k-fold cross-validation and grid search CV to train the model and obtain the best performance parameters.
We used the validation dataset to test the model's performance. Our aim is to achieve at least 80% accuracy. If the model fails to meet this threshold, we will reiterate the model development process. We acheived the accuracy of 87% here.
Once validation is complete, we save the model using the pickle method. Although we are saving the model locally, we plan to deploy and test the model on the cloud. We establish a connection with the cloud, install the necessary requirements, and test the model there.
Once the model is deployed, we need to determine how users can interact with it. We use Flask API for this purpose.
To run this project locally first clone this repo
git clone https://github.com/muditprakash/Solvency.git
Once this is done install requirements.txt file as
pip install -r requirements.txt
And then run app.py file as
python app.py