Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

[ 1 6 pt ] Problem 5 : The credit dataset contains information on clients affiliated with Bank A . The dataset encompasses various variables,

[16pt] Problem 5: The "credit" dataset contains information on clients affiliated with Bank A. The
dataset encompasses various variables, including
Status - A categorical variable with two levels (bad and good) representing client's credit
score status [Target feature, "bad" is the target class]
Income - Income in $1000's
Limit - Credit Limit
Rating - Credit Rating
Cards - Number of credit cards
Age - Age in years
Own - A factor with levels No and Yes, indicating whether the individual owns a home
Student - A factor with levels No and Yes, indicating whether the individual is a student
Married - A factor with levels No and Yes, indicating whether the individual is married
Region - A factor with levels East, South, and West, indicating the individual's geographic
location
Balance - Average credit card balance
The objective of this problem is to predict the status of clients using the remaining variables.
Using the parsnip package, build a predictive model utilizing the decision tree method. Use
the entire dataset and default parameters of the model. Using the model, make predictions
and generate a confusion matrix. Manually calculate the accuracy, sensitivity, specificity, and
precision of the model.
Split the credit dataset into training and test sets by employing the stratified sampling
technique with a ratio of 70% for training and 30% for testing.
Construct a decision tree with the caret package: optimize the "cp" by employing a bootstrap
resampling method (15 samples). Choose the optimal hyperparameter value from the set
{0.001,0.01,0.05,0.1,0.2} based on the ROC criterion.
Display the outcomes of the hyperparameter tuning process by creating heatmaps that
illustrate sensitivity and specificity metrics.
Build the final model based on the optimal hyperparameter value obtained in part (3). Using
the final model, make predictions for the training and testing sets.
image text in transcribed

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

More Books

Students also viewed these Databases questions