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

XOR classification with machinelearn.js

machinelearn.js is yet another machine learning framework running on the web platform. The primary characteristic of this framework is simplicity. machinelearn.js is originally designed to solve complicated problems by running a machine learning algorithm in a simple manner. Simplicity attracts many developers who are not familiar with machine learning. The latest version of machinelearn.js includes the following algorithms:

  • Clustering:
  • K-Means
  • Decomposition:
  • PCA
  • Classification:
  • Bagging
  • Random forest
  • Logistic regression
  • SGD
  • Naive Bayes
  • Support vector machine
  • K-nearest-neighbors
  • Decision trees
  • Regression:
  • Lasso
  • Linear regression
  • Ridge
  • SGD
  • Model selection:
  • K-fold
  • Train and test split

As you can see, machinelearn.js is very similar to the traditional machine learning framework. The algorithms implemented by the library are pretty mature...