Lessons from the Data Mining Community Daniel P. Martin University of Virginia Design and Data Analysis October 30, 2014 Daniel P. Martin 1 of 37 Efficiently Exploring (Multilevel) Data
Introduction to recursive partitioning Walkthrough of an applied example Challenges with multilevel data Daniel P. Martin 3 of 37 Efficiently Exploring (Multilevel) Data
considered by many as less than an approach to data analysis and more a confession of guilt. -Jack McArdle, 2014 Daniel P. Martin 4 of 37 Efficiently Exploring (Multilevel) Data
Modeling Needs: can parse a large number of variables requires minimal model specification Daniel P. Martin 8 of 37 Efficiently Exploring (Multilevel) Data
Modeling Needs: can parse a large number of variables requires minimal model specification handles non-independence Daniel P. Martin 8 of 37 Efficiently Exploring (Multilevel) Data
Modeling Needs: can parse a large number of variables requires minimal model specification handles non-independence One Solution: recursive partitioning Daniel P. Martin 8 of 37 Efficiently Exploring (Multilevel) Data
The general algorithm: 1. Search all variables for splits in a greedy, top-down manner 2. Identify the best split by some criterion Daniel P. Martin 13 of 37 Efficiently Exploring (Multilevel) Data
The general algorithm: 1. Search all variables for splits in a greedy, top-down manner 2. Identify the best split by some criterion 3. Split the sample on this threshold, resulting in two child nodes Daniel P. Martin 13 of 37 Efficiently Exploring (Multilevel) Data
The general algorithm: 1. Search all variables for splits in a greedy, top-down manner 2. Identify the best split by some criterion 3. Split the sample on this threshold, resulting in two child nodes 4. Repeat steps 1-3 on the resulting sub-groups (nodes) until some stopping criterion is reached Daniel P. Martin 13 of 37 Efficiently Exploring (Multilevel) Data
training, testing, and cross-validation Source: An Introduction to Statistical Learning Daniel P. Martin 14 of 37 Efficiently Exploring (Multilevel) Data
The general algorithm: 1. Search all variables for splits in a greedy, top-down manner 2. Identify the best split by some criterion 3. Split the sample on this threshold, resulting in two child nodes 4. Repeat steps 1-3 on the resulting sub-groups (nodes) until some stopping criterion is reached Daniel P. Martin 16 of 37 Efficiently Exploring (Multilevel) Data
The general algorithm: 1. Search all variables for splits in a greedy, top-down manner 2. Identify the best split by some criterion 3. Split the sample on this threshold, resulting in two child nodes 4. Repeat steps 1-3 on the resulting sub-groups (nodes) until some stopping criterion is reached 5. Prune tree using cross-validation Daniel P. Martin 16 of 37 Efficiently Exploring (Multilevel) Data
Pros: intuitive, easy to explain and visualize can handle continuous or categorical outcomes non-parametric, robust to outliers no model specification required Daniel P. Martin 19 of 37 Efficiently Exploring (Multilevel) Data
Pros: intuitive, easy to explain and visualize can handle continuous or categorical outcomes non-parametric, robust to outliers no model specification required Cons: prone to overfitting biased toward variables with many possible splits typically outperformed by regression techniques Daniel P. Martin 19 of 37 Efficiently Exploring (Multilevel) Data
& Zeileis (2006) pseudocode The general algorithm: 1. Test global null hypothesis that variables are independent of the outcome Daniel P. Martin 20 of 37 Efficiently Exploring (Multilevel) Data
& Zeileis (2006) pseudocode The general algorithm: 1. Test global null hypothesis that variables are independent of the outcome 2. If rejected, identify the best variable to split on in a permutation test framework Daniel P. Martin 20 of 37 Efficiently Exploring (Multilevel) Data
& Zeileis (2006) pseudocode The general algorithm: 1. Test global null hypothesis that variables are independent of the outcome 2. If rejected, identify the best variable to split on in a permutation test framework 3. Identify the best split and create two child nodes Daniel P. Martin 20 of 37 Efficiently Exploring (Multilevel) Data
& Zeileis (2006) pseudocode The general algorithm: 1. Test global null hypothesis that variables are independent of the outcome 2. If rejected, identify the best variable to split on in a permutation test framework 3. Identify the best split and create two child nodes 4. Repeat steps 1-3 on the resulting sub-groups (nodes) until global null hypothesis is no longer rejected Daniel P. Martin 20 of 37 Efficiently Exploring (Multilevel) Data
Trees conditional inference pros/cons Pros: same benefits as CART unbiased in selecting splits no pruning needed Daniel P. Martin 22 of 37 Efficiently Exploring (Multilevel) Data
Trees conditional inference pros/cons Pros: same benefits as CART unbiased in selecting splits no pruning needed Cons: prone to overfitting less efficient than CART iid assumptions regarding permutation tests typically outperformed by regression techniques Daniel P. Martin 22 of 37 Efficiently Exploring (Multilevel) Data
in action! NewLeague League Division Assists Errors Years Runs HmRun AtBat Walks CWalks PutOuts Hits RBI CAtBat CRuns CHits CRBI CHmRun 0e+00 1e+06 2e+06 3e+06 4e+06 Variable Importance IncNodePurity Daniel P. Martin 25 of 37 Efficiently Exploring (Multilevel) Data
et al. (2007) in action! NewLeague League Errors Division Assists HmRun PutOuts Years CWalks Walks AtBat Runs CAtBat RBI Hits CHits CRuns CHmRun CRBI 0 10000 20000 30000 Importance Variable Daniel P. Martin 26 of 37 Efficiently Exploring (Multilevel) Data
out-of-bag error Sex Minority MEANSES SES 0 2000 4000 6000 8000 10000 12000 train_rforest IncNodePurity Daniel P. Martin 33 of 37 Efficiently Exploring (Multilevel) Data
levels of non-independence: When do trees begin to break down? How do conditional inference forests perform? Daniel P. Martin 36 of 37 Efficiently Exploring (Multilevel) Data
levels of non-independence: When do trees begin to break down? How do conditional inference forests perform? Can random forests yield good variable importances with OOB error? Daniel P. Martin 36 of 37 Efficiently Exploring (Multilevel) Data
levels of non-independence: When do trees begin to break down? How do conditional inference forests perform? Can random forests yield good variable importances with OOB error? How do these methods perform with missing data present? Daniel P. Martin 36 of 37 Efficiently Exploring (Multilevel) Data
levels of non-independence: When do trees begin to break down? How do conditional inference forests perform? Can random forests yield good variable importances with OOB error? How do these methods perform with missing data present? Stay tuned! Daniel P. Martin 36 of 37 Efficiently Exploring (Multilevel) Data