Machine Learning with LightGBM and Python: A practitioner's guide to developing production-ready machine learning systems

This document was uploaded by one of our users. The uploader already confirmed that they had the permission to publish it. If you are author/publisher or own the copyright of this documents, please report to us by using this DMCA report form.

Simply click on the Download Book button.

Yes, Book downloads on Ebookily are 100% Free.

Sometimes the book is free on Amazon As well, so go ahead and hit "Search on Amazon"

Take your software to the next level and solve real-world data science problems by building production-ready machine learning solutions using LightGBM and Python Key Features Get started with LightGBM, a powerful gradient-boosting library for building ML solutions Apply data science processes to real-world problems through case studies Elevate your software by building machine learning solutions on scalable platforms Book Description Machine Learning with LightGBM and Python is a comprehensive guide to learning the basics of machine learning and progressing to building scalable machine learning systems that are ready for release. This book will get you acquainted with the high-performance gradient-boosting LightGBM framework and show you how it can be used to solve various machine-learning problems to produce highly accurate, robust, and predictive solutions. Starting with simple machine learning models in scikit-learn, you’ll explore the intricacies of gradient boosting machines and LightGBM. You’ll be guided through various case studies to better understand the data science processes and learn how to practically apply your skills to real-world problems. As you progress, you’ll elevate your software engineering skills by learning how to build and integrate scalable machine-learning pipelines to process data, train models, and deploy them to serve secure APIs using Python tools such as FastAPI. By the end of this book, you’ll be well equipped to use various -of-the-art tools that will help you build production-ready systems, including FLAML for AutoML, PostgresML for operating ML pipelines using Postgres, high-performance distributed training and serving via Dask, and creating and running models in the Cloud with AWS Sagemaker. What you will learn Get an overview of ML and working with data and models in Python using scikit-learn Explore decision trees, ensemble learning, gradient boosting, DART, and GOSS Master LightGBM and apply it to classification and regression problems Tune and train your models using AutoML with FLAML and Optuna Build ML pipelines in Python to train and deploy models with secure and performant APIs Scale your solutions to production readiness with AWS Sagemaker, PostgresML, and Dask Who this book is for This book is for software engineers aspiring to be better machine learning engineers and data scientists unfamiliar with LightGBM, looking to gain in-depth knowledge of its libraries. Basic to intermediate Python programming knowledge is required to get started with the book. The book is also an excellent source for ML veterans, with a strong focus on ML engineering with up-to-date and thorough coverage of platforms such as AWS Sagemaker, PostgresML, and Dask.

Author(s): Andrich van Wyk
Edition: 1
Publisher: Packt Publishing Limited
Year: 2023

Language: English
Pages: 648

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