This is the code repository for Hyperparameter Tuning with Python, published by Packt.
Boost your machine learning model’s performance via hyperparameter tuning
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!
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).
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.
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.
We also provide a PDF file that has color images of the screenshots/diagrams used in this book. Click here to download it.
-
Machine Learning for Streaming Data with Python [Packt] [Amazon]
-
Machine Learning with PyTorch and Scikit-Learn [Packt] [Amazon]
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.
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.