WEBVTT

00:00.120 --> 00:00.960
Welcome back.

00:01.400 --> 00:08.120
We reshaped the data, which is an essential because machine learning algorithms expect features to

00:08.120 --> 00:10.160
be in 2D format.

00:10.160 --> 00:15.240
So we transformed the 1D array into 2D array.

00:15.440 --> 00:19.720
Then we need to build the TensorFlow model.

00:19.760 --> 00:26.920
Here I want from you to focus with me because it's a very crucial and essential step.

00:26.960 --> 00:34.080
Let's start by model equals to dot dot sequential.

00:34.320 --> 00:38.840
And inside this function we need to pass an array.

00:39.040 --> 00:44.080
This array takes the tf.keras layers dot dense.

00:44.080 --> 00:49.520
And we passed one input shape and the name linear.

00:49.560 --> 00:52.320
Let me explain everything here.

00:52.360 --> 01:00.920
Here we are creating a simple model with exactly one on your own tf.keras dot sequential.

01:01.160 --> 01:10.460
This is a function that takes an array as a parameter creates a linear stack of layers that are executed

01:10.460 --> 01:15.900
in order from input to output, like stacking Lego blocks.

01:16.020 --> 01:23.540
And inside this array we have the layers dense, which is creating dense.

01:23.540 --> 01:26.220
Layer a fully connected layer.

01:26.220 --> 01:29.780
Every input connects to every output.

01:29.820 --> 01:35.980
Here we have the three parameters one input shape and the name.

01:36.220 --> 01:41.660
One number of neurons in the layer output dimension.

01:41.780 --> 01:47.620
For linear regression, one neuron equals to one output value.

01:47.660 --> 01:58.380
The predicted price, the input shape one and comma defines what kind of input the model expects.

01:58.620 --> 02:03.580
One expects one feature per sample, which is the house size.

02:03.580 --> 02:08.740
So here one is the one feature refers for one feature.

02:09.130 --> 02:17.490
This means each input is a single number like 1.5, 2.0, and so on.

02:17.530 --> 02:29.130
Okay, so we use this df TensorFlow Keras dot sequential function in order to create a linear stack

02:29.250 --> 02:35.570
of layers that are executed in order from input to output.

02:35.570 --> 02:44.730
And since our layers are very simple and our model is very simple, we have only one neuron in the layer,

02:44.850 --> 02:52.290
one neuron and the input shape we have only one input which is the size.

02:52.330 --> 02:54.890
This is the name name linear layer.

02:55.170 --> 02:58.290
It uh it's optional.

02:58.330 --> 02:59.810
You can specify it.

02:59.810 --> 03:09.290
But the main points here that you should pay attention to them are the number of neurons and the number.
