Hey, everyone.
So now we are going to play this in recurrent neural network concept on our same text classification
dataset, which we have applied on this last section of spam Nixon.
So same standard CSP file, we are going to use it and all those pre processing step will always remain
the same.
So I'm just going to execute the code till this particular part.
And if you're not referred to my earlier videos of this, Pam Dixon with CNN, you can always go back
and refer for the data importing part, data cleaning part and data processing, plus converting all
your taxes into all kind of sequences because that is a basic pre processing step before building your
model.
So first, let me import spam dot CSB file.
All right.
So you can see sex is pretty important.
And let me run all those necessary inputs plus pre processing step.
Let me drop unnecessary all column renaming column.
Converting your output video will have to zero in spam to one.
Splitting your dataset named, we are going to convert this sentence to the sequences.
This is for our vocabulary size and then we are going to pack this sequence.
So we already explained this part earlier to CNN with you.
And as we all take on exactly same dataset, I just didn't go through every single step.
Now that we have a dataset available, Vitas, we are going to start building the model.
And for that, we are going to use this Alistaire a long sought term memory.
Martin.
So if you go, Eliot, compared to the earlier case, we have imported the layers like an extra Eliot
Alistair.
In case of CNN, it was like a convolution one million, as we are dealing with the text that I feel
dealing with the video retailer, a mistake.
I hope to use this convolution truly.
All right.
So I would define the two variables.
And that is called as in a kind of hyper parameter for this particular model.
So first one is for the while, creating the word vector or embedding first live.
What is the diamonds?
And so we are converting every single token into printed.
I'm insane.
Racked up our hidden state rector will be, let's say, 50.
And we'll see how we are going to use this.
And.
This is our first layer.
So we define our booklet.
And from input layer.
The first ever layer.
We are going to add it.
That is nothing.
But I am very glad.
So now the story was almost similar.
But now, instead of adding this convolution 1000000, we are going to add the Palestinian layer.
Now, this particular less than layer has how many hidden state?
So that will be a fitting.
And I just kept the return sequence will be true.
That indicates that we are not dealing here with the encoder decoder kind of representation.
Instead of that, the moment something came after every first iteration.
After every second reason.
After the third iteration will preserve's those output.
And one more layers like a global max pulling.
So that is just trying to take the maximum out of those particular Vigneault headbang.
Same legal layer.
We have a Sigmoid Downstair VI segment because we are dealing here with the binary classification problem.
And at the end, we have defined this model which accept the input and all those layers.
So let me define this model object.
So model, what define next is we need to compile this model.
So just like earlier for optimization, we are going to use this Skydome optimizer.
Lost will be binary and it's called cross entropy.
Loss and metrics will be accuracy.
So it will indicate then how could quite accurately our models while doing the testing on testing dataset?
Let us fit our model with Tiny Poch.
So training got started on Époque.
Now, in this case of hot, and obviously it will take a good amount of time.
Accuracy losses keep decreasing and aiding in the valuation accuracy is quite similar.
It didn't increase too much.
But when we tried to display this thing as a plot, we'll get much more idea.
So let's see how lost got decrease.
And you can see lost was instantly decreased from the first three percent to second increase in almost
close to zero point thirty two.
But then it didn't increase, whereas in case of relevation lost, it all was I mean, remains same
throughout the our training process.
And if you see the accuracy.
Our accuracy is a.
Not very much high compared to our CNN model.
So close to around 86, six percent accuracy.
We got, you know, first iteration only, but then it didn't increase.
So what you can do, you can experiment with a different.
Hyper parameters like a hand beating dimension and the other state.
So just keep changing and try to see whether it will increase or not.
Otherwise, this spam did extend, which CNN was very much trying for us.
So that is about the demo of spam detection.
We are seeing the next video.