1
00:00:00,000 --> 00:00:04,000
So now let's go ahead and probably implement this regression problem statement.

2
00:00:04,000 --> 00:00:06,000
So what I will do I will go ahead and write over here.

3
00:00:06,000 --> 00:00:12,000
And inside this folder only I will be creating this because we are going to follow the same steps.

4
00:00:12,000 --> 00:00:20,000
So I'll go ahead and write I regression regression ipynb I'll say churn regression or I'll say salary

5
00:00:20,000 --> 00:00:21,000
regression.

6
00:00:21,000 --> 00:00:21,000
Okay.

7
00:00:21,000 --> 00:00:23,000
So this will be my file.

8
00:00:23,000 --> 00:00:27,000
I will go ahead and quickly select my kernel okay.

9
00:00:27,000 --> 00:00:30,000
Now first of all, what are the steps that we will do.

10
00:00:30,000 --> 00:00:36,000
So initially we will go ahead and import all the necessary modules that is required like train test,

11
00:00:36,000 --> 00:00:39,000
split, standard scaler, label encoder one hot encoder and pickle.

12
00:00:39,000 --> 00:00:40,000
Okay.

13
00:00:40,000 --> 00:00:41,000
So we'll go with the first step over here.

14
00:00:42,000 --> 00:00:47,000
Then uh, after this we will be reading our CSV file.

15
00:00:47,000 --> 00:00:49,000
So I'll go ahead and write read underscore CSV.

16
00:00:49,000 --> 00:00:54,000
And let me just go ahead and write this as churn modeling.

17
00:00:54,000 --> 00:00:55,000
Churn.

18
00:00:56,000 --> 00:01:00,000
Churn underscore modeling dot csv file okay.

19
00:01:01,000 --> 00:01:07,000
Now if I go ahead and write data dot head I will be able to get my out input over here.

20
00:01:07,000 --> 00:01:09,000
And this is my entire data set right.

21
00:01:09,000 --> 00:01:15,000
As I said estimated salary will be my output feature and remaining all will be my independent feature.

22
00:01:15,000 --> 00:01:15,000
Okay.

23
00:01:15,000 --> 00:01:18,000
And that is the reason the output feature is a continuous value over here.

24
00:01:18,000 --> 00:01:22,000
So we are considering this as a regression problem statement.

25
00:01:22,000 --> 00:01:29,000
Now after this the next state that what I will do is that I will delete this row number, customer ID

26
00:01:29,000 --> 00:01:30,000
and surname.

27
00:01:30,000 --> 00:01:36,000
Whatever things we did in the classification problem almost the same way, we have to probably do this.

28
00:01:36,000 --> 00:01:37,000
Okay, so I have executed this.

29
00:01:37,000 --> 00:01:45,000
Then we will go ahead and convert this, uh, gender from female male to zeros and ones.

30
00:01:45,000 --> 00:01:48,000
Because this here I'm going to use my label encoder.

31
00:01:48,000 --> 00:01:52,000
So for that I will go ahead and create my variable label encoder gender.

32
00:01:52,000 --> 00:01:54,000
I will initialize to label encoder.

33
00:01:54,000 --> 00:01:55,000
And then I will go ahead and write.

34
00:01:55,000 --> 00:01:59,000
Data of gender is equal to label encoder dot fit underscore transform okay.

35
00:01:59,000 --> 00:02:03,000
Similarly I will go ahead and do it for the geographic column.

36
00:02:03,000 --> 00:02:08,000
Also where I'm going to use one hot encoder Again I'll use fit underscore transform.

37
00:02:08,000 --> 00:02:10,000
I'll convert this into arrays.

38
00:02:10,000 --> 00:02:14,000
I will get all my values, then convert this into my data frame along with my features.

39
00:02:14,000 --> 00:02:20,000
Okay, so if you go ahead and see your geo underscore encoded underscore DF, you'll be able to see

40
00:02:20,000 --> 00:02:22,000
hey I'm getting this three features.

41
00:02:22,000 --> 00:02:23,000
Okay.

42
00:02:23,000 --> 00:02:28,000
Then we are going to combine this one hot encoded columns with my original data.

43
00:02:28,000 --> 00:02:30,000
Step by step we are going to do this.

44
00:02:30,000 --> 00:02:33,000
So finally you'll be able to see data dot head.

45
00:02:33,000 --> 00:02:35,000
And we also dropping the geographic column.

