Answered step by step
Verified Expert Solution
Question
1 Approved 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
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
Step: 1
Decision Tree Analysis 91 Decision Tree with genelection as Target Variable denotes terminal node rp...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