1
00:00:00,000 --> 00:00:01,000
Hello guys.

2
00:00:01,000 --> 00:00:03,000
So we are going to continue the discussion with respect to an.

3
00:00:03,000 --> 00:00:10,000
Now finally, we are going to discuss about a very important problem statement or question that comes

4
00:00:10,000 --> 00:00:11,000
in everybody's mind.

5
00:00:12,000 --> 00:00:17,000
Whenever you are implementing any application with deep learning neural networks, that is determining

6
00:00:17,000 --> 00:00:22,000
the optimal number of hidden layers and neurons for an artificial neural network.

7
00:00:22,000 --> 00:00:27,000
Okay, now this can be really challenging and it often requires experimentation.

8
00:00:27,000 --> 00:00:34,000
However, there are some guidelines and methods that you can help in making an informed decision, right?

9
00:00:34,000 --> 00:00:36,000
So here are some pointers.

10
00:00:36,000 --> 00:00:42,000
In order to probably come to a conclusion that how many optimal number of hidden layers and neurons

11
00:00:42,000 --> 00:00:44,000
you should probably use for an an um.

12
00:00:44,000 --> 00:00:49,000
So the first point over here, it says that please go ahead and start simple.

13
00:00:49,000 --> 00:00:53,000
Begin with a simple architecture and gradually increase complexity if needed okay.

14
00:00:53,000 --> 00:00:57,000
The second thing is that you can also perform grid search or random search.

15
00:00:57,000 --> 00:01:02,000
I hope everybody knows about this hyperparameter tuning using grid search or random search to try different

16
00:01:02,000 --> 00:01:04,000
architectures so you can make different architectures.

17
00:01:04,000 --> 00:01:07,000
And with the help of grid search or random search, you can actually do it.

18
00:01:07,000 --> 00:01:09,000
Then you also have cross validation.

19
00:01:09,000 --> 00:01:13,000
Use cross validation to evaluate the performance of different different architecture, like how we used

20
00:01:13,000 --> 00:01:14,000
to do in machine learning.

21
00:01:15,000 --> 00:01:19,000
And here is one more approach which is called as heuristics and rules of thumb.

22
00:01:19,000 --> 00:01:24,000
Some heuristics and empirical empirical rules can provide starting points, such as.

23
00:01:24,000 --> 00:01:30,000
The number of neurons in the hidden layer should be between the size of the input layer and the size

24
00:01:30,000 --> 00:01:33,000
of the output layer, right between that particular size.

25
00:01:33,000 --> 00:01:37,000
That many number of hidden neurons can be there in the hidden layer.

26
00:01:37,000 --> 00:01:37,000
Okay.

27
00:01:37,000 --> 00:01:40,000
And a common practice is to start with one two hidden layer.

28
00:01:40,000 --> 00:01:45,000
So, uh, obviously there are so many statements that I've discussed about, but, uh, we will try

29
00:01:45,000 --> 00:01:47,000
one approach where we'll also perform hyperparameter tuning.

30
00:01:48,000 --> 00:01:53,000
Um, and uh, the hyperparameter tuning will be done in such a way that I will take various number of

31
00:01:53,000 --> 00:01:58,000
neurons, various number of hidden layers, and then we will try each and every architecture and try

32
00:01:58,000 --> 00:02:00,000
to see that which is the best model, which is probably coming out of it.

33
00:02:00,000 --> 00:02:01,000
Okay.

34
00:02:01,000 --> 00:02:08,000
So, uh, first of all, what I am actually going to do for this, uh, I will be using one very important

35
00:02:08,000 --> 00:02:10,000
library, which is called as Keras.

36
00:02:10,000 --> 00:02:11,000
Okay.

37
00:02:11,000 --> 00:02:16,000
So here instead of TensorFlow, I'll also use one more library which is called as Keras because in this

38
00:02:16,000 --> 00:02:22,000
Keras there is one very important module which is called as Keras classifier.

39
00:02:22,000 --> 00:02:22,000
Okay.

40
00:02:22,000 --> 00:02:26,000
And that actually helps you to perform this entire hyperparameter tuning.

41
00:02:26,000 --> 00:02:29,000
Uh, you know, just to find out which is the best model.

