Book Image

Hands-On Automated Machine Learning

By : Sibanjan Das, Umit Mert Cakmak
Book Image

Hands-On Automated Machine Learning

By: Sibanjan Das, Umit Mert Cakmak

Overview of this book

AutoML is designed to automate parts of Machine Learning. Readily available AutoML tools are making data science practitioners’ work easy and are received well in the advanced analytics community. Automated Machine Learning covers the necessary foundation needed to create automated machine learning modules and helps you get up to speed with them in the most practical way possible. In this book, you’ll learn how to automate different tasks in the machine learning pipeline such as data preprocessing, feature selection, model training, model optimization, and much more. In addition to this, it demonstrates how you can use the available automation libraries, such as auto-sklearn and MLBox, and create and extend your own custom AutoML components for Machine Learning. By the end of this book, you will have a clearer understanding of the different aspects of automated Machine Learning, and you’ll be able to incorporate automation tasks using practical datasets. You can leverage your learning from this book to implement Machine Learning in your projects and get a step closer to winning various machine learning competitions.
Table of Contents (10 chapters)

Hyperparameters

In order to better understand this process, you will start simple with Branin function which has 3 global minima:

The following code snippet shows you the minimization of the Branin function:

import numpy as np

def branin(x):

# Branin function has 2 dimensions and it has 3 global mimima
x1 = x[0]
x2 = x[1]

# Global minimum is f(x*)=0.397887 at points (-pi, 12.275), (pi,2.275) and (9.42478, 2.475)

# Recommended values of a, b, c, r, s and t for Branin function
a = 1
b = 5.1 / (4 * np.pi**2)
c = 5. / np.pi
r = 6.
s = 10.
t = 1 / (8 * np.pi)

# Calculating separate parts of the function first for verbosity
p1 = a * (x2 - (b * x1**2) + (c * x1) - r)**2
p2 = s * (1-t) * np.cos(x1)
p3 = s

# Calculating result
ret = p1 + p2 + p3

return ret

# minimize function from scipy.optimize will minimize a scalar function with one...