Book Image

Azure Machine Learning Engineering

By : Sina Fakhraee, Balamurugan Balakreshnan, Megan Masanz
Book Image

Azure Machine Learning Engineering

By: Sina Fakhraee, Balamurugan Balakreshnan, Megan Masanz

Overview of this book

Data scientists working on productionizing machine learning (ML) workloads face a breadth of challenges at every step owing to the countless factors involved in getting ML models deployed and running. This book offers solutions to common issues, detailed explanations of essential concepts, and step-by-step instructions to productionize ML workloads using the Azure Machine Learning service. You’ll see how data scientists and ML engineers working with Microsoft Azure can train and deploy ML models at scale by putting their knowledge to work with this practical guide. Throughout the book, you’ll learn how to train, register, and productionize ML models by making use of the power of the Azure Machine Learning service. You’ll get to grips with scoring models in real time and batch, explaining models to earn business trust, mitigating model bias, and developing solutions using an MLOps framework. By the end of this Azure Machine Learning book, you’ll be ready to build and deploy end-to-end ML solutions into a production system using the Azure Machine Learning service for real-time scenarios.
Table of Contents (17 chapters)
1
Part 1: Training and Tuning Models with the Azure Machine Learning Service
7
Part 2: Deploying and Explaining Models in AMLS
12
Part 3: Productionizing Your Workload with MLOps

Sampling hyperparameters

Inside the search space, hyperparameters are either continuous or discrete values. Continuous hyperparameters can be in a continuous range of values, while discrete hyperparameters are only able to use certain values. For logistic regression, the penalty term can have one of two discrete values: l1 or l2. AMLS can use either a list or a range for setting hyperparameters, as we will see when we dig into the code.

For the hyperparameter of C, we could define it as a discrete value, or we could define C to be a value in a continuous range with a specified distribution.

For the max_iter hyperparameter, the default value for the sklearn logistic regression model is 100. We could set this to a discrete value such as penality_term, or a uniform value such as C.

The following code shown in Figure 4.4 defines the search space for the penalty term, the inverse regularization strength of the model, and the maximum iterations as choices, which are discrete values...