42
00:02:29,000 --> 00:02:32,000
So I'll quickly go ahead and install this library.

43
00:02:32,000 --> 00:02:33,000
Okay.

44
00:02:33,000 --> 00:02:37,000
So I'll go ahead and right pip install minus our requirements.

45
00:02:37,000 --> 00:02:38,000
Oops.

46
00:02:39,000 --> 00:02:42,000
That H5 file it it went ahead you know.

47
00:02:42,000 --> 00:02:45,000
So requirement dot txt.

48
00:02:46,000 --> 00:02:47,000
So let me just go ahead and do this.

49
00:02:47,000 --> 00:02:50,000
And I hope uh, I should be able to get the installation of Keras.

50
00:02:50,000 --> 00:02:53,000
Let's see right now it has not given me anything.

51
00:02:53,000 --> 00:02:56,000
But uh let's go ahead and import things.

52
00:02:56,000 --> 00:03:00,000
So here I will be importing some very important libraries.

53
00:03:00,000 --> 00:03:01,000
One is Gridsearchcv.

54
00:03:01,000 --> 00:03:06,000
See, one more additional library that we are going to use is Gridsearchcv standard scalar Labelencoder

55
00:03:06,000 --> 00:03:07,000
Onehotencoder is done.

56
00:03:08,000 --> 00:03:09,000
We are also going to import pipeline.

57
00:03:09,000 --> 00:03:14,000
Then we are going ahead with Keras classifier which is present in Keras dot wrapper dot scikit learn.

58
00:03:14,000 --> 00:03:19,000
Along with that, we are going to import TensorFlow TensorFlow Keras model for sequential, dense and

59
00:03:19,000 --> 00:03:19,000
early stopping.

60
00:03:19,000 --> 00:03:21,000
Okay so this is almost same.

61
00:03:21,000 --> 00:03:23,000
Nothing changes over here.

62
00:03:23,000 --> 00:03:25,000
But I think I'll be getting an error over here.

63
00:03:25,000 --> 00:03:29,000
Let's see if the installation is not taken place okay.

64
00:03:29,000 --> 00:03:31,000
So here you can see uh model not found.

65
00:03:31,000 --> 00:03:33,000
No model Keras dot wrapper.

66
00:03:33,000 --> 00:03:40,000
So let me go ahead and see and see in the Keras whether we have this wrappers or not okay, I don't

67
00:03:40,000 --> 00:03:41,000
know.

68
00:03:41,000 --> 00:03:42,000
We need to probably check it out.

69
00:03:42,000 --> 00:03:43,000
Okay.

70
00:03:43,000 --> 00:03:45,000
Pip install r requirements.txt.

71
00:03:45,000 --> 00:03:45,000
Okay.

72
00:03:45,000 --> 00:03:46,000
Keras dot wrapper.

73
00:03:46,000 --> 00:03:50,000
So let me just go ahead in Google and search for it.

74
00:03:50,000 --> 00:03:59,000
So pip install Keras dot wrappers or scikit learn.

75
00:03:59,000 --> 00:04:06,000
So uh for this here you have this particular module okay.

76
00:04:06,000 --> 00:04:08,000
So I will go ahead and use this module.

77
00:04:08,000 --> 00:04:08,000
model.

78
00:04:08,000 --> 00:04:14,000
So always remember whenever you find this kind of errors please make sure that you have a good sense

79
00:04:14,000 --> 00:04:19,000
wherein you will be able to find out which library we are talking about.

80
00:04:19,000 --> 00:04:19,000
So let's see.

81
00:04:19,000 --> 00:04:26,000
Sky Keras I think if this is if this is the library that we are searching for, I think it should work.

82
00:04:26,000 --> 00:04:27,000
Okay.

83
00:04:27,000 --> 00:04:32,000
But if it does not work, then again we'll look for a solution, but we'll look for a solution together.

84
00:04:32,000 --> 00:04:35,000
Okay, so here you can see it has been successfully installed.

85
00:04:35,000 --> 00:04:38,000
Now I think it should work okay.

86
00:04:41,000 --> 00:04:43,000
Oh let me restart the kernel.

87
00:04:44,000 --> 00:04:45,000
Okay.

88
00:04:46,000 --> 00:04:47,000
So let me see.