46
00:02:35,000 --> 00:02:37,000
Now I don't have my geographic column.

47
00:02:37,000 --> 00:02:41,000
And if you probably go ahead and see my this three columns have got added.

48
00:02:41,000 --> 00:02:41,000
Perfect.

49
00:02:42,000 --> 00:02:48,000
Now we are going to split our data into features uh into our independent features and target feature.

50
00:02:48,000 --> 00:02:49,000
Right dependent feature also.

51
00:02:49,000 --> 00:02:52,000
So I'm dropping estimated salary from this.

52
00:02:52,000 --> 00:02:57,000
And all the remaining features will go in x axis and my estimated salary will go in the y axis.

53
00:02:57,000 --> 00:02:57,000
Okay.

54
00:02:58,000 --> 00:03:00,000
So this is done a bit of processing.

55
00:03:00,000 --> 00:03:06,000
Now I will save all the pickle file specifically for transformation like label encoder dot pickle.

56
00:03:06,000 --> 00:03:08,000
Then you have one hot encoder dot pickle.

57
00:03:08,000 --> 00:03:12,000
Then one more pickle that we are going to probably create a scalar pickle.

58
00:03:12,000 --> 00:03:20,000
But uh, the scalar dot pickle we will specifically use uh only when we try to, uh, you know, do

59
00:03:20,000 --> 00:03:21,000
the train test split.

60
00:03:21,000 --> 00:03:23,000
So let's go ahead and do the train test split also.

61
00:03:23,000 --> 00:03:26,000
So here I will take this code quickly.

62
00:03:26,000 --> 00:03:31,000
I will just copy and paste it so that I don't have to waste more time on this writing the entire thing,

63
00:03:31,000 --> 00:03:32,000
because we are doing the same thing.

64
00:03:32,000 --> 00:03:37,000
If I was doing something else then I could had probably done that.

65
00:03:37,000 --> 00:03:41,000
Okay, so here I'll go back to my salary regression quickly.

66
00:03:41,000 --> 00:03:44,000
I will go ahead and write code now.

67
00:03:44,000 --> 00:03:45,000
Quickly I'll paste it over here.

68
00:03:45,000 --> 00:03:45,000
Okay.

69
00:03:45,000 --> 00:03:46,000
Train test split.

70
00:03:46,000 --> 00:03:54,000
And now I will go ahead and apply my standard scaler scale this feature quickly.

71
00:03:55,000 --> 00:03:56,000
Salary okay.

72
00:03:56,000 --> 00:03:59,000
And here I will go ahead and do this.

73
00:03:59,000 --> 00:04:01,000
And this is done right.

74
00:04:01,000 --> 00:04:03,000
Okay I'm getting an error.

75
00:04:03,000 --> 00:04:04,000
Could not convert string to me.

76
00:04:04,000 --> 00:04:05,000
Why.

77
00:04:06,000 --> 00:04:12,000
Because let's see my x x x value.

78
00:04:12,000 --> 00:04:12,000
Okay.

79
00:04:12,000 --> 00:04:14,000
Gender is still male and female.

80
00:04:14,000 --> 00:04:15,000
Why why why why.

81
00:04:15,000 --> 00:04:19,000
Because data of gender it is.

82
00:04:19,000 --> 00:04:19,000
Okay, fine.

83
00:04:20,000 --> 00:04:22,000
Data of gender.

84
00:04:23,000 --> 00:04:28,000
So if I replace this what is my data over here.

85
00:04:30,000 --> 00:04:35,000
If you see the data or let me execute this once again, I think I have missed something so I'll quickly

86
00:04:35,000 --> 00:04:36,000
execute this.

87
00:04:36,000 --> 00:04:37,000
I'll remove this tree.

88
00:04:37,000 --> 00:04:38,000
I'll see this.

89
00:04:38,000 --> 00:04:40,000
Now let's go ahead and check my data.

90
00:04:40,000 --> 00:04:43,000
So my data is basically having zeros and ones.

91
00:04:43,000 --> 00:04:47,000
I think I missed one line of code in executing it.

92
00:04:47,000 --> 00:04:48,000
Then I'll do the concatenation.

93
00:04:48,000 --> 00:04:51,000
And finally I will do the concatenation.

94
00:04:51,000 --> 00:04:55,000
This has got executed I have gender zero and 1X1Y.

95
00:04:55,000 --> 00:05:00,000
I get it and I'm doing the train test split and now it should do the scaling.

