FAQ: Hyperparameter Tuning with `scikit-learn` - Evaluating the Results of RandomizedSearchCV

This community-built FAQ covers the “Evaluating the Results of RandomizedSearchCV” exercise from the lesson "Hyperparameter Tuning with scikit-learn".

Paths and Courses
This exercise can be found in the following Codecademy content:

Data Scientist: Machine Learning Specialist

FAQs on the exercise Evaluating the Results of RandomizedSearchCV

There are currently no frequently asked questions associated with this exercise – that’s where you come in! You can contribute to this section by offering your own questions, answers, or clarifications on this exercise. Ask or answer a question by clicking reply (reply) below.

If you’ve had an “aha” moment about the concepts, formatting, syntax, or anything else with this exercise, consider sharing those insights! Teaching others and answering their questions is one of the best ways to learn and stay sharp.

Join the Discussion. Help a fellow learner on their journey.

Ask or answer a question about this exercise by clicking reply (reply) below!
You can also find further discussion and get answers to your questions over in #get-help.

Agree with a comment or answer? Like (like) to up-vote the contribution!

Need broader help or resources? Head to #get-help and #community:tips-and-resources. If you are wanting feedback or inspiration for a project, check out #project.

Looking for motivation to keep learning? Join our wider discussions in #community

Learn more about how to use this guide.

Found a bug? Report it online, or post in #community:Codecademy-Bug-Reporting

Have a question about your account or billing? Reach out to our customer support team!

None of the above? Find out where to ask other questions here!

For me, the code solution to this exercise was for doing a Bayes Optimized search for hyperparameter tuning. I’m wondering if anybody has a good reference to explain the basic theory of Bayes search or a tutorial for the code. I had to read some papers and documentation on skopt to understand it but I wish there existed an easier tutorial for it.

Here’s some links that I read that I found helpful for learning Bayes Optimized search:

  1. This is a simpler broad overview of some big picture ideas of Bayes Search but done through the library hyperopt - I would only suggest skimming this article for buzzwords.
    Bayesian Optimization for quicker hyperparameter tuning

  2. This is more of middle ground between math and big picture ideas:
    https://proceedings.neurips.cc/paper/2012/file/05311655a15b75fab86956663e1819cd-Paper.pdf

  3. This is an article that goes into detail of some of the math. I liked it but I only read up to section 2.3 b/c I didn’t find the rest of it helpful.
    https://arxiv.org/pdf/1012.2599.pdf

Extra 4) This is a video explaining what a Gaussian process is. I liked the presentation:

Finally, here’s a link to the documentation of BayesSearchCV in skopt. It works basically like the stuff in scikit learn but be careful that you may need to specify which data in your search space is Real a.k.a. Numerical and what is Categorical (Please see the second link on Bayes optimization in skopt for more detail)

I wanted to add that if you have a code solution like mine then you’ll see that the BayesSearchCV they pass in a dictionary for the parameters and one of their dictionary elements is ‘C’ : Real(0, 100, prior = ‘uniform’) or something. I don’t think they needed to set the prior to be ‘uniform’ because the default value for prior is ‘uniform’ according to the skopt documentation (please the second link under skopt documention in my previous post). I’m wondering if I’m misunderstanding something or if the person who wrote the solution was doing something unnecessary.