89
00:04:50,000 --> 00:04:53,000
I think we should not be getting an error now.

90
00:04:55,000 --> 00:05:00,000
Okay, we are still getting an error, So let's search for this itself.

91
00:05:00,000 --> 00:05:00,000
Right.

92
00:05:01,000 --> 00:05:02,000
Let's search for this.

93
00:05:03,000 --> 00:05:07,000
So here what I will do I will go ahead and open my browser.

94
00:05:07,000 --> 00:05:09,000
I'll search for no modules.

95
00:05:09,000 --> 00:05:10,000
Keras dot wrapper.

96
00:05:10,000 --> 00:05:11,000
Okay.

97
00:05:12,000 --> 00:05:12,000
Um.

98
00:05:14,000 --> 00:05:15,000
Oh.

99
00:05:15,000 --> 00:05:17,000
So here it says this works for me.

100
00:05:17,000 --> 00:05:19,000
Another approach you can try.

101
00:05:19,000 --> 00:05:20,000
Uh, okay.

102
00:05:20,000 --> 00:05:23,000
It comes with TensorFlow 2.12.

103
00:05:23,000 --> 00:05:23,000
Okay.

104
00:05:24,000 --> 00:05:27,000
Um, from Skype I okay.

105
00:05:27,000 --> 00:05:28,000
I can also use this.

106
00:05:28,000 --> 00:05:31,000
Let's see, I have also installed this right.

107
00:05:32,000 --> 00:05:34,000
Instead of using this I will use this.

108
00:05:35,000 --> 00:05:38,000
But I think now this should work okay.

109
00:05:38,000 --> 00:05:39,000
So I've used sky Keras.

110
00:05:39,000 --> 00:05:43,000
And there I have actually done this installation okay now this is done.

111
00:05:43,000 --> 00:05:48,000
Now the next thing will be that I will go ahead and quickly import our pandas.

112
00:05:48,000 --> 00:05:51,000
Uh, use pandas and read our CSV file.

113
00:05:51,000 --> 00:05:58,000
And here I'm actually going to write my churn underscore modeling dot CSV.

114
00:05:58,000 --> 00:06:01,000
Here you'll be seeing how I specifically experiment with things.

115
00:06:01,000 --> 00:06:05,000
Okay so here I'm actually going to get my data okay.

116
00:06:05,000 --> 00:06:06,000
Then you know what.

117
00:06:06,000 --> 00:06:08,000
All things you really need to do okay.

118
00:06:09,000 --> 00:06:12,000
So I will just try to copy and paste it over here.

119
00:06:12,000 --> 00:06:15,000
And I hope I don't have to make you understand.

120
00:06:15,000 --> 00:06:17,000
I'm going to apply label encoder one hot encoder.

121
00:06:17,000 --> 00:06:19,000
Then this is my entire data frame.

122
00:06:19,000 --> 00:06:20,000
Then we are concatenating.

123
00:06:20,000 --> 00:06:21,000
We are dividing.

124
00:06:21,000 --> 00:06:24,000
We are getting the independent and dependent features.

125
00:06:24,000 --> 00:06:28,000
And after this we are also going to do the train test split okay.

126
00:06:28,000 --> 00:06:30,000
Because this is not that important.

127
00:06:30,000 --> 00:06:32,000
Because this all things we have repeated again and again.

128
00:06:32,000 --> 00:06:33,000
Okay.

129
00:06:33,000 --> 00:06:36,000
And then finally we are dumping all the pickle file.

130
00:06:36,000 --> 00:06:39,000
Or we are saving all the pickle file so quickly.

131
00:06:39,000 --> 00:06:41,000
I will copy and paste it over here.

132
00:06:41,000 --> 00:06:48,000
Let me go ahead and write Import pickle because I will also be requiring import pickle okay.

133
00:06:48,000 --> 00:06:49,000
Done.

134
00:06:49,000 --> 00:06:51,000
So let's go ahead and execute this.

135
00:06:52,000 --> 00:06:54,000
Now here you will be able to see my pickle file will get created.

136
00:06:54,000 --> 00:06:55,000
So this has got executed.

137
00:06:55,000 --> 00:06:58,000
Now we are going to create a function.