96
00:05:00,000 --> 00:05:01,000
Okay, so I missed one code.

97
00:05:01,000 --> 00:05:03,000
So that is the reason that was the issue.

98
00:05:03,000 --> 00:05:05,000
Now we'll go ahead and save all the pickle files.

99
00:05:05,000 --> 00:05:10,000
Scaler dot pickle file one hot encoder G0 and label encoder gender pickle file.

100
00:05:10,000 --> 00:05:19,000
Okay, now it's the time to train our Ann with regression problem statement.

101
00:05:19,000 --> 00:05:19,000
Right.

102
00:05:21,000 --> 00:05:24,000
How to train our Ann over here.

103
00:05:24,000 --> 00:05:26,000
That is what we are basically going to discuss.

104
00:05:26,000 --> 00:05:27,000
And this is the important thing.

105
00:05:27,000 --> 00:05:29,000
Remaining thing are almost same.

106
00:05:29,000 --> 00:05:31,000
We do not have to make any changes okay.

107
00:05:32,000 --> 00:05:34,000
Now let's go ahead and quickly do this.

108
00:05:34,000 --> 00:05:39,000
So first of all again I will import TensorFlow as Keras okay.

109
00:05:39,000 --> 00:05:41,000
And then we are importing sequential and dense.

110
00:05:41,000 --> 00:05:43,000
So first of all we'll go ahead and import this.

111
00:05:43,000 --> 00:05:48,000
So once this is imported we are good to go and work with sequential and dense.

112
00:05:48,000 --> 00:05:52,000
And we are good to work with our entire neural network okay.

113
00:05:52,000 --> 00:05:54,000
So here we are executing this.

114
00:05:54,000 --> 00:05:58,000
Then quickly let us go ahead and do this okay.

115
00:05:58,000 --> 00:06:00,000
So we will go ahead and build our model again.

116
00:06:00,000 --> 00:06:03,000
To build our model we will use the same technique.

117
00:06:04,000 --> 00:06:09,000
Like first of all I will say hey go ahead and take this extreme dot shape of one as input shape.

118
00:06:09,000 --> 00:06:11,000
This will be my input layer.

119
00:06:11,000 --> 00:06:13,000
Then we are going to apply an activation function.

120
00:06:13,000 --> 00:06:15,000
The first hidden layer will have 64 neurons.

121
00:06:15,000 --> 00:06:17,000
The second hidden layer will be having 32 neurons.

122
00:06:17,000 --> 00:06:19,000
And the activation function will be ReLU.

123
00:06:19,000 --> 00:06:21,000
And the dense will basically have one.

124
00:06:21,000 --> 00:06:22,000
Okay.

125
00:06:22,000 --> 00:06:26,000
Now when we are using one here, we are not applying any activation function.

126
00:06:26,000 --> 00:06:30,000
When we don't apply any activation function, the default activation function that will be applied is

127
00:06:30,000 --> 00:06:32,000
called as linear activation function.

128
00:06:32,000 --> 00:06:35,000
Now linear activation function is specifically for regression.

129
00:06:35,000 --> 00:06:36,000
That basically means I'm not doing anything.

130
00:06:36,000 --> 00:06:38,000
Instead I'm getting whatever output I'm getting.

131
00:06:38,000 --> 00:06:39,000
I'm using that okay.

132
00:06:40,000 --> 00:06:44,000
Now after this we will go ahead and compile this model okay.

133
00:06:44,000 --> 00:06:46,000
So we will go ahead and write compile the model.

134
00:06:46,000 --> 00:06:50,000
Now for compiling the model I will go ahead and write compile model dot compile.

135
00:06:50,000 --> 00:06:54,000
And here uh first of all I'll go ahead and write my optimizer.

136
00:06:54,000 --> 00:06:56,000
Let's say the optimizer is Adam.

137
00:06:56,000 --> 00:07:00,000
For this case you can also go ahead and initialize it from Tensorflow.keras.

138
00:07:00,000 --> 00:07:01,000
But I'm directly writing the keyword.

139
00:07:02,000 --> 00:07:04,000
Then my loss.

140
00:07:04,000 --> 00:07:09,000
Now this is what is the main thing that actually changes in regression.

141
00:07:09,000 --> 00:07:13,000
In loss we will basically use mean absolute error okay.

142
00:07:13,000 --> 00:07:15,000
You can also use mean squared error.

143
00:07:15,000 --> 00:07:18,000
But here we are just going to use mean absolute error.

