All right, everyone.
So in the last video, we have successfully installed this first text library.
Now we are going to use this first text to do a text classification.
And for that, we are going to use the same review, a restaurant review files that I just made some
modification in that file.
Let me just open it and I'll share this with you, because this text requires data in such a kind of
format.
So I just formatted all those data in this way.
So you can see corresponding to level one, we have a ham data.
Either way, I would say positive reviews and corresponding to zero.
It's a negative review.
This way there are a thousand records are available.
All right.
So next thing is, let me go to the terminal or will the funding will create a new folder and up past
X.
Or I will write it like a tax classification.
All right, and let me first go to our first tax where we are installed as fast tax.
So it will be in a city fast tax.
Let's go.
What is there?
Inside there?
So inside the first tax, there will be one more.
Let me go inside the box and you can see there are a number of files that are available.
We can just simply type.
Foster hopes in this case it didn't work, so you can just simply type notes and you can see now there
are a number of options provided.
That means these are the things you can do with this tax levy so far is like a on.
You can provide a different arguments.
So Carmines will be something like a fast tax.
You can do the supervised learning, you can test your different models.
You can have a prediction.
You can apply this Kebra.
So Majority will try to see in this video and upcoming videos.
So first thing what we are going to do.
Let me go to the tax classification and remember this.
But every time we are just going to fire this pot to fire the first tax before that, let me go back
and let me go to the next top tax classification.
And I'm just going to move this review, start to fight inside the tax classification.
All right.
Let me put tallies here and I have reviewed not the file available with me.
All right, let me put get and it will display this previews, not testify.
All right.
So it's all available.
Next thing, what we are going to do.
Let me clear the screen, put this data into two different buckets.
So something like some 70 percent of your data will put it inside the cleaning basket and remaining
on our testing basket.
So what we will do, we are going to use this hard.
Come on.
Let me make it a little bigger screen.
Head first, the let's say seven hundred record, I just keep it inside the.
Cleaning bucket.
So I'm going to take the data from reviewing the text and put this error so it will take first 700 recalled
because of this her come on and let's say it will put it inside the reviews, not drain file.
Don't worry about the expense.
It just the name.
There is nothing like extensive and from the last or Tail-End will take another to ninety nine because
I think we have a nine hundred and ninety nine records are available.
So what will do reviews.
Not the last two ninety nine data point.
We will put it into texting.
So that will be inside the reviews, not what it will be a test.
All right.
Now if you go to text classification will have now three files.
So we are going to work with these reviews that trained first to build a model and then we'll work with
the reviews that test.
So our task is to create a classification model with which reviews doctrine before that, I want to
show you that if we want to run this fast library directly from this spot, we can do home UNGEI and
we have four stacks inside the first text via one more text.
And you can see every time when we want to fight this campaign, we'll fight it like this.
Otherwise you can include this fast text inside your party variable also so supervised, supervised
learning.
We are going to train our classifier.
So come on, which we are going to use for training, our classifier will be a supervisor.
So it will be supervised.
Now, this requires two things.
One will be your input file.
So obviously our input file will be reviewed doctrine.
And the next one will be what is your output, where you want to put your model.
So let me provide the option.
Or if you don't know what are the options, you can give it with the supervisor.
Come on, you can just simply press with supervisor enter and you will have a whole lot of options are
available.
Which supervisor?
So these are the mandatory options and remaining all might be optional options out there, because as
you are going to train on which data set, you must provide it.
So that's why have an input and an output if the MASKEW argument while.
Training is classified, so one argument will be hyphen input that will be nothing but play reviews,
not train, and the next one will be output to hyphen output and.
What are the output finally, we can give any filename, so I'm going to give you like a model, let's
say model and the second one under review.
Let me give just the model and the score one that's perfectly fine, legendary.
And it will start building a model for us, a supervised learning model based on this class text library
and whatever data we provided of a training model of RVO 700 datapoint.
All right.
So we'll just see it again.
So it just immediately did a very fast all those training.
But if you just do that, you will have model one dot mean and model and it's got one dot.
So as a model, it has created a two model and it's got one dot bin and model and it's called one dot
file it has created.
That means a training process is over.
Now we can use this model.
To build a prediction, so let me just clear it and how we are going to predict it so far that same
home and we have stacks and stacks so we can even create a place for it.
So in Linux, it's impossible.
So let me give you some Malia's name.
Let's see some fast track.
So it will be F.P..
I I'm just providing here and put this whole carmin inside the.
So Saulius, God created, we can just search for aliens, so we have aliens, did it God created,
yes, God created a physical look how long it takes.
Now I can just simply write like F.T. But obviously I am not sure whether it will work in another time
or not.
So after.
Yeah, it won't work here because it is specific to this one on only the cell.
So let me just clear it.
And now from onwards I'm going to write this feat so every word options are available for prediction.
So we have one command is available like a real one, more commands like a prop and we have one more
like a test so we can have our evolution on our testing dataset.
But before that, let us test on our.
Random data like let's give any data by hardcoded input so happy and I'm going to provide here a pretty
hefty prediction, next one is on using my using which model they are going to do it.
So that will be nothing but model one or model underscore one not been filed.
And as we are not going to provide any text data, so I'll just provide hyphen and it will ask me for
which data point you want to do the classification.
So I will, I will just say like I love food and let's see what we classify.
It is a level one.
That means hillocks.
I do not.
Let me whoops, I do not allow food in a restaurant.
Still, it is classified as the one we can even try with the chili.
We don't have enough data.
Might be.
So I don't like four.
Yes, so it has not taken into consideration, like, I guess do not part, and that's very important.
What I can say, like I d like it.
Let's see.
Still level one only, but I'm not sure about that, but maybe we don't have sufficient data set, but
that is how you can train your classifier.
Let me just come out from here.
Now, apart from that, you can have a predict probability so it will predict the probability that particular
data points belongs to level one or it will be level zero.
Next thing is, we can have a complete based on testing data, so we have all the testing data set.
So you can see this is reviews the test.
Let me open it and I'll show you some data set reviews or test.
All right.
So there are some there are some one.
And let's just try one of them.
So all 299 a record, it will do the calculation or do the prediction and it will finally give us the
accuracy.
So let me try it.
Every test that will be overcome on if we just execute it, it will tell us what are the few more things
you need to provide.
So that will be a model model.
Model filename.
So F.T. test the inviable model filename, so that will be nothing but model one that bin and let me
provide filename, so that will be the test.
All right.
So you can see they have given that are total two hundred and ninety nine data points and four places
and they are given this much and that is nothing but a recall.
So they will be also delivered to Dessaix and present also there would be zero point thirty six.
All right.
Now we are just trying this model without using any modification of default parameter, but there are
a lot of things you can always do.
So let's go to our original commands of supervised learning.
Yes.
So that's our advice.
Now, along with that, there are a number of options you can provide.
So let's say you want to run your model for let's say there will be some default number of people for
this model, Gaudron.
But you can run it for, let's say, a thousand époque so you can have a provision like Let Me provided
another model like Model and Escoto and I will do hyphen people, let's say Chozen.
All right.
Apart from that, let's say while conversion of text into a number of feature and coding or I would
say feature engineering does, I want to use this and grammar so I have one more options, like a hyphen
W.
Void
Ingrams, let's say, bigram model, I want to use it or I want to use Trigram model, I can use it.
Let's give it a two.
So this way there are a number of options.
You can make it and it will create a brand new model for you.
All right, so now you can see this many numbers of people take a little amount of time and we have
a Bigram model it has created, let's test the accuracy again.
So we are going to use this prediction.
Yes, predict.
But instead of using model in the score, one will create it now, model in this two.
And due to that, you can see more than there's got to be not to backfill got created.
Let me give Nene some reviews like I like your food here.
So it has this.
Predicts there will be a label and a second one, I'm not sure about it, but that's OK, maybe some
more trainings are required to address it.
And you can see we just come online from by writing a few comments.
If you have a dataset, you can train your model with this vast text library, and it is one of the
very high performance library.
So this is mainly used for the tax classification task here, we used to classify the review between
positive and negative.
But for any kind of tax classification task, whether it's a binary classification problem or multiclass
classification problem, always you can use it whenever you have a huge amount of tax rate available
with you.
All right.
See you in the next video.