Reader small image

You're reading from  Building Data Science Solutions with Anaconda

Product typeBook
Published inMay 2022
PublisherPackt
ISBN-139781800568785
Edition1st Edition
Concepts
Right arrow
Author (1)
Dan Meador
Dan Meador
author image
Dan Meador

Dan Meador is an Engineering Manager at Anaconda and is the creator of Conda as well as a champion of open source at Anaconda. With a history of engineering and client facing roles, he has the ability to jump into any position. He has a track record of delivering as a leader and a follower in companies from the Fortune 10 to startups.
Read more about Dan Meador

Right arrow

Finding optimal hyperparameters with GridSearchCV

As we have created new models and tried various data processing techniques, we have used many different parameters and function arguments to determine how we set up the problem. One example is the impute method. Mean, median, or some other advanced approach – how do we know which we should take? One naïve approach might be to simply create a for loop and try every technique. We can calculate the score for each and use the best one. We tried a similar approach before when looking at which algorithm would give us the best score in the previous section.

This might be naïve, but never overlook the simple. It is such a good approach that scikit-learn decided to package that together and make an easy method to do so. It will even perform a k-fold cross-validation to make sure it is getting the best solution. There are a few different ways to tune hyperparameters, but we're going to focus on a grid search.

A grid...

lock icon
The rest of the page is locked
Previous PageNext Page
You have been reading a chapter from
Building Data Science Solutions with Anaconda
Published in: May 2022Publisher: PacktISBN-13: 9781800568785

Author (1)

author image
Dan Meador

Dan Meador is an Engineering Manager at Anaconda and is the creator of Conda as well as a champion of open source at Anaconda. With a history of engineering and client facing roles, he has the ability to jump into any position. He has a track record of delivering as a leader and a follower in companies from the Fortune 10 to startups.
Read more about Dan Meador