Skip to content

Function to select the best decision tree model based on the 1-SE decision rule. Returns rpart model and saves additional model diagnostics.

Notifications You must be signed in to change notification settings

Adamishere/BestModelRpart

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

5 Commits
 
 
 
 

Repository files navigation

BestModelRpart

Function to select the best decision tree model based on the 1-SE decision rule.

Problem

We wanted to explore the predictive and descriptive power of CART decisions trees as a way to inform a larger data process. As an Apriori assumption, based on our data process, there are +20 unique segments of the data that would need their own individual model. We need a quicker way to produce and reviewing decision tree models.

Solution

This wrapper function utilized the R package "rpart" to build the decision tree and automatically pare it down to its optimal size (based on the 1-SE rule). In the process, it also produces addition fit diagnostics and image of the trimmed tree as saved output.

About

Function to select the best decision tree model based on the 1-SE decision rule. Returns rpart model and saves additional model diagnostics.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages