Practice: Hyper parameter tuning for an overfitted decision tree classifier

  1. Review and understand the available model parameters
  • max_depth : if left as None, the tree nodes are expanded until all leaves are pure or until all leaves contain less than min_samples_split samples which likely ends up in overfitting as shown in the example below:
  • min_samples_leaf : tuned this parameter to prevent the model from trying to fit a single data point in a leaf node which can be another symptom of overfitting.

--

--

--

Always learning :-)

Love podcasts or audiobooks? Learn on the go with our new app.

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store
Tina Akiiki

Tina Akiiki

Always learning :-)

More from Medium

Modernize Campus-IT & Hands-on Labs with Microsoft Azure

Exploratory Data Analysis Zomato at Banglore City

Positive emotions: The perennial resources of life