138
00:06:58,000 --> 00:07:02,000
Now see here is where I will write my coding completely from scratch.

139
00:07:02,000 --> 00:07:07,000
So define a function to create a model okay.

140
00:07:07,000 --> 00:07:09,000
And try different parameters.

141
00:07:09,000 --> 00:07:13,000
Try different parameters okay.

142
00:07:14,000 --> 00:07:19,000
Uh and here we are specifically going to use Keras classifier okay.

143
00:07:21,000 --> 00:07:25,000
So I will go ahead and write definition create underscore model.

144
00:07:25,000 --> 00:07:26,000
Okay.

145
00:07:27,000 --> 00:07:34,000
Uh, here uh, what I'm actually going to do is that, um, by default I will be I will be providing

146
00:07:34,000 --> 00:07:36,000
two parameters whenever we create a model.

147
00:07:36,000 --> 00:07:38,000
One is how many number of neurons are required.

148
00:07:38,000 --> 00:07:44,000
Let's say by default I'm giving 32 neurons if I'm not passing any value and how many layers I want with

149
00:07:44,000 --> 00:07:45,000
respect to the hidden layer.

150
00:07:45,000 --> 00:07:46,000
By default I'll give one hidden layer.

151
00:07:46,000 --> 00:07:47,000
Okay.

152
00:07:47,000 --> 00:07:50,000
So I'll create this function and I'll say, hey, go ahead and create.

153
00:07:50,000 --> 00:07:53,000
My model is equal to sequential model okay.

154
00:07:54,000 --> 00:08:00,000
And then what I can do on top of this particular model I can go ahead and add one dense layer.

155
00:08:00,000 --> 00:08:03,000
So I'll say hey go ahead and add our dense layer.

156
00:08:03,000 --> 00:08:08,000
And dense layer by default will be this entire neurons okay.

157
00:08:08,000 --> 00:08:14,000
And uh, along with this I'll say, hey go ahead and apply my activation function, which is nothing

158
00:08:14,000 --> 00:08:15,000
but ReLU.

159
00:08:15,000 --> 00:08:27,000
Then here you'll be able to see that I'm also going to use my input underscore shape is equal to x underscore

160
00:08:27,000 --> 00:08:28,000
train dot shape.

161
00:08:28,000 --> 00:08:32,000
Please observe very carefully what I'm actually doing over here.

162
00:08:32,000 --> 00:08:33,000
Okay.

163
00:08:33,000 --> 00:08:35,000
So this is my input shape.

164
00:08:35,000 --> 00:08:38,000
So in the first layer I'm basically adding this.

165
00:08:38,000 --> 00:08:40,000
Right now I need to probably check.

166
00:08:40,000 --> 00:08:42,000
Do I need to add more layers or not okay.

167
00:08:42,000 --> 00:08:46,000
If I give 2 to 3 layers then we should also add it right.

168
00:08:46,000 --> 00:08:49,000
So based on this parameter I'll write a generic code.

169
00:08:49,000 --> 00:08:49,000
Right?

170
00:08:49,000 --> 00:08:55,000
I'll say hey, if I'm giving 2 to 3 layers, if I'm giving three layers also along with this first layer.

171
00:08:55,000 --> 00:08:56,000
This first layer hidden layer will be there.

172
00:08:56,000 --> 00:08:57,000
Okay.

173
00:08:57,000 --> 00:09:02,000
And here you'll also be seeing that at least this will be there with, with respect to the number of

174
00:09:02,000 --> 00:09:02,000
neurons that we have.

175
00:09:02,000 --> 00:09:03,000
Okay.

176
00:09:03,000 --> 00:09:10,000
Then a generic representation, I'll say hey for dash in range of layers minus one, because I have

177
00:09:10,000 --> 00:09:13,000
to probably create that many number of hidden layers.

178
00:09:13,000 --> 00:09:15,000
Now remaining hidden layers is layer minus one.

179
00:09:15,000 --> 00:09:22,000
I will go ahead and write hey go ahead and add model dot, add and use the dense and here use the neurons.

180
00:09:22,000 --> 00:09:26,000
The neurons will be same what I've actually passed over there and the activation function.

181
00:09:27,000 --> 00:09:30,000
Activation function will be nothing, but it will be ReLU okay.

