WEBVTT

00:01.230 --> 00:01.710
Hey, everyone.

00:01.920 --> 00:08.790
So now we are going to play this in recurrent neural network concept on our same text classification

00:08.800 --> 00:14.210
dataset, which we have applied on this last section of spam Nixon.

00:14.760 --> 00:22.500
So same standard CSP file, we are going to use it and all those pre processing step will always remain

00:22.500 --> 00:22.890
the same.

00:22.950 --> 00:26.630
So I'm just going to execute the code till this particular part.

00:27.060 --> 00:33.120
And if you're not referred to my earlier videos of this, Pam Dixon with CNN, you can always go back

00:33.120 --> 00:39.900
and refer for the data importing part, data cleaning part and data processing, plus converting all

00:39.900 --> 00:47.130
your taxes into all kind of sequences because that is a basic pre processing step before building your

00:47.220 --> 00:47.550
model.

00:47.820 --> 00:52.100
So first, let me import spam dot CSB file.

00:53.900 --> 00:54.290
All right.

00:54.320 --> 00:56.330
So you can see sex is pretty important.

00:57.140 --> 01:02.030
And let me run all those necessary inputs plus pre processing step.

01:04.990 --> 01:09.250
Let me drop unnecessary all column renaming column.

01:10.360 --> 01:14.230
Converting your output video will have to zero in spam to one.

01:15.220 --> 01:21.430
Splitting your dataset named, we are going to convert this sentence to the sequences.

01:22.800 --> 01:28.440
This is for our vocabulary size and then we are going to pack this sequence.

01:29.600 --> 01:33.900
So we already explained this part earlier to CNN with you.

01:34.520 --> 01:39.980
And as we all take on exactly same dataset, I just didn't go through every single step.

01:40.520 --> 01:46.630
Now that we have a dataset available, Vitas, we are going to start building the model.

01:47.150 --> 01:52.580
And for that, we are going to use this Alistaire a long sought term memory.

01:52.820 --> 01:53.180
Martin.

01:54.750 --> 02:01.830
So if you go, Eliot, compared to the earlier case, we have imported the layers like an extra Eliot

02:02.670 --> 02:03.240
Alistair.

02:05.980 --> 02:11.060
In case of CNN, it was like a convolution one million, as we are dealing with the text that I feel

02:11.110 --> 02:14.040
dealing with the video retailer, a mistake.

02:14.110 --> 02:16.420
I hope to use this convolution truly.

02:17.270 --> 02:17.630
All right.

02:18.490 --> 02:20.980
So I would define the two variables.

02:21.280 --> 02:25.210
And that is called as in a kind of hyper parameter for this particular model.

02:25.840 --> 02:32.540
So first one is for the while, creating the word vector or embedding first live.

02:32.980 --> 02:34.100
What is the diamonds?

02:34.260 --> 02:38.350
And so we are converting every single token into printed.

02:38.370 --> 02:38.890
I'm insane.

02:39.010 --> 02:43.360
Racked up our hidden state rector will be, let's say, 50.

02:43.870 --> 02:45.730
And we'll see how we are going to use this.

02:45.890 --> 02:46.090
And.

02:47.420 --> 02:48.900
This is our first layer.

02:49.140 --> 02:50.740
So we define our booklet.

02:51.410 --> 02:52.530
And from input layer.

02:52.850 --> 02:53.900
The first ever layer.

02:54.440 --> 02:55.420
We are going to add it.

02:55.610 --> 02:56.150
That is nothing.

02:56.180 --> 02:57.440
But I am very glad.

02:57.760 --> 03:00.530
So now the story was almost similar.

03:00.890 --> 03:06.340
But now, instead of adding this convolution 1000000, we are going to add the Palestinian layer.

03:06.740 --> 03:09.690
Now, this particular less than layer has how many hidden state?

03:10.100 --> 03:11.330
So that will be a fitting.

03:11.840 --> 03:14.790
And I just kept the return sequence will be true.

03:15.230 --> 03:20.900
That indicates that we are not dealing here with the encoder decoder kind of representation.

03:21.620 --> 03:26.660
Instead of that, the moment something came after every first iteration.

03:27.080 --> 03:28.210
After every second reason.

03:28.400 --> 03:31.970
After the third iteration will preserve's those output.

03:32.630 --> 03:35.900
And one more layers like a global max pulling.

03:36.290 --> 03:43.200
So that is just trying to take the maximum out of those particular Vigneault headbang.

03:43.340 --> 03:44.130
Same legal layer.

03:44.210 --> 03:52.070
We have a Sigmoid Downstair VI segment because we are dealing here with the binary classification problem.

03:52.490 --> 03:58.220
And at the end, we have defined this model which accept the input and all those layers.

03:58.250 --> 04:02.560
So let me define this model object.

04:05.450 --> 04:08.970
So model, what define next is we need to compile this model.

04:09.050 --> 04:13.440
So just like earlier for optimization, we are going to use this Skydome optimizer.

04:13.770 --> 04:16.480
Lost will be binary and it's called cross entropy.

04:16.490 --> 04:18.770
Loss and metrics will be accuracy.

04:18.830 --> 04:25.000
So it will indicate then how could quite accurately our models while doing the testing on testing dataset?

04:25.630 --> 04:28.460
Let us fit our model with Tiny Poch.

04:32.290 --> 04:34.780
So training got started on Époque.

04:34.840 --> 04:40.050
Now, in this case of hot, and obviously it will take a good amount of time.

04:42.130 --> 04:49.990
Accuracy losses keep decreasing and aiding in the valuation accuracy is quite similar.

04:50.920 --> 04:52.240
It didn't increase too much.

04:53.050 --> 04:57.550
But when we tried to display this thing as a plot, we'll get much more idea.

04:57.970 --> 05:00.350
So let's see how lost got decrease.

05:01.210 --> 05:08.350
And you can see lost was instantly decreased from the first three percent to second increase in almost

05:08.800 --> 05:10.260
close to zero point thirty two.

05:10.300 --> 05:16.270
But then it didn't increase, whereas in case of relevation lost, it all was I mean, remains same

05:16.270 --> 05:18.790
throughout the our training process.

05:19.180 --> 05:20.650
And if you see the accuracy.

05:22.240 --> 05:23.930
Our accuracy is a.

05:25.160 --> 05:28.100
Not very much high compared to our CNN model.

05:28.640 --> 05:31.370
So close to around 86, six percent accuracy.

05:31.460 --> 05:35.520
We got, you know, first iteration only, but then it didn't increase.

05:35.960 --> 05:38.780
So what you can do, you can experiment with a different.

05:40.730 --> 05:45.030
Hyper parameters like a hand beating dimension and the other state.

05:45.140 --> 05:48.900
So just keep changing and try to see whether it will increase or not.

05:48.920 --> 05:53.630
Otherwise, this spam did extend, which CNN was very much trying for us.

05:54.050 --> 05:56.750
So that is about the demo of spam detection.

05:56.880 --> 05:59.320
We are seeing the next video.
