rpart
rpart copied to clipboard
using maxdepth (or other setting) to force tree to grow to that size
Hello, I am trying to grow a tree to a maxdepth of 12. I used the rpart.control (maxdepth=12) option, but the tree only grows up to 6 and then stops. Is there a way to force the tree to grow to the depth specified in maxdepth, or is there another way to work around this to force the tree to continue growing?
I've also tried to set cp=0.0 to see if that will force the tree to grow further but I am still finding that it stops.
Thanks!
it may be that there are no improvements possible. Also, one of these other options may be limiting your split (such as minsplit - minimum number of observations that must exist in a node in order for a split to be attempted, or minbucket - minimum number of obs in a terminal node)
rpart.control(minsplit = 20, minbucket = round(minsplit/3), cp = 0.01, maxcompete = 4, maxsurrogate = 5, usesurrogate = 2, xval = 10, surrogatestyle = 0, maxdepth = 30, ...)
From: Jamie Quinn @.> Sent: Monday, January 10, 2022 12:02 PM To: bethatkinson/rpart @.> Cc: Subscribed @.***> Subject: [EXTERNAL] [bethatkinson/rpart] using maxdepth (or other setting) to force tree to grow to that size (Issue #39)
Hello, I am trying to grow a tree to a maxdepth of 12. I used the rpart.control (maxdepth=12) option, but the tree only grows up to 6 and then stops. Is there a way to force the tree to grow to the depth specified in maxdepth, or is there another way to work around this to force the tree to continue growing?
I've also tried to set cp=0.0 to see if that will force the tree to grow further but I am still finding that it stops.
Thanks!
— Reply to this email directly, view it on GitHubhttps://github.com/bethatkinson/rpart/issues/39, or unsubscribehttps://github.com/notifications/unsubscribe-auth/ACWQG5YPMDMJ6NEE3QXVK53UVMNLNANCNFSM5LUJFXGA. Triage notifications on the go with GitHub Mobile for iOShttps://apps.apple.com/app/apple-store/id1477376905?ct=notification-email&mt=8&pt=524675 or Androidhttps://play.google.com/store/apps/details?id=com.github.android&referrer=utm_campaign%3Dnotification-email%26utm_medium%3Demail%26utm_source%3Dgithub. You are receiving this because you are subscribed to this thread.Message ID: @.***>
I appreciate your quick response! I will try to adjust some of the other settings as well to see if I can make it work. Thank you!