182
00:09:31,000 --> 00:09:33,000
So this is just by for loop.

183
00:09:33,000 --> 00:09:35,000
We will be keep on adding this particular layers.

184
00:09:35,000 --> 00:09:39,000
Finally our output layer I will go ahead and write model dot add.

185
00:09:39,000 --> 00:09:41,000
Here we are going to use my dense.

186
00:09:41,000 --> 00:09:44,000
And here I will use one comma.

187
00:09:44,000 --> 00:09:49,000
Activation is nothing but it will be my sigmoid.

188
00:09:49,000 --> 00:09:50,000
Okay.

189
00:09:50,000 --> 00:09:52,000
So I'm basically going to add this.

190
00:09:52,000 --> 00:09:55,000
And finally I'll go ahead and write model dot compile.

191
00:09:56,000 --> 00:10:02,000
And let me just go ahead and use my optimizer which is nothing but Adam okay.

192
00:10:02,000 --> 00:10:05,000
Loss since it is a binary loss.

193
00:10:05,000 --> 00:10:09,000
So I'll go ahead and use binary underscore cross entropy.

194
00:10:10,000 --> 00:10:14,000
And finally you'll also be seeing that I'll be able to add matrix.

195
00:10:14,000 --> 00:10:19,000
And the matrix is nothing, but it will be accuracy.

196
00:10:21,000 --> 00:10:21,000
Okay.

197
00:10:22,000 --> 00:10:24,000
And finally I return the model.

198
00:10:24,000 --> 00:10:27,000
This is what we are doing inside this function okay.

199
00:10:27,000 --> 00:10:33,000
So whenever I usually call this particular function I'm just going to give this parameters uh neurons

200
00:10:33,000 --> 00:10:34,000
and layers.

201
00:10:34,000 --> 00:10:38,000
And based on that I need to add how many number of hidden layers and all first layer is added by default.

202
00:10:39,000 --> 00:10:41,000
And we have also added output layer by default.

203
00:10:41,000 --> 00:10:45,000
We have also added uh, which compiler, which optimizer and loss we are specifically going to use.

204
00:10:45,000 --> 00:10:46,000
Okay.

205
00:10:46,000 --> 00:10:57,000
Now we will go ahead and create create a Keras classifier okay.

206
00:10:57,000 --> 00:11:01,000
So I'll go ahead and write hey model is equal to Keras classifier.

207
00:11:01,000 --> 00:11:03,000
Let's go ahead and call this function.

208
00:11:03,000 --> 00:11:09,000
Now this Keras classifier is responsible in creating the entire entire neural network.

209
00:11:09,000 --> 00:11:12,000
And so I'll say hey go ahead and create call this create model function.

210
00:11:12,000 --> 00:11:15,000
I will say hey go ahead and pass epochs as 50.

211
00:11:16,000 --> 00:11:18,000
I'll say let's pass.

212
00:11:18,000 --> 00:11:20,000
The batch size is equal to ten.

213
00:11:20,000 --> 00:11:24,000
And here I'm specifically going to use verbose is equal to zero okay.

214
00:11:24,000 --> 00:11:26,000
Some information with respect to this.

215
00:11:26,000 --> 00:11:29,000
Now this is fine with respect to my model.

216
00:11:29,000 --> 00:11:33,000
My model is a Keras classifier, which is going to probably call this function and create an entire

217
00:11:33,000 --> 00:11:33,000
model.

218
00:11:33,000 --> 00:11:35,000
And then you need to run.

219
00:11:35,000 --> 00:11:37,000
The model needs to be run for 50 epochs.

220
00:11:37,000 --> 00:11:38,000
Batch size is ten.

221
00:11:38,000 --> 00:11:41,000
And all all the information now is very much important thing.

222
00:11:41,000 --> 00:11:47,000
So here I will go ahead and define my grid search parameters in the key value pair.

223
00:11:47,000 --> 00:11:51,000
So this will be neurons like neurons which how many neurons I want to play with every layer.

224
00:11:51,000 --> 00:11:54,000
It can be 1632 64 128 layers.

225
00:11:54,000 --> 00:11:55,000
I'll go ahead with one, two, three.