144
00:07:18,000 --> 00:07:19,000
It is up to you.

145
00:07:19,000 --> 00:07:23,000
And here the metrics that we are specifically going to use is nothing.

146
00:07:23,000 --> 00:07:24,000
But it will be me.

147
00:07:24,000 --> 00:07:24,000
Okay.

148
00:07:25,000 --> 00:07:31,000
Again, you can see the Keras documentation what all loss will specifically be happening over here.

149
00:07:31,000 --> 00:07:34,000
So if I go ahead and open Google right.

150
00:07:34,000 --> 00:07:39,000
And if I just search for Keras loss functions okay.

151
00:07:39,000 --> 00:07:41,000
So if I just go ahead and click on this.

152
00:07:41,000 --> 00:07:48,000
So it shows so many different for, for uh, you know uh classification problems you have binary cross

153
00:07:48,000 --> 00:07:51,000
entropy, binary focus, cross entropy, categorical cross entropy.

154
00:07:52,000 --> 00:07:55,000
Um, then you have binary cross entropy functions, all these things.

155
00:07:55,000 --> 00:07:55,000
Right?

156
00:07:56,000 --> 00:07:58,000
Uh, for regression you have mean squared class.

157
00:07:58,000 --> 00:07:59,000
See this?

158
00:07:59,000 --> 00:08:00,000
This is what I've used.

159
00:08:00,000 --> 00:08:00,000
Right?

160
00:08:00,000 --> 00:08:01,000
Means absolute error.

161
00:08:01,000 --> 00:08:03,000
Right function.

162
00:08:03,000 --> 00:08:05,000
Uh, you can also use mean squared error.

163
00:08:05,000 --> 00:08:05,000
Right.

164
00:08:05,000 --> 00:08:11,000
And already I've spoken about this, uh, even in machine learning, if, you know, machine learning,

165
00:08:11,000 --> 00:08:14,000
I think there all these things will be probably covered up, you know?

166
00:08:14,000 --> 00:08:19,000
So you need to have that basic knowledge with respect to all using this kind of loss function.

167
00:08:19,000 --> 00:08:20,000
Okay.

168
00:08:20,000 --> 00:08:23,000
So now what I will do I will use a matrix as me.

169
00:08:23,000 --> 00:08:25,000
And then finally let's go ahead and display the summary.

170
00:08:25,000 --> 00:08:27,000
So I'll just go ahead and write model dot summary.

171
00:08:27,000 --> 00:08:32,000
And when I display the model summary then here you can see this is my input.

172
00:08:32,000 --> 00:08:33,000
Uh this is my input.

173
00:08:33,000 --> 00:08:38,000
So the total number of weights and bias are nothing but two nine, four, five.

174
00:08:38,000 --> 00:08:40,000
These are the trainable parameters that we have right?

175
00:08:40,000 --> 00:08:43,000
Then I have dense one dense two.

176
00:08:43,000 --> 00:08:45,000
And finally my output is over here okay.

177
00:08:45,000 --> 00:08:50,000
Now let's go ahead and train this particular model again for training this model I will go ahead and

178
00:08:50,000 --> 00:08:53,000
set my logs okay.

179
00:08:53,000 --> 00:09:00,000
So here are some of the logs I'll say this is my regression logs I'm using early stopping and TensorBoard

180
00:09:00,000 --> 00:09:01,000
as you all know.

181
00:09:01,000 --> 00:09:08,000
So we are going to use both of them so that this folder will get uh, it will just try to whatever logs

182
00:09:08,000 --> 00:09:09,000
is basically coming during the training.

183
00:09:09,000 --> 00:09:11,000
It will be coming over here.

184
00:09:11,000 --> 00:09:14,000
Then we are going to set it to early stopping also.

185
00:09:14,000 --> 00:09:17,000
Now in the case of early stopping I will be using validation loss.

186
00:09:17,000 --> 00:09:23,000
Like uh, whenever we are training our neural network you will be getting, um, training loss, uh

187
00:09:23,000 --> 00:09:24,000
sorry training accuracy.

188
00:09:24,000 --> 00:09:25,000
You'll having training loss.

189
00:09:25,000 --> 00:09:28,000
Then you'll also have, uh, validation accuracy and validation loss.

190
00:09:28,000 --> 00:09:30,000
But I really need to monitor the validation loss.

191
00:09:30,000 --> 00:09:32,000
And I'll keep the patient's value to ten.

