Hello, dear friend, you can consult us at any time if you have any questions, add WeChat: daixieit

Case Study: Universal Bank loan offers                              20 points

Context:

Universal Bank: Personal Loan Acceptance

1. Universal Bank is a relatively young bank growing rapidly in terms of overall customer acquisition. The majority of these customers are liability customers (depositors) with varying sizes of relationship with the bank. The customer base of asset customers (borrowers) is quite small, and the bank is interested in expanding this base rapidly to bring in more loan business. In particular, it wants to explore ways of converting its liability customers to personal loan customers (while retaining them as depositors).

2. A campaign that the bank ran last year for liability customers showed a healthy conversion rate of over 9% success. This has encouraged the retail marketing department to devise smarter campaigns with better target marketing. The goal is to predict whether a new customer will accept a loan offer. This will serve as the basis for the design of a new campaign.

3. The file UniversalBank.csv contains data on 5000 customers. The data include customer demographic information (age, income, etc.), the customer’s relationship with the bank (mortgage, securities account, etc.), and the customer response to the last personal loan campaign (Personal Loan). Among these 5000 customers, only 480 (= 9.6%) accepted the personal loan that was offered to them in the earlier campaign.

Objective:

The objective is to build predictive models on this data to help the bank to aggressively market its loan offerings to customers who are likely to accept a loan offer.

Considerations:

· The bank wants to predict which customers might be the candidates for a personal loan.

· The algorithm can make two types of errors: flagging a customer as a potential loan-taker but in actuality the customer does not take a loan (False Positive). The bank will needlessly spend resources on wooing the customer.

· The other error is that the model labels a customer as "0" (non-loan taker) but in actuality the customer would have taken the loan (False negative). In this case there will be an opportunity loss.

Which loss is greater ?

· Since we do not know which of the above two errors is more costly for the bank, you should try to get a model that gives a balanced performance between Precision and Recall, i.e. we want a high f1 score.

The data set “UniversalBank.csv” can be downloaded from Data sets folder in CANVAS

Tasks and rubric:

1. Explore: 2 points

Examine the data set and carry out EDA (particularly showing how the other variables may be related to the target variable (accept loan offer or not), through barplot/lineplot/boxplot etc.), to derive initial insights.

2. Data preparation: 2 points

Check for missing values, create dummy variables, if needed

3. Model building: 4 points

Separate the predictor and target variable and split the data in train and test sets, using a 70:30 split. Build a Decision Tree model. Calculate the evaluation metrics: F1score, Precision and Recall. Draw up a confusion metrics for the test set

4. Tuning and evaluation: 8 points

· Tune the Decision Tree Hyperparameters, using GridSearchCV.

· Compare the performance of basic model and tuned model on the test set

· Based on your criteria, choose the best model – Give reasons!

5. Insights: 4 points

Determine the feature importance in your chosen model

List out the business insights, based on your EDA and chosen model

Guidelines for submitting:

· Annotate your Jupyter Notebook, to explain your procedures, comments and conclusions

· After completion, run the Jupyter notebook from start to finish

· Download the notebook in HTML format and upload on CANVAS in assignment space.