Question: 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
1 Expert Approved Answer
Step: 1 Unlock
Question Has Been Solved by an Expert!
Get step-by-step solutions from verified subject matter experts
Step: 2 Unlock
Step: 3 Unlock
