Chapter 3. Starting with Machine Learning

In this chapter, we will cover the following topics:

  • Linear regression
  • The MNIST dataset
  • Classifiers
  • The nearest neighbor algorithm
  • Data clustering
  • The k-means algorithm

The linear regression algorithm

In this section, we begin our exploration of machine learning techniques with the linear regression algorithm. Our goal is to build a model by which to predict the values of a dependent variable from the values of one or more independent variables.

The relationship between these two variables is linear; that is, if y is the dependent variable and x the independent, then the linear relationship between the two variables will look like this: y = Ax + b.

The linear regression algorithm adapts to a great variety of situations; ...

Get Getting Started with TensorFlow now with O’Reilly online learning.

O’Reilly members experience live online training, plus books, videos, and digital content from 200+ publishers.