Reputation: 1
I am new to decision tree model and have a seemingly stupid question. Say I have a decision of which max_depth is set to be 20. Does it mean that the tree has to be 20 layers deep or any integer smaller than 20 is possible?
Upvotes: 0
Views: 4096
Reputation: 1
It can have any number between 1 to 20, it depends on at which level the hypothetical model performs best.For more details on decision tree refer this. https://infocenter.informationbuilders.com/wf80/topic/pubdocs/RStat16/source/topic47.htm
Upvotes: 0
Reputation: 390
If you precise max_depth = 20
, then the tree can have leaves anywhere between 1 and 20 layers deep.
That's why they put max_
next to depth
;) or else it would've been just depth
Upvotes: 1