We will dive into TensorFlow in a future chapter, but regularized linear regression can be implemented with it, so it's good idea to get a feel for how TensorFlow works.
Details on how TensorFlow is structured will be tackled in Chapter 8, Artificial Neural Networks and Deep Learning. Some of its scaffolding may seem odd, and there will be lots of magic numbers. Still, we will progressively use more of it for some small examples.
Let's try to use the Boston dataset for this experiment.
import tensorflow as tf
TensorFlow requires you to create symbols for all elements it works on. These can be variables or placeholders. The former are symbols that TensorFlow will change, whereas placeholders are externally imposed by TensorFlow.
For regression, we need two placeholders, one for the input features and one for the output we want to match. We will...