Helen, before going deep down to the session, let's have a walk through on all the previous sessions
what we have done in this project till now.
So from data in body to data analysis, by forming lots of data processing will also gain some meaningful
insights from data.
Let's say price was a source, price was the destination.
How exactly prices for during what is the distribution of each and every metropolitan cities in terms
of price?
We are also faced these type of meaningful insights from data and we can simply represent to my stakeholders
here, these are these these insights that I have extracted from data.
And now after we have performed lots of techniques of encoding and all these different different estopinal
also perform feature selection, outliers detection as well.
So in this session, what we have to do, we have to apply a machine learning algorithm on our data
as well as we have to automate on our prediction.
What exactly is the meaning of this automation?
So let's say I'm just going to define a function and one hour I will pass a machine learning algorithm
to that function.
All the stuff will be happen automatically by this function like, say, learning relationships from
data check accuracy.
What are the predictions?
Checking the accuracy of model, dumping that model and all the different different like that things.
So what I'm going to do very first, I just need some training data and some testing data so that I
can create my model so that I can do some kind of prediction.
So far, this what I'm going to do, I'm just going to say from this Ascalon library, I'm going to
import already some module, which is exactly my train test is split.
That will definitely helpful for you whenever you have to.
You read any form of training and as what I have to do, I have to just execute it.
And after it, we have to initialize this class.
And if you will shift plus there you will get what exactly the documentation of function.
You will see Taci train side and all the different different things.
So very first here, you have to parse what is your independent data, what is a dependent data as well
as what is your test side.
So let's say I'm going to mention my test side or let's say I just need 20 percent of data as my testing.
So here I'm going to say this and this side is equal to nothing but zero point two.
It means my training suggests 80 percent.
It means 80 percent of entire data will be considered for training purposes.
So what it really does, it really don't meet acts on the train after it will be done on the score test.
After that, it will hit a new Y in the score train as well as it will also return me.
Why underscore test?
So I'm just going to assign this and just execute all these stuff.
Now what do we have to do?
We have to basically apply machine learning algorithm on our data.
So let's say I will define a function.
Let's say its name is whatever you want.
So Lexcen will define a function with name as pathetic.
And here, whatever machine learning model I'm going to pass, it will give prediction with respect
to that machine learning model.
So very first, what we have to do, we have to learn some relations for our data supporters.
I'm going to say what our machine learning model I'm going to pass on this.
Using that, I have to call my friend.
And here very first, I have to pass.
My accent is called train and why in the school.
So here I'm going to pass all this stuff.
Let's say after learning, I'm going to store all the relationships in model.
And here, that's a very first.
I have to print something that's out of print.
What exactly the training course for this?
I'm going to say using this model, I have to call my something, which is score.
And here I had to mention my accent is called train.
And after that we have to mention a word is called let's say I have to print it in some user-friendliness
here.
I'm going to say I have to print it, let's say so here.
I'm going to say nothing but my something.
Let's say training school.
So here I'm going to say it is my training is called and after let's say my training is called is something
which is exactly placeholder over here.
So whatever placeholder I have to find out what they're doing exactly the see values from my formal
function.
So it will receive values from this format function.
So after what we have to do, let's say after it, we have to do prediction.
So I'm going to say using my model, I have to use a private function.
So basically we have to predict on our X test data.
So after it, what we have to do, let's say I'm.
Undistorted somewhere as time we to store it in, let's say, predictions in, which is exactly my error
after what we have to do next.
We have to protect our prediction.
So for this, what we guys can do, you guys can say, let's say predictions are nothing, but predictions
are going on and you can place a placeholder over here.
And this placeholder will see values from your predictions.
And after what we have to do, let's say I'm going to bring some Espace over there so that it will look
something attractive.
So I'm going to say just bring this place, let's say, offering all the stuff I have to check here.
What exactly is my R-squared matrix?
So that first, what do we have to do?
Very flor's.
I'm going to say from this Escalon, from this ascalon, I have to import something else, which is
exactly matrix.
And using this matrix, whatever I have imported Avel, I'm going to say this matrix dot r2 is just
best.
This is exactly right.
And here you have to mention what is your actual data which is in lightest and what are your predictions,
which is exactly in your predictions, which is what did and after let's say I have to store it somewhere
else, let's say I'm going to say this is my let's say or two score.
And after it, what we have to do, let's say I have to print this out as well.
So here I'm going to say my R-squared value is nothing, but it is just this placeholder and my placeholder
will receive values is exactly from this variable that I have defined or what, dear.
So here I'm going to just mention this are two is Kaveri.
What did after it?
What we have to do?
Let's say we have to print some more metrics for my regression.
So what are those which are exactly my Amit mean absolute error and mzee meniscal at it and animacy,
which is exactly what rwd me is that these are exactly three metrics in case of your regression use
case.
So for this I'm going to say my MFC, my and as he looks very first, I have to print my M80, so I'm
going to say my M80 is nothing but it is nothing.
But it is just my mat, Craig's dot and you have to access your mi underscore absolute underscore atter.
And here you have to mention what is your actual data which is in this contest and what are your prediction
which is exactly in your predictions.
So after doing all this stuff, I'm just going to copy from here.
Just paste, just paste.
And this time I have to print for Matthei.
This time I have to print exactly for Oremus.
So I'm going to say this is Oremus.
So this time I have to use another function, which is exactly I mean is quite error, which is exactly
this one.
Yeah.
And this time I have to use a function which is nothing but which is just a root of which is just a
root of this one.
So for this what you guys can do, you guys can just call this number Bidart security function so that
you will compute whatever message will return.
It will just compute its current of this one.
Let's say I have to visualize it.
The are what is the difference between my predictions and my actual data.
So for this, what I'm going to do, I'm going to say Ascendis dot this plot.
And here very first to have to mention what is your actual data, which is not in my wildest and what
is exactly your predictions, which is exactly in your predictions.
Just like you let's say I have to apply random forest algorithm on data.
It means you have to just pass this random forest class over there and it will do predictions.
It will give you a training, a score.
It will cover all the square metrics and all these different different types of metrics as well as this
with as well.
So what I'm going to do, I'm going to say from my Escalon module, I'm going to use that force.
I have to import my sample.
And in this example, I have my random forest agressor to just executed and now I have to just call
my function.
And here I have to just initialize this random forest degreaser.
So just execute it.
Now, you will see where all of this does gets executed with respect to training.
You have ninety five percent of school and these are all your prediction with respect to different different
indexes.
This is our.
Kolu, which say is, yeah, the model has 80 percent accuracy.
After that, you will hear all the different different metrics as well.
And this is exactly your distribution plan.
You will see over here at the zero point, you have a B, it means more than more than almost 70 percent
of data points are almost predicted in a right way.
So they're in France.
You can just watch from this distribution network.
So that's all about the session.
So the session will be very handy and very useful for you.
That's all about guys.
Thank you.
Have a nice day.
Keep learning.
Keep growing.
Keep practicing.