Machine Learning with LightGBM and Python: A practitioner's guide to developing production-ready machine learning systems [1 ed.] 9781800564749

Take your software to the next level and solve real-world data science problems by building production-ready machine lea

121 64 8MB

English Pages 648 Year 2023

Report DMCA / Copyright

DOWNLOAD EPUB FILE

Table of contents :
Machine Learning with LightGBM and Python
Contributors
About the author
About the reviewers
Preface
Who this book is for
What this book covers
To get the most out of this book
Download the example code files
Conventions used
Get in touch
Share Your Thoughts
Download a free PDF copy of this book
Part 1: Gradient Boosting and LightGBM Fundamentals
1
Introducing Machine Learning
Technical requirements
What is machine learning?
Machine learning paradigms
Introducing models, datasets, and supervised learning
Models
Hyperparameters
Datasets
Overfitting and generalization
Supervised learning
Model performance metrics
A modeling example
Decision tree learning
Entropy and information gain
Building a decision tree using C4.5
Overfitting in decision trees
Building decision trees with scikit-learn
Decision tree hyperparameters
Summary
References
2
Ensemble Learning – Bagging and Boosting
Technical requirements
Ensemble learning
Bagging and random forests
Random forest
Gradient-boosted decision trees
Gradient descent
Gradient boosting
Gradient-boosted decision tree hyperparameters
Gradient boosting in scikit-learn
Advanced boosting algorithm – DART
Summary
References
3
An Overview of LightGBM in Python
Technical requirements
Introducing LightGBM
LightGBM optimizations
Hyperparameters
Limitations of LightGBM
Getting started with LightGBM in Python
LightGBM Python API
LightGBM scikit-learn API
Building LightGBM models
Cross-validation
Parameter optimization
Predicting student academic success
Summary
References
4
Comparing LightGBM, XGBoost, and Deep Learning
Technical requirements
An overview of XGBoost
Comparing XGBoost and LightGBM
Python XGBoost example
Deep learning and TabTransformers
What is deep learning?
Introducing TabTransformers
Comparing LightGBM, XGBoost, and TabTransformers
Predicting census income
Detecting credit card fraud
Summary
References
Part 2: Practical Machine Learning with LightGBM
5
LightGBM Parameter Optimization with Optuna
Technical requirements
Optuna and optimization algorithms
Introducing Optuna
Optimization algorithms
Pruning strategies
Optimizing LightGBM with Optuna
Advanced Optuna features
Summary
References
6
Solving Real-World Data Science Problems with LightGBM
Technical requirements
The data science life cycle
Defining the data science life cycle
Predicting wind turbine power generation with LightGBM
Problem definition
Data collection
Data preparation
EDA
Modeling
Model deployment
Communicating results
Classifying individual credit scores with LightGBM
Problem definition
Data collection
Data preparation
EDA
Modeling
Model deployment and results
Summary
References
7
AutoML with LightGBM and FLAML
Technical requirements
Automated machine learning
Automating feature engineering
Automating model selection and tuning
Risks of using AutoML systems
Introducing FLAML
Cost Frugal Optimization
BlendSearch
FLAML limitations
Case study – using FLAML with LightGBM
Feature engineering
FLAML AutoML
Zero-shot AutoML
Summary
References
Part 3: Production-ready Machine Learning with LightGBM
8
Machine Learning Pipelines and MLOps with LightGBM
Technical requirements
Introducing machine learning pipelines
Scikit-learn pipelines
Understanding MLOps
Deploying an ML pipeline for customer churn
Building an ML pipeline using scikit-learn
Building an ML API using FastAPI
Containerizing our API
Deploying LightGBM to Google Cloud
Summary
9
LightGBM MLOps with AWS SageMaker
Technical requirements
An introduction to AWS and SageMaker
AWS
SageMaker
SageMaker Clarify
Building a LightGBM ML pipeline with Amazon SageMaker
Setting up a SageMaker session
Preprocessing step
Model training and tuning
Evaluation, bias, and explainability
Deploying and monitoring the LightGBM model
Results
Summary
References
10
LightGBM Models with PostgresML
Technical requirements
Introducing PostgresML
Latency and round trips
Getting started with PostgresML
Training models
Deploying and prediction
PostgresML dashboard
Case study – customer churn with PostgresML
Data loading and preprocessing
Training and hyperparameter optimization
Predictions
Summary
References
11
Distributed and GPU-Based Learning with LightGBM
Technical requirements
Distributed learning with LightGBM and Dask
GPU training for LightGBM
Setting up LightGBM for the GPU
Running LightGBM on the GPU
Summary
References
Index
Why subscribe?
Other Books You May Enjoy
Packt is searching for authors like you
Share Your Thoughts
Download a free PDF copy of this book

Machine Learning with LightGBM and Python: A practitioner's guide to developing production-ready machine learning systems [1 ed.]
 9781800564749

  • 0 0 0
  • Like this paper and download? You can publish your own PDF file online for free in a few minutes! Sign Up
Recommend Papers