From the course: Applied Machine Learning: Supervised Learning

Unlock this course with a free trial

Join today to access over 24,900 courses taught by industry experts.

Tuning hyperparameters

Tuning hyperparameters

- Most machine learning models have the concept of hyper parameters, which we've mentioned before. Remember, a parameter for a function parameterizes the behavior of a function. A hyper parameter for a machine learning model parameterize the behavior or changes the behavior of the model. So these are big levers that we can use to make a model perform differently. For example, in a decision tree, probably the biggest lever is the depth. If you let a decision tree grow very deep, it will tend to be more complicated and have characteristics of over fitting. If you make it be very shallow, it simplifies the model. But that can also go too far and you can have a model that is under fit. So oftentimes we want to tune our hyper parameters to give our model the characteristics that are important for our business. One technique of tuning hyper parameters is using a technique called grid search. Psi Kit Learn has an implementation of grid search, which we'll demo here. The basic idea with grid…

Contents