The Benefits and Drawbacks of a Binary Tree Versus a Bushier Tree
1995 words
8 pages
Homework 34. Discuss the benefits and drawbacks of a binary tree versus a bushier tree. The structure of binary is simple than a bushier tree. Each parent node only has two child. It save the storage space. Besides, binary tree may deeper than bushier tree. The result record of binary may not very refine. 5. Construct a classification and regression tree to classify salary based on the other variables. Do as much as you can by hand, before turning to the software. Data: NO. 1 2 3 4 5 6 7 8 9 10 11 Staff Sales Management Occupation Service Gender Female Male Male Male Female Male Female Female Male Female Male Age 45 25 33 25 35 26 45 40 30 50 25 Salary $48,000 $25,000 $35,000 $45,000 $65,000 $45,000 $70,000 $50,000 $40,000 $40,000 …show more content…
The left branch has records 1,8,9. Now we split the left child which has records 1,8,10.
Candidate Split 1 3 4 11 12
Left Child Node,s tL Occupation = Service Occupation = Sales Occupation = Staff Age 45
Values of the Components of the Optimality Measure =(s|t) for each candidate split, for the Split PL PR P(L=1|tL) P(L=2|tL) P(L=3|tL) P(L=4|tL) P(L=1|tR) P(L=2|tR) P(L=3|tR) P(L=4|tR) 2PLPR ∅(s|t)
each candidate split, for decision node D
1 3 4
0.33 0.67 0.00 0.33 0.67 0.00
0.00
1.00
0.00
0.00
0.50
0.50
0.00
0.44
0.44
0.00 1.00 0.00 0.00
1.00 0.00 1.00 1.00
0.00 0.00 0.00 0.00
0.00 0.00 0.00 0.00
0.50 0.00 0.50 1.00
0.50 1.00 0.50 0.00
0.00 0.00 0.00 0.00
0.44 0.44 0.44 0.44
0.44 0.89 0.44 0.89
0.33 0.67 0.00
11 0.33 0.67 0.00 12 0.67 0.33 0.00
Optimality measure maximized to 0.89, when Occupation="Staff"(Left Branch), Occupation="Service or Sales"(Right Branch) After this split, both the left and right branch terminate to pure leaf node. The left branch has record 10 which value="Level 2" and the right branch has records 1 and 8 which