Answered step by step
Verified Expert Solution
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,
pt Problem : 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 $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 for training and for testing.
Construct a decision tree with the caret package: optimize the by employing a bootstrap
resampling method samples Choose the optimal hyperparameter value from the set
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 Using
the final model, make predictions for the training and testing sets.
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