From the course: Complete Guide to Generative AI for Data Analysis and Data Science

Unlock the full course today

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

Hyperparameter tuning

Hyperparameter tuning

- [Instructor] When we're tuning hyperparameters, we could do as we have done in a previous video, and kind of tweak one hyperparameter at a time and see the results, and see for ourself, you know, can we find a good combination or an optimal combination of hyperparameters? Alternatively, we can get the machine to do that for us. And fortunately, scikit-learn has multiple functions which allow us to do what's known as grid search of our different hyperparameter values. So let's create a model using our synthetic_iris_like_data, and let's ask ChatGPT to, "Create a randomforest model using the attached data. (keys clicking) The label is the class column." And then, "Use grid search to find an optimal set of hyperparameters." Now, you might think, "Well, we don't know what the hyperparameters are, how do we know what to search for?" Well fortunately, ChatGPT has access to the code that implements the random forest, and it can figure out what are the different hyperparameters, what are…

Contents