192
00:09:32,000 --> 00:09:35,000
That basically means I'm going to see it for ten epochs okay.

193
00:09:35,000 --> 00:09:38,000
And finally we will go ahead and train the model.

194
00:09:38,000 --> 00:09:43,000
Now in order to train the model I need to use this callbacks so early stopping and TensorBoard callback

195
00:09:43,000 --> 00:09:47,000
I'm giving my Xtrain Ytrain y epochs will be 100 and all.

196
00:09:47,000 --> 00:09:48,000
Everything is there, right?

197
00:09:48,000 --> 00:09:54,000
So let's go ahead and train this, uh, and let's see how much will be the answer that I will be getting.

198
00:09:54,000 --> 00:09:56,000
So epoch one here, you can see me.

199
00:09:57,000 --> 00:10:02,000
Uh, uh, these all values are there validation loss here also values are coming.

200
00:10:02,000 --> 00:10:03,000
Right.

201
00:10:03,000 --> 00:10:06,000
And these are keep on decreasing unless and until keeps on decreasing.

202
00:10:06,000 --> 00:10:08,000
This epochs will be going on right.

203
00:10:08,000 --> 00:10:13,000
So the validation loss also you'll be able to see that it is decreasing okay.

204
00:10:13,000 --> 00:10:17,000
See validation m e validation loss unless and until is not decreasing.

205
00:10:17,000 --> 00:10:18,000
Right.

206
00:10:18,000 --> 00:10:21,000
If it if it is maintained uh, in a similar manner.

207
00:10:21,000 --> 00:10:22,000
Hardly.

208
00:10:22,000 --> 00:10:23,000
There is not much difference.

209
00:10:23,000 --> 00:10:24,000
Then it will stop.

210
00:10:24,000 --> 00:10:30,000
So here you can see in epoch 47 it has stopped because till here the loss was going down.

211
00:10:30,000 --> 00:10:32,000
But after this it was almost similar.

212
00:10:32,000 --> 00:10:33,000
Right.

213
00:10:33,000 --> 00:10:36,000
So uh, now my model is almost trained.

214
00:10:36,000 --> 00:10:39,000
Uh, again, this is, uh, I'm actually doing it in my local machine.

215
00:10:40,000 --> 00:10:44,000
Again, I have a powerful CPU, so I'll be able to do it very much fast.

216
00:10:44,000 --> 00:10:46,000
Now let's go ahead and evaluate the model.

217
00:10:49,000 --> 00:10:49,000
Okay.

218
00:10:49,000 --> 00:10:57,000
Now, before that, uh, let me just go ahead and, uh, load my, uh, load extension TensorBoard.

219
00:10:57,000 --> 00:10:57,000
Okay.

220
00:10:58,000 --> 00:11:01,000
So I will just go ahead and execute it.

221
00:11:01,000 --> 00:11:09,000
Then I will say, hey, go ahead and take this TensorBoard and my directory will be regression logs.

222
00:11:09,000 --> 00:11:10,000
Slash.

223
00:11:10,000 --> 00:11:12,000
Let's see this particular folder.

224
00:11:12,000 --> 00:11:16,000
So here you have regression logs slash fit okay.

225
00:11:16,000 --> 00:11:19,000
So slash fit will be my.

226
00:11:19,000 --> 00:11:24,000
So once I execute it here will be able to see that we'll be able to load the TensorBoard.

227
00:11:24,000 --> 00:11:29,000
Now in this TensorBoard all the information regarding how the training has happened and all.

228
00:11:29,000 --> 00:11:32,000
So I'm getting some error.

229
00:11:32,000 --> 00:11:33,000
So this should be directory I guess.

230
00:11:33,000 --> 00:11:36,000
Let's see over here okay.

231
00:11:36,000 --> 00:11:38,000
Again you do not need to buy at it.

232
00:11:38,000 --> 00:11:41,000
You can see the documentation and you should be able to see this okay.

233
00:11:41,000 --> 00:11:44,000
You may be thinking Chris you don't know all these things.

234
00:11:44,000 --> 00:11:47,000
Uh I'm not a I will definitely not buy at it.

235
00:11:47,000 --> 00:11:49,000
So you should also not do that okay.

236
00:11:51,000 --> 00:11:54,000
So this should be the log directory.

237
00:11:54,000 --> 00:11:57,000
And here should be my folder okay.

