Why use prune function

Home Forums Analytics / Predictive Analytics Why use prune function

Tagged: 

Viewing 3 posts - 1 through 3 (of 3 total)
  • Author
    Posts
  • #2478
    Porkins
    Participant

    I just did an example in Actex where it created a tree using rpart. They then used cptable to find out which CP to use (after taking into account the one standard deviation rule) do get the correct tree to use. They then used prune and entered the desired CP to get a new tree.

    Since we had to go through the trouble of figuring out the “best” CP and also how many terminal nodes there are couldn’t we just use rpart again but enter the correct CP and maxdepth arguments?

    Is this just user preference or is there a reason to use prune and not rpart and the correct arguments?

     

    #2606
    SamCastillo
    Participant

    Hi Porkins,

    Great question about decision trees that touches upon the way that you run code.  This can have a big impact on your exam report.  Here’s a screencast explanation.

    Best regards,

    Sam Castillo

    Course Instructor at ExamPA.net

    #2646
    Porkins
    Participant

    Thank you for the very detailed and concise response. I appreciate it.

Viewing 3 posts - 1 through 3 (of 3 total)
  • You must be logged in to reply to this topic.