Hey, everyone.
So let's continue our discussion on.
This classification, which spacy project so we help me clean, was one of our polygonal reviews.
Now we have to apply all those cleaning process on every single day.
Like I said, but we are not going to do that.
Instead of that, this feature engineering stuff in this, as you learn or I would say is cyclical and
lively, we'll pick for us.
And for that, we are going to use this D.F. idea, vectorized it.
And that is one pipeline.
And then we are going to apply this support vector machine, machine learning algorithm.
So let me execute this all necessary inputs and I will tell you what is this B.S. idea rectories.
So this is like another feature encoding technique where we are going to convert all our domes.
Or I would say the original documents are poisonously reviews.
What is it that goes into kind of some sort of numbers?
So if you'll just search for the ideas.
Yes, that's a good explanation, I guess.
Let me know.
So based on this particular formula, they are calculating how much important individual vote in individual
document.
So for Tom De.
A document how much its importance is and has quote of this D.F. idea will decide those things.
So Tom Frequency's kind of how many times there will be cause in a document.
And this was document frequency Liko.
How many times?
Some particular time, of course, across all those documents.
And if you just multiplied, it will be kind of very much normalized stuff that many will some frequently
are occurring were always occurs in an English dictionary.
So it will do lower rates today.
And those which are the very that word will view higher rates today.
And that's why this idea component had it.
So we delivered this particular formula.
We're converting all those of reviews into kind of numbers.
And for that, we are going to use this idea, recognize that a class from this has a loan library.
Now, while converting those kneeing, we are going to pass this function, whatever the data are.
Tax data, planning function we have created and we will tell this EAF ideas, vectorized class that
like converting before that when you do all those kinds of tokenization tokenized.
You pass through everything with this function.
So let me execute it.
And it will create B.F., IDF rectories it class.
So this D.F. IDF vectorized class will do two things.
First, it will be applied on this function.
So tokenization will then according to whatever staff we help define here.
And after that, those D.F. IDF formula will be applied to calculate actual DFAT of school for each
individual done in different documents.
And let me have any.
All right, let's create a support vector machine, classify it.
All right, so next thing is we have a data available with us.
We have a machine learning algorithm.
I will be test.
Next thing is we need to train this model.
And for that, we have to split our data.
We are going to split the data.
We Delp of this brain and this patient underscore split and 20 percentage of data.
We are going to keep it inside that texting pockets.
So if you just observe the shape of this green dataset and it basically does it find it in that causes
a part of pasting buckets and two one nine eight is a part of draining buckets.
So just observe the first few hours of training.
All right.
Next is we are going to create one pipeline object.
And first, it will be possible.
The first object of this D.F. idea and then the classify.
So that will create one pipeline object.
And let just fit our data in the sense that training is going to start.
Now.
So it's taking a good amount of time for the training purpose, so I'm just fast forwarding my video
Pilates training.
We call it.
All right, so now you can see that training is fitness and it has written this pipeline object where
the steps are like a two step one is terrified of step and and that one is a support vector machine
step.
Now, once the training is over.
Next thing is to predict our pace.
Listen.
So for prediction of testing result, we are going to import this classification criteria like Accuracy
Sport Classification Report and a confusing matrix.
And let's apply prediction on our testing dataset.
So it will return us all those prediction.
Let's not confuse and metrics.
So now here we are dealing with a binary classification problem.
So it has come up with a two across two metrics.
So in 201 cases had 221 cases.
That is a national element where everything predicted was the right prediction that as v Mr. Prediction
in case of people plus 70 recalls.
If you need detailed explanation of this classification report, you can use this classification report
and you can pass on all your grant route lewyn and predictions.
So in this case, we are almost getting seventy seven percentage of accuracy.
If you want to get this accuracy score, something like this total will be your total number of testing
dataset.
So we have a testing that does it.
How much how many testing datasets?
Find it interesting.
So out of finding 50, there will be a 50 plus 78 already gone wrong.
And our accuracy's code is seventy six point seventy two percentage.
So almost down twenty three point five.
What I would say twenty four percentage of his.
We got it wrong.
Now, let's break with some sample reviews.
Let's see.
Reviews will be Voll.
Hi.
I'm learning natural language processing a fun fashion.
So if you just applied to all the classifier algorithm or pipeline algorithm, what it will do, it
will try to convert with Delp of this D.F. idea.
Vectorized it would all text processing function we created applied on this linear SBC or I would say
support vector machine class and create a prediction for us.
So the prediction is one that means it's the positive review.
Let's predicted four.
It's hard to learn new things.
That means it's a kind of negative feelings we're giving.
Let's predicate.
So output is zero.
That means it's a negative review.
All right.
So that's all about this combined.
We use this.
I am Libby, Yale and Amazon Review and applied a little differently, this tax classification or I
would say sentiment analysis problem, positive or negative.
And mainly we use a different thing, like a different spacy function and how we can apply those all
specification as a pipeline process while using the different functions of this pastilla label.
All right.
That's all about this project.
See you in the next video.