Skip to content

Meadunce/Hyperparameter-Tuning-with-Python

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

38 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Hyperparameter Tuning with Python

Hyperparameter Tuning with Python

This is the code repository for Hyperparameter Tuning with Python, published by Packt.

Boost your machine learning model’s performance via hyperparameter tuning

What is this book about?

Hyperparameters are an important element in building useful machine learning models. This book curates numerous hyperparameter tuning methods for Python, one of the most popular coding languages for machine learning. Alongside in-depth explanations of how each method works, you will use a decision map that can help you identify the best tuning method for your requirements.

This book covers the following exciting features:

  • Discover hyperparameter space and types of hyperparameter distributions
  • Explore manual, grid, and random search, and the pros and cons of each
  • Understand powerful underdog methods along with best practices
  • Explore the hyperparameters of popular algorithms
  • Discover how to tune hyperparameters in different frameworks and libraries
  • Deep dive into top frameworks such as Scikit, Hyperopt, Optuna, NNI, and DEAP
  • Get to grips with best practices that you can apply to your machine learning models right away

If you feel this book is for you, get your copy today!

https://www.packtpub.com/

Instructions and Navigations

All of the code is organized into folders. For example, Chapter03.

The code will look like the following:

for n_est in n_estimators:
          for crit in criterion:
          for m_depth in max_depth:
          #perform cross-validation here

Following is what you need for this book: This book is for data scientists and ML engineers who are working with Python and want to further boost their ML model’s performance by using the appropriate hyperparameter tuning method. Although a basic understanding of machine learning and how to code in Python is needed, no prior knowledge of hyperparameter tuning in Python is required.

With the following software and hardware list you can run all code files present in the book (Chapter 1-14).

Software and Hardware List

You will also need Python version 3.7 (or above) installed on your computer, along with the related packages mentioned in the Technical requirements section of each chapter.

It is worth noting that there is a conflicting version requirement for the Hyperopt package in Chapter 8, Hyperparameter Tuning via Hyperopt, and Chapter 10, Advanced Hyperparameter Tuning with DEAP and Microsoft NNI. You need to install version 0.2.7 for Chapter 8, Hyperparameter Tuning via Hyperopt, and version 0.1.2 for Chapter 10, Advanced Hyperparameter Tuning with DEAP and Microsoft NNI.

It is also worth noting that the HyperBand implementation used in Chapter 7, Hyperparameter Tuning via Scikit, is the modified version of the scikit-hyperband package. You can utilize the modified version by cloning the GitHub repository (a link is available in the next section) and looking in a folder named hyperband.

Open in Google Colab

If you want to run your own experiments, it is suggested to clone this repository and run the corresponding notebook in your local computer. The purpose of these Colab Notebooks is just for you to see the results of all of the examples mentioned in the book.

Sr No. Chapters Colab
1 Chapter 1 - Evaluating Machine Learning Models Open In Colab
2 Chapter 7 - Hyperparameter Tuning via Scikit Open In Colab
3 Chapter 8 - Hyperparameter Tuning via Hyperopt Open In Colab
4 Chapter 9 - Hyperparameter Tuning via Optuna Open In Colab
5 Chapter 10 - Advanced Hyperparameter Tuning via DEAP and Microsoft NNI Open In Colab
6 Chapter 13 - Tracking Hyperparameter Tuning Experiments Open In Colab

We also provide a PDF file that has color images of the screenshots/diagrams used in this book. Click here to download it.

Related products

Get to Know the Author

Louis Owen is a data scientist/AI engineer from Indonesia who is always hungry for new knowledge. Throughout his career journey, he has worked in various fields of industry, including NGOs, e-commerce, conversational AI, OTA, Smart City, and FinTech. Outside of work, he loves to spend his time helping data science enthusiasts to become data scientists, either through his articles or through mentoring sessions. He also loves to spend his spare time doing his hobbies: watching movies and conducting side projects. Finally, Louis loves to meet new friends! So, please feel free to reach out to him on LinkedIn if you have any topics to be discussed.

Download a free PDF

If you have already purchased a print or Kindle version of this book, you can get a DRM-free PDF version at no cost.
Simply click on the link to claim your free PDF.

https://packt.link/free-ebook/9781803235875

About

Hyperparameter Tuning with Python

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • Jupyter Notebook 99.2%
  • Python 0.8%