Welcome back.
We reshaped the data, which is an essential because machine learning algorithms expect features to
be in 2D format.
So we transformed the 1D array into 2D array.
Then we need to build the TensorFlow model.
Here I want from you to focus with me because it's a very crucial and essential step.
Let's start by model equals to dot dot sequential.
And inside this function we need to pass an array.
This array takes the tf.keras layers dot dense.
And we passed one input shape and the name linear.
Let me explain everything here.
Here we are creating a simple model with exactly one on your own tf.keras dot sequential.
This is a function that takes an array as a parameter creates a linear stack of layers that are executed
in order from input to output, like stacking Lego blocks.
And inside this array we have the layers dense, which is creating dense.
Layer a fully connected layer.
Every input connects to every output.
Here we have the three parameters one input shape and the name.
One number of neurons in the layer output dimension.
For linear regression, one neuron equals to one output value.
The predicted price, the input shape one and comma defines what kind of input the model expects.
One expects one feature per sample, which is the house size.
So here one is the one feature refers for one feature.
This means each input is a single number like 1.5, 2.0, and so on.
Okay, so we use this df TensorFlow Keras dot sequential function in order to create a linear stack
of layers that are executed in order from input to output.
And since our layers are very simple and our model is very simple, we have only one neuron in the layer,
one neuron and the input shape we have only one input which is the size.
This is the name name linear layer.
It uh it's optional.
You can specify it.
But the main points here that you should pay attention to them are the number of neurons and the number.