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 2: 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 TARGET_BAD_FLAG
Create a Random Forest model using the randomForest library to predict the variable TARGET_BAD_FLAG
Create a Gradient Boosting model using the gbm library to predict the variable TARGET_BAD_FLAG
All model parameters such as tree depth are up to you.
Do not use TARGET_LOSS_AMT to predict TARGET_BAD_FLAG.
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 blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!