0

So, I am trying to figure out how to find the cp, min split, and maxdepth values for my problem. I came across an article (here is the link: https://uc-r.github.io/regression_trees) that shows the grid search approach. I don't understand though that how do they choose the range of minsplit and maxdepth values. Should I take the same range as them? This is how they proceed:

hyper_grid <- expand.grid(
  minsplit = seq(5, 20, 1),
  maxdepth = seq(8, 15, 1)
)

On what basis do they choose 5-20 for minsplit and 8-15 for maxdepth?

Thanks in advance!

  • Your question addresses regression trees rather than how to do these with `R` as one of several options. Please consider moving it to one of the dedicated forums and tag it appropriately (`[cart-analysis]` not `[cart]`: https://stackoverflow.com/questions/tagged/cart ) –  Mar 23 '22 at 06:38
  • Okay, done. Thanks :) – Tannya Kumar Mar 23 '22 at 18:30

0 Answers0