0
$\begingroup$

I am doing hyperparameter tuning + cross validation and I'm constantly getting that the optimal size of the leaf should be 1. Should I worry? Is this a sign of overfitting?

$\endgroup$

1 Answer 1

1
$\begingroup$

leaf_size should have zero effect on the performance of the model. Its effect is on construction of the lookup object, which affects training and prediction time, but not the results.

The best parameters are probably just breaking ties by value of this parameter, so the smallest is chosen. You can inspect the GridSearchCV attribute cv_results_ to be sure. It should also contain training and prediction times, which might inform what value you ultimately want to select.

$\endgroup$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.