# Write a fully executed R-Markdown program and submit a pdf file solving and answ

Place your order now for a similar assignment and have exceptional work written by our team of experts, At affordable rates

Write a fully executed R-Markdown program and submit a pdf file solving and answering questions listed below under Problems at the end of chapter 7. For clarity, make sure to give an appropriate title to each section.
Problem 7.2: Personal Loan Acceptance (a, b, c, d)
Problem 7.3: Predicting Housing Median Prices (a, b)
7.2 Personal Loan Acceptance. 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).
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 depart[1]ment to devise smarter campaigns with better target marketing. The goal is to use
k-NN to predict whether a new customer will accept a loan offer. This will serve as
the basis for the design of a new campaign.
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.
Partition the data into training (60%) and validation (40%) sets.
a. Consider the following customer:
Age = 40, Experience = 10, Income = 84, Family = 2, CCAvg = 2, Education_1
= 0, Education_2 = 1, Education_3 = 0, Mortgage = 0, Securities Account = 0,
CD Account = 0, Online = 1, and Credit Card = 1. Perform a k-NN classification
with all predictors except ID and ZIP code using k = 1. Remember to transform
categorical predictors with more than two categories into dummy variables first.
PROBLEMS 185
Specify the success class as 1 (loan acceptance), and use the default cutoff value of
0.5. How would this customer be classified?
b. What is a choice of k that balances between overfitting and ignoring the predictor
information?
c. Show the confusion matrix for the validation data that results from using the best
k.
d. Consider the following customer: Age = 40, Experience = 10, Income = 84,
Family = 2, CCAvg = 2, Education_1 = 0, Education_2 = 1, Education_3 = 0,
Mortgage = 0, Securities Account = 0, CD Account = 0, Online = 1 and Credit
Card = 1. Classify the customer using the best k.
7.3 Predicting Housing Median Prices. The file BostonHousing.csv contains infor[1]mation on over 500 census tracts in Boston, where for each tract multiple variables
are recorded. The last column (CAT.MEDV) was derived from MEDV, such that it
obtains the value 1 if MEDV > 30 and 0 otherwise. Consider the goal of predicting
the median value (MEDV) of a tract, given the information in the first 12 columns.
Partition the data into training (60%) and validation (40%) sets.
a. Perform a k-NN prediction with all 12 predictors (ignore the CAT.MEDV col[1]umn), trying values of k from 1 to 5. Make sure to normalize the data, and choose
function knn() from package class rather than package FNN. To make sure R is
using the class package (when both packages are loaded), use class::knn(). What
is the best k? What does it mean?
b. Predict the MEDV for a tract with the following information, using the best k:

Pages (550 words)
Approximate price: -

Why Work with Us

Top Quality and Well-Researched Papers

We always make sure that writers follow all your instructions precisely. You can choose your academic level: high school, college/university or professional, and we will assign a writer who has a respective degree.

We have a team of professional writers with experience in academic and business writing. Many are native speakers and able to perform any task for which you need help.

Free Unlimited Revisions

If you think we missed something, send your order for a free revision. You have 10 days to submit the order for review after you have received the final document. You can do this yourself after logging into your personal account or by contacting our support.

Prompt Delivery and 100% Money-Back-Guarantee

All papers are always delivered on time. In case we need more time to master your paper, we may contact you regarding the deadline extension. In case you cannot provide us with more time, a 100% refund is guaranteed.

Original & Confidential

We use several writing tools checks to ensure that all documents you receive are free from plagiarism. Our editors carefully review all quotations in the text. We also promise maximum confidentiality in all of our services.

Our support agents are available 24 hours a day 7 days a week and committed to providing you with the best customer experience. Get in touch whenever you need any assistance.

Try it now!

## Calculate the price of your order

Total price:
\$0.00

How it works?

Fill in the order form and provide all details of your assignment.

Proceed with the payment

Choose the payment system that suits you most.

Our Services

No need to work on your paper at night. Sleep tight, we will cover your back. We offer all kinds of writing services.

## Essay Writing Service

No matter what kind of academic paper you need and how urgent you need it, you are welcome to choose your academic level and the type of your paper at an affordable price. We take care of all your paper needs and give a 24/7 customer care support system.