238
00:11:57,000 --> 00:11:59,000
Now I think it should get executed.

239
00:11:59,000 --> 00:12:00,000
Now we are launching the TensorBoard.

240
00:12:00,000 --> 00:12:02,000
Now this is good enough.

241
00:12:02,000 --> 00:12:06,000
It will take all the events from inside this and it will display it to you okay.

242
00:12:06,000 --> 00:12:12,000
And let's see it is taking some time to load it quickly.

243
00:12:12,000 --> 00:12:13,000
Let it get loaded.

244
00:12:14,000 --> 00:12:20,000
I think for the first time I have to execute two times, but it does not happen in Google Colab.

245
00:12:20,000 --> 00:12:23,000
In Google Colab, in the first instance, only you will be able to run it.

246
00:12:23,000 --> 00:12:26,000
Okay, so this is really, really good.

247
00:12:26,000 --> 00:12:31,000
So here I have got my entire information which is amazing in the TensorBoard.

248
00:12:31,000 --> 00:12:37,000
Now see see see this entire things right now if I go ahead and see with respect to regression epoch

249
00:12:37,000 --> 00:12:38,000
versus loss.

250
00:12:38,000 --> 00:12:40,000
Wow this graph looks amazing.

251
00:12:40,000 --> 00:12:42,000
See it is going down.

252
00:12:42,000 --> 00:12:43,000
Down completely.

253
00:12:43,000 --> 00:12:43,000
Right?

254
00:12:43,000 --> 00:12:46,000
So loss is coming down.

255
00:12:46,000 --> 00:12:48,000
If you see mean absolute error this is also coming down.

256
00:12:48,000 --> 00:12:50,000
I think this is an amazing graph.

257
00:12:51,000 --> 00:12:52,000
And this looks good.

258
00:12:52,000 --> 00:12:57,000
That basically means your epoch is going down that the model is really performing well.

259
00:12:57,000 --> 00:12:59,000
Then here you have evaluation loss versus iteration.

260
00:12:59,000 --> 00:13:00,000
No iteration by iteration.

261
00:13:00,000 --> 00:13:02,000
How much it is basically getting reduced.

262
00:13:02,000 --> 00:13:05,000
Then you also have me versus iteration.

263
00:13:05,000 --> 00:13:06,000
This also you can actually check it out, right?

264
00:13:07,000 --> 00:13:10,000
Um, if you just just want to see the validation.

265
00:13:10,000 --> 00:13:12,000
Validation has this epic loss and all.

266
00:13:12,000 --> 00:13:13,000
So sorry epoch loss and all.

267
00:13:13,000 --> 00:13:15,000
So here you have your Ma.

268
00:13:16,000 --> 00:13:17,000
You can probably zoom in and zoom out.

269
00:13:17,000 --> 00:13:22,000
And based on this you can check you can also do something like this and check it out.

270
00:13:22,000 --> 00:13:23,000
Right.

271
00:13:23,000 --> 00:13:26,000
So all this information from the logs you are able to see it okay.

272
00:13:26,000 --> 00:13:28,000
Now let's do one thing.

273
00:13:29,000 --> 00:13:36,000
So if you see me and all, we will also try to evaluate this model for our test data.

274
00:13:36,000 --> 00:13:40,000
So let's go ahead and evaluate model on the test data.

275
00:13:41,000 --> 00:13:42,000
We're just going to check the accuracy how good it is.

276
00:13:42,000 --> 00:13:48,000
So I will just go ahead and compute my test underscore loss and test underscore m.

277
00:13:49,000 --> 00:13:59,000
Uh sorry me mean absolute error I'm just going to write model dot evaluate x underscore test y underscore

278
00:13:59,000 --> 00:14:00,000
test perfect.

279
00:14:00,000 --> 00:14:03,000
So now I'll just go ahead and print.

280
00:14:03,000 --> 00:14:04,000
And I'll use a f string.

281
00:14:04,000 --> 00:14:06,000
And I'll say hey this is my test.

282
00:14:06,000 --> 00:14:13,000
M a e which is nothing but it will be test underscore ma.

283
00:14:14,000 --> 00:14:18,000
So here you can see five zero, one six and more near to zero.

284
00:14:18,000 --> 00:14:23,000
If it is going on, we can probably say that our model is pretty trained in an amazing way.

285
00:14:23,000 --> 00:14:24,000
Okay.

286
00:14:24,000 --> 00:14:25,000
And this is done.

