Answered step by step
Verified Expert Solution
Question
1 Approved Answer
Step 2 : Classification Models Using the code discussed in the lecture, split the data into training and testing data sets. Create a Decision Tree
Step : Classification Models
Using the code discussed in the lecture, split the data into training and testing data sets.
Create a Decision Tree model using the rpart library to predict the variable TARGETBADFLAG
Create a Random Forest model using the randomForest library to predict the variable TARGETBADFLAG
Create a Gradient Boosting model using the gbm library to predict the variable TARGETBADFLAG
All model parameters such as tree depth are up to you.
Do not use TARGETLOSSAMT to predict TARGETBADFLAG.
Plot the Decision Tree and list the important variables for the tree.
List the important variables for the Random Forest and include the variable importance plot.
List the important variables for the Gradient Boosting model and include the variable importance plot.
Using the testing data set, create a ROC curves for all models. They must all be on the same plot.
Display the Area Under the ROC curve AUC for all models.
Rerun with different training and testing data at least three times.
Determine which model performed best and why you believe this.
Write a brief summary of which model you would recommend using. Note that this is your opinion. There is no right answer. You might, for example, select a less accurate model because it is faster or easier to interpret.
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