Book Image

Mastering Azure Machine Learning - Second Edition

By : Christoph Körner, Marcel Alsdorf
Book Image

Mastering Azure Machine Learning - Second Edition

By: Christoph Körner, Marcel Alsdorf

Overview of this book

Azure Machine Learning is a cloud service for accelerating and managing the machine learning (ML) project life cycle that ML professionals, data scientists, and engineers can use in their day-to-day workflows. This book covers the end-to-end ML process using Microsoft Azure Machine Learning, including data preparation, performing and logging ML training runs, designing training and deployment pipelines, and managing these pipelines via MLOps. The first section shows you how to set up an Azure Machine Learning workspace; ingest and version datasets; as well as preprocess, label, and enrich these datasets for training. In the next two sections, you'll discover how to enrich and train ML models for embedding, classification, and regression. You'll explore advanced NLP techniques, traditional ML models such as boosted trees, modern deep neural networks, recommendation systems, reinforcement learning, and complex distributed ML training techniques - all using Azure Machine Learning. The last section will teach you how to deploy the trained models as a batch pipeline or real-time scoring service using Docker, Azure Machine Learning clusters, Azure Kubernetes Services, and alternative deployment targets. By the end of this book, you’ll be able to combine all the steps you’ve learned by building an MLOps pipeline.
Table of Contents (23 chapters)
1
Section 1: Introduction to Azure Machine Learning
5
Section 2: Data Ingestion, Preparation, Feature Engineering, and Pipelining
11
Section 3: The Training and Optimization of Machine Learning Models
17
Section 4: Machine Learning Model Deployment and Operations

Training a CNN for image classification

Now that we have a good understanding of why and when to use DL models, we can start to implement one and run it using Azure Machine Learning. We will start with a task that DL performed very well with over the past years – computer vision, or more precisely, image classification. If you feel that this is too easy for you, you can replace the actual training script with any other computer vision technique and follow along with the steps in this section:

  1. First, we will power up an Azure Machine Learning compute instance, which will serve as our Jupyter Notebook authoring environment. First, we will write a training script and execute it in the authoring environment to verify that it works properly, checkpoints the model, and logs the training and validation metrics. We will train the model for a few epochs to validate the setup, the code, and the resulting model.
  2. Next, we will try to improve the algorithm by adding data augmentation...