287
00:14:25,000 --> 00:14:33,000
And what you can also do is that, uh, um, along with this, I can also go ahead and save my regression.py

288
00:14:33,000 --> 00:14:34,000
file.

289
00:14:34,000 --> 00:14:39,000
So I will say, hey, go and save this as my regression model.

290
00:14:40,000 --> 00:14:44,000
Regression model dot h5 file.

291
00:14:44,000 --> 00:14:49,000
Okay, so once I do this, this entire model will get saved.

292
00:14:49,000 --> 00:14:52,000
And I have my regression model dot h5 file.

293
00:14:52,000 --> 00:14:52,000
Right.

294
00:14:53,000 --> 00:14:55,000
So almost we have done each and everything right.

295
00:14:55,000 --> 00:14:59,000
Now if you want to deploy this you have all the H5 files.

296
00:14:59,000 --> 00:15:01,000
You have all the training that is been done.

297
00:15:01,000 --> 00:15:02,000
Now you can also go ahead and deploy it.

298
00:15:02,000 --> 00:15:07,000
So for deployment purpose, what I am doing is that I will give you the entire code again with the help

299
00:15:07,000 --> 00:15:09,000
of Streamlit, you can deploy it.

300
00:15:09,000 --> 00:15:11,000
Let me just go ahead and create a file over here.

301
00:15:11,000 --> 00:15:17,000
Let me say streamlit_regression.py okay.

302
00:15:17,000 --> 00:15:21,000
So I'll give you the code over here so that you can go ahead and do the deployment.

303
00:15:21,000 --> 00:15:22,000
And it's very simple.

304
00:15:23,000 --> 00:15:24,000
It's almost like this only.

305
00:15:24,000 --> 00:15:27,000
So here you can see all the things and estimated salary.

306
00:15:27,000 --> 00:15:29,000
You can basically go ahead and compute it okay.

307
00:15:30,000 --> 00:15:32,000
See we are loading it.

308
00:15:32,000 --> 00:15:34,000
We are creating some user input box.

309
00:15:34,000 --> 00:15:36,000
We are converting this into a data frame.

310
00:15:37,000 --> 00:15:38,000
We are doing the encoding.

311
00:15:38,000 --> 00:15:40,000
Then we are predicting the salary okay.

312
00:15:40,000 --> 00:15:42,000
You can do this entire thing okay.

313
00:15:44,000 --> 00:15:46,000
Oh let me see one more model huh.

314
00:15:46,000 --> 00:15:48,000
Regression underscore model dot h5 file okay.

315
00:15:48,000 --> 00:15:49,000
Perfect.

316
00:15:49,000 --> 00:15:52,000
So I hope you understood this particular video.

317
00:15:52,000 --> 00:15:52,000
Again.

318
00:15:52,000 --> 00:15:59,000
It's more about how much you practice and how easy, uh, it was probably to train the entire.

319
00:15:59,000 --> 00:16:03,000
And that is artificial neural network, uh, for classification, for regression.

320
00:16:03,000 --> 00:16:07,000
Now, one of the most common question that has been asked is how do you decide that?

321
00:16:07,000 --> 00:16:11,000
How many hidden layers are neural, uh, hidden neurons you need to take?

322
00:16:11,000 --> 00:16:14,000
We need to discuss about that also, because that is something very important.

323
00:16:14,000 --> 00:16:19,000
So in this case, it is very, very much difficult to just say that, hey, you probably need to just

324
00:16:19,000 --> 00:16:22,000
use this many number of hidden layers or this many number of hidden neurons.

325
00:16:22,000 --> 00:16:23,000
That is not possible.

326
00:16:23,000 --> 00:16:29,000
So what we do is that we basically apply a lot of hyperparameter tuning, like with respect to the number

327
00:16:29,000 --> 00:16:32,000
of hidden layers and uh, with respect to number of hidden neurons.

328
00:16:32,000 --> 00:16:36,000
And that is what I will be showing you in the next video, like how you can also come to a conclusion

329
00:16:36,000 --> 00:16:41,000
and I'll show you one type of hyperparameter tuning how, uh, we can specifically do.

330
00:16:41,000 --> 00:16:43,000
So yes, uh, this was it for my side.

331
00:16:43,000 --> 00:16:44,000
I hope you like this particular video.

332
00:16:44,000 --> 00:16:45,000
I'll see you all in the next video.

333
00:16:45,000 --> 00:16:45,000
Thank you.