226
00:11:56,000 --> 00:11:58,000
If you want to add more, you can go ahead and I will play.

227
00:11:58,000 --> 00:12:00,000
I'll keep on playing with each and every parameter over here.

228
00:12:00,000 --> 00:12:06,000
So let's go ahead and uh, let's remove the batch size because I just want to play with one batch size

229
00:12:06,000 --> 00:12:08,000
that is ten okay.

230
00:12:08,000 --> 00:12:11,000
So that I don't have to probably play with more things.

231
00:12:11,000 --> 00:12:13,000
And my training will also happen fast.

232
00:12:13,000 --> 00:12:16,000
This is just to show you and epochs I'll play with 50 and 100.

233
00:12:16,000 --> 00:12:20,000
Right now Gridsearchcv is going to probably take this entire model.

234
00:12:21,000 --> 00:12:26,000
It is going to take this entire param grid, and it is just going to perform this cross validation that

235
00:12:26,000 --> 00:12:27,000
we are doing.

236
00:12:27,000 --> 00:12:32,000
And once we write grid dot fit, I'm probably going to get the best number of parameters.

237
00:12:32,000 --> 00:12:36,000
So I'll probably after the fit operation happens we can just go ahead and print it.

238
00:12:36,000 --> 00:12:41,000
I can write grid underscore result dot best underscore score and best underscore parameter parameter

239
00:12:41,000 --> 00:12:44,000
will be like how many neurons layers or epochs I need to probably take place.

240
00:12:44,000 --> 00:12:44,000
Okay.

241
00:12:44,000 --> 00:12:48,000
So here our training will start and gridsearchcv what it does.

242
00:12:48,000 --> 00:12:51,000
Every combination it will probably take, it will go ahead and see what loss is there.

243
00:12:51,000 --> 00:12:55,000
And whichever has the highest accuracy it will take that particular parameter.

244
00:12:55,000 --> 00:12:57,000
So let's go ahead and execute this.

245
00:12:57,000 --> 00:13:00,000
So it is going to take time uh that fast.

246
00:13:00,000 --> 00:13:01,000
It is not going to happen.

247
00:13:01,000 --> 00:13:05,000
All this things because here now the combination is many, right?

248
00:13:06,000 --> 00:13:09,000
Uh, okay, I did not okay.

249
00:13:09,000 --> 00:13:11,000
I had to probably print it.

250
00:13:11,000 --> 00:13:13,000
Um, at least will not be able to see it.

251
00:13:13,000 --> 00:13:13,000
Okay.

252
00:13:13,000 --> 00:13:14,000
Over here.

253
00:13:14,000 --> 00:13:18,000
So, uh, that is the reason it is just showing all these things.

254
00:13:18,000 --> 00:13:20,000
Uh, okay, I'm getting some error.

255
00:13:20,000 --> 00:13:23,000
So, guys, the error that we we got.

256
00:13:23,000 --> 00:13:23,000
Right.

257
00:13:23,000 --> 00:13:29,000
So what I will be doing is that along with this parameters, I will also be adding this layers equal

258
00:13:29,000 --> 00:13:30,000
to one and neurons is equal to 32.

259
00:13:30,000 --> 00:13:34,000
Because in this create model I'm actually passing this particular values.

260
00:13:34,000 --> 00:13:34,000
Right.

261
00:13:34,000 --> 00:13:36,000
Neurons 32 and layer one.

262
00:13:36,000 --> 00:13:36,000
Right.

263
00:13:36,000 --> 00:13:37,000
So that parameters.

264
00:13:37,000 --> 00:13:39,000
Also I'll be passing in my Keras classifier.

265
00:13:39,000 --> 00:13:48,000
Along with this I also saw one more issue that um, is with respect to let me just go ahead and have

266
00:13:48,000 --> 00:13:53,000
a look, uh, where it is regarding binary cross entropy.

267
00:13:53,000 --> 00:13:55,000
So how many time I have basically written this?

268
00:13:55,000 --> 00:13:58,000
Okay, so I think now it should work fine.

269
00:13:58,000 --> 00:14:00,000
Let's run this.

270
00:14:00,000 --> 00:14:01,000
And finally I'll also run this.

