Overfitting in tree depth selection

Code reviewMedium16 minDatabricks style

Your task

Review this Python model-evaluation routine.

It always selects max_depth=None with accuracy 1.0. Is that the best model?