SAS Homework 2 Review Decision trees MIS2502 Data Analytics
SAS Homework 2 Review Decision Trees Using Organics Data Set from exercise #1. If Organics is wrong then your Decision Tree will be wrong Partition: 50% Training, 50% Validation Add a Decision Tree using defaults (max number branches 2) Evaluate default Decision Tree using Average Square Error Add another Decision Tree but this time customize by changing the max number of branches from 2 to 3 Assess this Decision Tree using Average Square Error Compare default Tree (2 branch max) to customized Tree (3 branch max) and determine which model is ‘better’ Answer some questions regarding the customized Decision Tree
Partition
Decision Tree – Diagram Right Click> Run after adding objects Difference is Maximum Branch
Assessing the 1st Decision Tree 2 branches Age is 1st branch
Assessing the 1st Decision Tree using average square error subtree assessment plot View>Model>Subtree Assessment Plot The line is the Optimal Leaf count for that tree Note the Leaf Count and the Validation: Average Square Error
Assessing the 2nd Decision Tree
Assessing the 2nd Decision Tree Note change in average square error In general, less error is better
What is the probability that a 39 What is the probability that a 39.5 year old male with an affluence grade of 15 buys organics ? Age = 39.5, AfflGrade > 11.5 Gender = M Look at the ‘Validation’ stats 1 = buy, 0 = no buy Navigating the Tree
In Class
In Class 1. Answers: a. 45.2% b. 66.0% c. 57.2% d. 48.2% 2. It means that for those people who made more than three donations, the region’s average median home value doesn’t make a difference in whether they make an additional donation. 3. Answers: a. GiftCnt36 – Gift Count 36 Months; because it has the highest logworth value, which means it does the best job of differentiating between future donors and non‐donors. b. Gift Count 36 Months is the first variable chosen by SAS to split the tree.