Chapter 2. Getting started: Simple linear regression in TensorFlow.js
This chapter covers
- A minimal example of a neural network for the simple machine-learning task of linear regression
- Tensors and tensor operations
- Basic neural network optimization
Nobody likes to wait, and it’s especially annoying to wait when we don’t know how long we’ll have to wait for. Any user experience designer will tell you that if you can’t hide the delay, then the next best thing is to give the user a reliable estimate of the wait time. Estimating expected delays is a prediction problem, and the TensorFlow.js library can be used to build an accurate download-time prediction, sensitive to the context and user, enabling us to build clear, reliable experiences that respect the user’s time and attention.
In this chapter, using a simple download-time prediction problem as our motivating example, we will introduce the main components of a complete machine-learning model. We will cover tensors, modeling, and optimization from a practical point of view so that you can build intuitions about what they are, how they work, and how to use them appropriately.