Book Image

Hands-On Machine Learning with TensorFlow.js

By : Kai Sasaki
Book Image

Hands-On Machine Learning with TensorFlow.js

By: Kai Sasaki

Overview of this book

TensorFlow.js is a framework that enables you to create performant machine learning (ML) applications that run smoothly in a web browser. With this book, you will learn how to use TensorFlow.js to implement various ML models through an example-based approach. Starting with the basics, you'll understand how ML models can be built on the web. Moving on, you will get to grips with the TensorFlow.js ecosystem to develop applications more efficiently. The book will then guide you through implementing ML techniques and algorithms such as regression, clustering, fast Fourier transform (FFT), and dimensionality reduction. You will later cover the Bellman equation to solve Markov decision process (MDP) problems and understand how it is related to reinforcement learning. Finally, you will explore techniques for deploying ML-based web applications and training models with TensorFlow Core. Throughout this ML book, you'll discover useful tips and tricks that will build on your knowledge. By the end of this book, you will be equipped with the skills you need to create your own web-based ML applications and fine-tune models to achieve high performance.
Table of Contents (17 chapters)
Free Chapter
1
Section 1: The Rationale of Machine Learning and the Usage of TensorFlow.js
5
Section 2: Real-World Applications of TensorFlow.js
12
Section 3: Productionizing Machine Learning Applications with TensorFlow.js

What this book covers

Chapter 1, Machine Learning for the Web, will show you the importance of ML on the web platform. Fundamentally, ML applications should provide some value to the users through a user-facing interface such as a web platform. In this chapter, we will leverage ML on the web platform to remove the fences between the user-facing environment and the environment where traditional server-side ML runs. You will learn how to install TensorFlow.js and set up the environment around it.

Chapter 2, Importing Pretrained Models into TensorFlow.js, explains how to import Keras pretrained models into TensorFlow.js. Since TensorFlow Core can train such a model efficiently, we can easily reuse the model in a client-side application.

Chapter 3, TensorFlow.js Ecosystem, shows you how to use some frameworks and libraries running with TensorFlow.js that are used to construct ML models, so that you can develop your own application more efficiently.

Chapter 4, Polynomial Regression, shows you how TensorFlow.js APIs are used with the simplest models. The application we look at predicts the y value of a sine curve with a given x value by using a polynomial regression model, implemented with a neural network.

Chapter 5, Classification with Logistic Regression, teaches you how to implement a classification model such as a logistic regression model. With the help of a practical example, we will teach you how to write a logistic regression application to classify flower types with the Iris dataset.

Chapter 6, Unsupervised Learning, demonstrates the potential of TensorFlow as an ML framework by implementing a clustering algorithm such as k-means and demonstrating unsupervised learning. We will be implementing the k-means algorithm using the Iris dataset.

Chapter 7, Sequential Data Analysis, explains how the FFT algorithm is implemented in TensorFlow and how to use it in an ML application. You will also learn how complex numerical types are implemented in TensorFlow.js.

Chapter 8, Dimensionality Reduction, introduces t-SNE and how it can be implemented in TensorFlow.js.

Chapter 9, Solving Markov Decision Problems, introduces the implementation of the Bellman equation for solving MDP problems and explains how it is related to reinforcement learning.

Chapter 10, Deploying Machine Learning Applications, shows you the general ways to create a package from a TensorFlow.js application.

Chapter 11, Tuning Applications to Achieve High Performance, shows you how to make use of certain backend implementations to pursue high performance as well as giving you tips for tuning an application written in TensorFlow.js.

Chapter 12, Future Works around TensorFlow.js, covers more advanced features and optimizations implemented in TensorFlow.js so that you can learn about what is going on in TensorFlow.js projects.