271
00:14:02,000 --> 00:14:07,000
Okay, now the entire fitting will specifically happen.

272
00:14:07,000 --> 00:14:11,000
And here you can see three folds for each of 16 candidates.

273
00:14:11,000 --> 00:14:12,000
Totally 48 fits.

274
00:14:12,000 --> 00:14:14,000
That is basically going to happen.

275
00:14:14,000 --> 00:14:18,000
And um, now the training has already started.

276
00:14:18,000 --> 00:14:24,000
I think, uh, you know, uh, once the epoch starts with respect to this, we should be able to see

277
00:14:24,000 --> 00:14:25,000
more information.

278
00:14:25,000 --> 00:14:31,000
Um, but, uh, just by using this verbose is equal to one, we'll be able to see some information otherwise.

279
00:14:31,000 --> 00:14:34,000
And right now when I wrote this n underscore jobs is equal to minus one.

280
00:14:34,000 --> 00:14:35,000
Right.

281
00:14:35,000 --> 00:14:38,000
It is probably going to use all the cores out there okay of my system.

282
00:14:39,000 --> 00:14:45,000
But again uh, if you are trying to use do this in your local, uh, and if your local is not a good

283
00:14:45,000 --> 00:14:48,000
system, then it may take some amount of time.

284
00:14:48,000 --> 00:14:48,000
Okay.

285
00:14:48,000 --> 00:14:51,000
Otherwise, please go ahead and do it in Google Colab.

286
00:14:51,000 --> 00:14:56,000
You know, Google Colab is any point of time you will have some kind of GPUs that will be available.

287
00:14:56,000 --> 00:15:02,000
So what we'll do, we'll wait for some time and uh, then uh, we will continue the discussion.

288
00:15:02,000 --> 00:15:02,000
So here you can see.

289
00:15:02,000 --> 00:15:03,000
Oh perfect.

290
00:15:03,000 --> 00:15:06,000
The epochs has started and it's running.

291
00:15:06,000 --> 00:15:07,000
It's running like anything.

292
00:15:07,000 --> 00:15:08,000
See quickly.

293
00:15:08,000 --> 00:15:12,000
This is the powerful of uh this is the power of a powerful workstation.

294
00:15:12,000 --> 00:15:13,000
Right?

295
00:15:13,000 --> 00:15:19,000
I have a powerful workstation, I have GPUs, I have all these things, uh, done as a setup over here.

296
00:15:19,000 --> 00:15:22,000
And this is mainly to show you, like, how things work over here.

297
00:15:22,000 --> 00:15:26,000
So here you can see accuracy is there, loss is there.

298
00:15:26,000 --> 00:15:33,000
And finally, the best accuracy that you got is nothing but 85% using epochs 100, layer one and neuron

299
00:15:33,000 --> 00:15:34,000
16.

300
00:15:34,000 --> 00:15:41,000
So it is saying that, hey, just go ahead and use one hidden layer and uh, go ahead and use uh, 16

301
00:15:41,000 --> 00:15:44,000
neurons and just try to do it and try to find it.

302
00:15:44,000 --> 00:15:44,000
Right.

303
00:15:44,000 --> 00:15:51,000
So when you use this now you can go ahead and create your own, uh, custom entire ah, uh, your entire

304
00:15:51,000 --> 00:15:53,000
Ann, with this many number of layers.

305
00:15:53,000 --> 00:15:56,000
And by this you will be able to find out the best parameter.

306
00:15:56,000 --> 00:15:59,000
So I hope you were able to understand this.

307
00:15:59,000 --> 00:16:04,000
Once you get this information, then constructing an An becomes very much easy, right?

308
00:16:04,000 --> 00:16:09,000
So this is what we have actually discussed about determining the optimal number of hidden layers and

309
00:16:09,000 --> 00:16:11,000
neurons for an artificial neural network.

310
00:16:11,000 --> 00:16:15,000
Again you can try out with different different parameters, but we can use Keras classifier with respect

311
00:16:15,000 --> 00:16:16,000
to this.

312
00:16:16,000 --> 00:16:17,000
So yes this was it for my side.

313
00:16:17,000 --> 00:16:19,000
I will see you all in the next video.

314
00:16:19,000 --> 00:16:20,000
Thank you.

