Question: Using R , form a dataset with yesno as a dependent variable and the four following character variables: ; ( [ # a . Fit
Using R form a dataset with "yesno" as a dependent variable and the four following character variables: ; #
a Fit a classification tree selecting a complexity parameter of and use set.seed Use the predictors to fit the outcome variable.
c Use the one standard deviation ruleSD to decide if the tree obtained in b is optimal or not. Reduce the complexity parameter to if you did not attain a minimum XERROR for the rule from part b Again, using set.seed grow a tree and print the information on predictive accuracy with printcp and show your calculations. How many splits are in the optimal tree? If this classification tree is not the optimal tree according to SD then prune it and plot the pruned tree with an optimal number of splits.
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
