Answered step by step
Verified Expert Solution
Question
1 Approved Answer
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 offer. The data are available in file 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 offer 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) classification trees. Preprocess the data as follows:
- Zip code can be ignored.
- Partition the data: 60% training, 40% validation.
- Fit models to the data for (1) logistic regression, (2) k-nearest neighbors with k = 3, and (3) classification trees. Use Personal Loan as the outcome variable. Report the validation confusion matrix for each of the three models.
- Create data frame with the actual outcome, predicted outcome, and each of the three models. Report the first 10 rows of this data frame.
- 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 classifications generated by these two methods derive a confusion matrix for each method and report the overall accuracy.
- 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