Book description
Take your machine learning models to the next level by learning how to leverage hyperparameter tuning, allowing you to control the model's finest details
Key Features
- Gain a deep understanding of how hyperparameter tuning works
- Explore exhaustive search, heuristic search, and Bayesian and multi-fidelity optimization methods
- Learn which method should be used to solve a specific situation or problem
Book Description
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.
You'll start with an introduction to hyperparameter tuning and understand why it's important. Next, you'll learn the best methods for hyperparameter tuning for a variety of use cases and specific algorithm types. This book will not only cover the usual grid or random search but also other powerful underdog methods. Individual chapters are also dedicated to the three main groups of hyperparameter tuning methods: exhaustive search, heuristic search, Bayesian optimization, and multi-fidelity optimization. Later, you will learn about top frameworks like Scikit, Hyperopt, Optuna, NNI, and DEAP to implement hyperparameter tuning. Finally, you will cover hyperparameters of popular algorithms and best practices that will help you efficiently tune your hyperparameter.
By the end of this book, you will have the skills you need to take full control over your machine learning models and get the best models for the best results.
What you will learn
- 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
Who this book is for
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.
Table of contents
- Hyperparameter Tuning with Python
- Contributors
- About the author
- About the reviewer
- Preface
- Section 1:The Methods
-
Chapter 1: Evaluating Machine Learning Models
- Technical requirements
- Understanding the concept of overfitting
- Creating training, validation, and test sets
- Exploring random and stratified splits
- Discovering repeated k-fold cross-validation
- Discovering Leave-One-Out cross-validation
- Discovering LPO cross-validation
- Discovering time-series cross-validation
- Summary
- Further reading
- Chapter 2: Introducing Hyperparameter Tuning
- Chapter 3: Exploring Exhaustive Search
- Chapter 4: Exploring Bayesian Optimization
- Chapter 5: Exploring Heuristic Search
- Chapter 6: Exploring Multi-Fidelity Optimization
- Section 2:The Implementation
-
Chapter 7: Hyperparameter Tuning via Scikit
- Technical requirements
- Introducing Scikit
- Implementing Grid Search
- Implementing Random Search
- Implementing Coarse-to-Fine Search
- Implementing Successive Halving
- Implementing Hyper Band
- Implementing Bayesian Optimization Gaussian Process
- Implementing Bayesian Optimization Random Forest
- Implementing Bayesian Optimization Gradient Boosted Trees
- Summary
- Chapter 8: Hyperparameter Tuning via Hyperopt
- Chapter 9: Hyperparameter Tuning via Optuna
-
Chapter 10: Advanced Hyperparameter Tuning with DEAP and Microsoft NNI
- Technical requirements
- Introducing DEAP
- Implementing the Genetic Algorithm
- Implementing Particle Swarm Optimization
- Introducing Microsoft NNI
- Implementing Grid Search
- Implementing Random Search
- Implementing Tree-structured Parzen Estimators
- Implementing Sequential Model Algorithm Configuration
- Implementing Bayesian Optimization Gaussian Process
- Implementing Metis
- Implementing Simulated Annealing
- Implementing Hyper Band
- Implementing Bayesian Optimization Hyper Band
- Implementing Population-Based Training
- Summary
- Section 3:Putting Things into Practice
- Chapter 11: Understanding the Hyperparameters of Popular Algorithms
- Chapter 12: Introducing Hyperparameter Tuning Decision Map
- Chapter 13: Tracking Hyperparameter Tuning Experiments
- Chapter 14: Conclusions and Next Steps
- Other Books You May Enjoy
Product information
- Title: Hyperparameter Tuning with Python
- Author(s):
- Release date: July 2022
- Publisher(s): Packt Publishing
- ISBN: 9781803235875
You might also like
book
Hypermodern Python Tooling
Keeping up with the Python ecosystem can be daunting. Its developer tooling doesn't provide the out-of-the-box …
book
Python Distilled
Expert Insight for Modern Python (3.6+) Development from the Author of Python Essential Reference The richness …
book
Python Object-Oriented Programming - Fourth Edition
A comprehensive guide to exploring modern Python through data structures, design patterns, and effective object-oriented techniques …
book
Data Structures & Algorithms in Python
LEARN HOW TO USE DATA STRUCTURES IN WRITING HIGH PERFORMANCE PYTHON PROGRAMS AND ALGORITHMS This practical …