Choosing the values of cp, minsplit and maxdepth in CART

252 views Asked by At

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!

0

There are 0 answers