1
$\begingroup$

During my machine learning labwork, I was trying to fit a decision tree to the IRIS dataset (150 samples, 4 features). The maximum theoretical depth my tree can reach which is, for my understanding, equals to (number of sample-1) when the tree overfits the training set. So, for my training set which consists of 100 samples that would be 99. However, I am unsure what would the maximum depth be if I want to impose that no less than 2 samples are contained in a leaf. Would it just be ${100 \over 2} - 1 = 49$?

$\endgroup$
2
  • 3
    $\begingroup$ Yes, your formula is correct. $\endgroup$ Nov 25, 2021 at 9:08
  • $\begingroup$ Yes. And just want to add that if all of your features were categorical then max depth would have been 4. $\endgroup$ Nov 26, 2021 at 6:18

0

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Browse other questions tagged or ask your own question.