Question
Acceptance of Consumer Loan Universal Bank has begun a program to encourage its existing customers to borrow via a consumer loan program. The bank has
Acceptance of Consumer Loan Universal Bank has begun a program to encourage its existing customers to borrow via a consumer loan program. The bank has promoted the loan to 5000 customers, of whom 480 accepted the o er. The data are available in le UniversalBank.csv. The bank now wants to develop a model to predict which customers have the greatest probability of accepting the loan, to reduce promotion costs and send the o er only to a subset of its customers.
We will develop several models, then combine them in an ensemble. The models we will use are (1) logistic regression, (2) k-nearest neighbors with k = 3, and (3) classi cation trees. Preprocess the data as follows:
Zip code can be ignored.
Partition the data: 60% training, 40% validation.
a) Fit models to the data for (1) logistic regression, (2) k-nearest neighbors with k = 3, and (3) classi cation trees. Use Personal Loan as the outcome variable. Report the validation confusion matrix for each of the three models.
b) Build a data frame with the actual outcome, predicted outcome, and each of the three models. Report the rst 10 rows of this data frame.
c) Add two columns to this data frame for (1) a majority vote of predicted outcomes, and (2) the average of the predicted probabilities. Using the classi cations generated by these two methods derive a confusion matrix for each method and report the overall accuracy.
d) Compare the error rates for the three individual methods and the two ensemble methods.
Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started