Hyperparameter Tuning with Python: Boost your machine learning model’s performance via hyperparameter tuning
- Length: 306 pages
- Edition: 1
- Language: English
- Publisher: Packt Publishing
- Publication Date: 2022-07-29
- ISBN-10: 180323587X
- ISBN-13: 9781803235875
- Sales Rank: #0 (See Top 100 Books)
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.
Hyperparameter Tuning with Python Contributors About the author About the reviewer Preface Who this book is for What this book covers To get the most out of this book Download the example code files Download the color images Conventions used Get in touch Share Your Thoughts 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 What is hyperparameter tuning? Demystifying hyperparameters versus parameters Understanding hyperparameter space and distributions Summary Chapter 3: Exploring Exhaustive Search Understanding manual search Understanding grid search Understanding random search Summary Chapter 4: Exploring Bayesian Optimization Introducing BO Understanding BO GP Understanding SMAC Understanding TPE Understanding Metis Summary Chapter 5: Exploring Heuristic Search Understanding simulated annealing Understanding genetic algorithms Understanding particle swarm optimization Understanding Population-Based Training Summary Chapter 6: Exploring Multi-Fidelity Optimization Introducing MFO Understanding coarse-to-fine search Understanding successive halving Understanding hyper band Understanding BOHB Summary 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 Technical requirements Introducing Hyperopt Implementing Random Search Implementing Tree-structured Parzen Estimators Implementing Adaptive TPE Implementing simulated annealing Summary Chapter 9: Hyperparameter Tuning via Optuna Technical requirements Introducing Optuna Implementing TPE Implementing Random Search Implementing Grid Search Implementing Simulated Annealing Implementing Successive Halving Implementing Hyperband Summary 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 Exploring Random Forest hyperparameters Exploring XGBoost hyperparameters Exploring LightGBM hyperparameters Exploring CatBoost hyperparameters Exploring SVM hyperparameters Exploring artificial neural network hyperparameters Summary Chapter 12: Introducing Hyperparameter Tuning Decision Map Getting familiar with HTDM Case study 1 – using HTDM with a CatBoost classifier Case study 2 – using HTDM with a conditional hyperparameter space Case study 3 – using HTDM with prior knowledge of the hyperparameter values Summary Chapter 13: Tracking Hyperparameter Tuning Experiments Technical requirements Revisiting the usual practices Using a built-in Python dictionary Using a configuration file Using additional modules Exploring Neptune Exploring scikit-optimize Exploring Optuna Exploring Microsoft NNI Exploring MLflow Summary Chapter 14: Conclusions and Next Steps Revisiting hyperparameter tuning methods and packages Revisiting HTDM What’s next? Summary Why subscribe? Other Books You May Enjoy Packt is searching for authors like you Share Your Thoughts
Donate to keep this site alive
How to download source code?
1. Go to: https://github.com/PacktPublishing
2. In the Find a repository… box, search the book title: Hyperparameter Tuning with Python: Boost your machine learning model’s performance via hyperparameter tuning
, sometime you may not get the results, please search the main title.
3. Click the book title in the search results.
3. Click Code to download.
1. Disable the AdBlock plugin. Otherwise, you may not get any links.
2. Solve the CAPTCHA.
3. Click download link.
4. Lead to download server to download.