Book Image

Automated Machine Learning with AutoKeras

By : Luis Sobrecueva
Book Image

Automated Machine Learning with AutoKeras

By: Luis Sobrecueva

Overview of this book

AutoKeras is an AutoML open-source software library that provides easy access to deep learning models. If you are looking to build deep learning model architectures and perform parameter tuning automatically using AutoKeras, then this book is for you. This book teaches you how to develop and use state-of-the-art AI algorithms in your projects. It begins with a high-level introduction to automated machine learning, explaining all the concepts required to get started with this machine learning approach. You will then learn how to use AutoKeras for image and text classification and regression. As you make progress, you'll discover how to use AutoKeras to perform sentiment analysis on documents. This book will also show you how to implement a custom model for topic classification with AutoKeras. Toward the end, you will explore advanced concepts of AutoKeras such as working with multi-modal data and multi-task, customizing the model with AutoModel, and visualizing experiment results using AutoKeras Extensions. By the end of this machine learning book, you will be able to confidently use AutoKeras to design your own custom machine learning models in your company.
Table of Contents (15 chapters)
1
Section 1: AutoML Fundamentals
5
Section 2: AutoKeras in Practice
11
Section 3: Advanced AutoKeras

Creating a news topic classifier

The model we are going to create will classify news from the Reuters newswire classification dataset. It will read the raw text of each news item and classify it into sections, assigning a label corresponding to the section that they belong to (Sports, Weather, Travel, and so on).

Reuters newswire is a dataset that contains 11,228 newswires from Reuters, labeled over 46 topics.

The text of each news item is encoded as a list of word indexes. These are integers that are indexed by frequency in the dataset. So, here, integer 1 encodes the first most frequent word in the data, 2 encodes the second most frequent, and so on.

The notebook that contains the complete source code can be found at https://github.com/PacktPublishing/Automated-Machine-Learning-with-AutoKeras/blob/main/Chapter08/Chapter8_Reuters.ipynb.

Now, let's have a look at the relevant cells of the notebook in detail:

  • Installing AutoKeras: As we've mentioned in...