Question: 9. Use rpart and rpart.plot packages to create decisions trees and answer the questions below. 9.1. (8 points) Create a decision tree using variable

9. Use "rpart" and "rpart.plot" packages to create decisions trees and answer

9. Use "rpart" and "rpart.plot" packages to create decisions trees and answer the questions below. 9.1. (8 points) Create a decision tree using variable gen_election as the target (class) variable and the variables twitter, facebook, and youtube as the predictors. Paste the tree in the space below. 9.2. (4 points) How many candidates who had a facebook campaign account won the election? 9.3. (4 points) Use "summary" to check which variable had the highest importance in the decision tree. List the variables based on the highest to lowest importance. 9.4. (8 points) How many of the candidates were correctly classified in the decision tree? 9.5 (4 points) Which leaf node is the purest node in the decision tree? Use GINI Index. 10. Now add ttl_receipts and cand_ici to the list of predictors. 10.1. (8 points) Create and paste the decision tree in the space below. 10.2. (10 points) Use "summary" to check which variable had the highest importance in the decision tree. List the variables based on the highest to lowest importance.

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock

Decision Tree Analysis 91 Decision Tree with genelection as Target Variable denotes terminal node rp... View full answer

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 Finance Questions!