Halaal, before going ahead in this session, let's have a quick overview of what we have done in this
project.
So doing lots of things, feature engineering, feature and coding, all these types of things.
In the last session, we have created our amazing machine learning model using cross-validation in which
we have applied this logistic regression algorithm on our data and we have achieved that much accuracy
on our data.
So in this session, what we have to do, we have basically this assignment in which I have to apply
multiple algorithms on our data and we have to check its accuracy as well.
So what our algorithm, you know, whatever, you know what our what our good will execution no bias,
let's say again in random forest decision, tree activist, whatever algorithm, you just implement
it on this data.
So this is exactly your task.
So let me do you all these things in front of you.
So I'm just going to say and if you guys don't know all these algorithms, you can check out my all
the previous videos where I have explained each and every algorithm from scratch, including its mathematical
intuition, because understanding the maths behind algorithm is very important, because whenever you
are going to apply for a green job as a data scientist in any top notch companies, they are not going
to ask who you are.
What is the integration they are going to ask you.
You are telling me how exactly you can achieve that best fit line in linear regression.
So that's why you have to understand mathematics behind each and every algorithm.
So in this session, what we have to do, we are basically going to consider navabi bias, logistic
and random forest.
And this is a tree.
So we are basically going to cover five algorithms and all these five algorithms I have already covered
in my all the previous lectures.
Just go and check out all these things.
So very first I have to import all these things.
I'm going to say from this Escalon module I have something which is exactly my name by I just press
tab.
And from this I have to import my Gorshin and we offer it.
What I have to do.
I'm just going to say from this Escalon, I have to import something on this linear model.
So I'm just going to send in an a school model.
And from this I have to import my logistic regression with exactly this one.
Now, what I have to do from this on, I have to import.
This time I can.
And so I'm going to see neighbors module.
I have something known as my canibus.
You can just press there.
Here you have to import classifier because this is exactly your classification is now what you have
to do from this side could learn you have something known as in Sambal Module and from this in Sambal
module here you have done stuff in Zambia, learning algorithms like Random Forest actually boost and
tons of algorithms.
So I'm going to say I have to import my, let's say, random forest classifier for what I have to do.
Let's say I have to import my let's say this is entry as well.
So I'm just going to say from Sikandar Dautry, I have to import something known as decision tree classifier.
Just aggregate all the stuff lexan.
Just going to define a blank list over there.
And in this blacklist I have to append each and every algorithm.
Then once I have this list, then I'm going to trade on this list.
That is exactly my approach over here.
So I'm just going to say models dot a pen and what I have to open this time.
Let's say I have to have been here in the form of Stupples, where I'm just going to say that if I have
to append this logistic regression and basically this is exactly neme, I have to initialize my regression
as well.
So I'm just going to say logistic regression and just initialize it after what we have to do next.
I'm just going to say I have to abide by another thing which is exactly this time I have to import Mangosteen
and I'm just going to say this is exactly my like Sydney bias.
I'm going to say this is my name bias.
Once I have all these things, then I have to initialize its class as after doing all these things.
Now what we have to do, we have to upend our whole case.
So I'm just going to say third one is exactly my random forests.
So I'm going to say exactly my random forest.
Then I have to initialize its class as well.
So this time I'm just going to say random forest classifier once having all the stuff.
What I have to do, I'm just going to say this time I have to initialize or I have to pass my decision
tree.
So I'm just going to say this is exactly my decision tree.
Then I have to initialize my decision tree as well, which is exactly classifier.
After having all the stuff, you have to upend the algorithm as well, which is exactly OK in it.
So I'm going to say this is my Ghanim and you have to initialize it as well.
So I'm just going to say he niebler classifier and this time if you will pass shift plus that you will
get all the parameters over here, you will get tons of parameters in this class.
So now what you have to do, basically just execute the cell over there and now we have to fetch let's
say let's say we have to print what exactly is my algorithm as well as we have to find all the stats
of this particular algorithm.
It means I just need two things for this.
I'm just going to say for name comma models in model in this model list, once I have this iteration,
after having this iteration, what do we have to do?
Basically, I'm just going to say let's say I have to print my name.
So I'm just going to say just print its name after it or whatever model I have on this.
I'm just going to say just fit my X, underscore Krien and definitely Y underscore Grainne.
Make sure you don't have any case sensitive issues.
So here you will see your X is in top form and your guy is in a small one.
So I'm going to say it is nothing but my X on a screen.
So once you fit what you have to do, you have to do prediction.
So I'm just going to say model dot predict.
And here I have to say on X on the school test, I have to predict once doing prediction, I have to
store somewhere else.
Let's say I'm just going to say it is nothing but my let's say predictions at once having this prediction.
Sorry, what I have to do, let's say I have to create my confused metrics.
So let me just copy this code and let me just based there and let me just initialize my confusing metrics
and hear what I have to say.
I'm just going to say here, I have to say my predictions.
The very first thing.
The second thing is exactly might actually daviss my Y.A. test.
Let's say I have to print this confusing metric.
So I'm just going to print it after it.
What we have to do, we have to print our accuracy as well.
So here I'm going to say accuracy on the score is score.
And the very first parameter is not predictions.
What I have predicted and a second one, what is my actual data?
Which is why NASCO test next.
I have to print this as well.
So I'm going to say just print all these stuff as well.
Let's say after having all this stuff, let's say here I'm going to add my espacio this or that, or
you can say adding my new learning model so that it will be more user friendly.
So after having all this stuff, let me append on Lunine as well.
So I'm going to say just append Newline over here.
So if I'm going to execute this well now, you will see the very first thing is exactly my logistic
regression.
It has that much accuracy and it is exactly it is not my class model.
And if you want to cross validated just about all these different.
Different.
The with respect to neighbors here, you will see this is exactly is confusing metrics, and this is
exactly that accuracy with respect to this my neighbors as well.
After that, you will see with respect to this random forest, you have a damn good accuracy.
You will see your accuracy is 95 percent.
And that's what I have defined in my random pilot's intuition.
Random forest is exactly the best garden of data scientist.
That's why this is exactly that reason.
Whenever you have that much complex data and whenever you have some complex, massive data at the time,
that random forest is going to be super, super over there.
Similarly with the decision tree, it is still executing and it will take a while.
Definitely.
Now you will see with respect to this decision tree, you have somewhere close to your random security.
It means whenever you are going to use it in Sambor learning techniques or new data, almost in 99 percent
of the use cases, you will get your damn good accuracy.
Similarly, with respect to your kenen, you have that definitely you have that much good accuracy.
So you can simply say you are here whenever you have some pretty much complex use cases, your random
forest, your decision tree, your booze, all your Sambell learning approaches are super, super pioneer
there.
So hope you love the session.
And if you guys don't want to know all these algorithms, please go ahead and check out my all the previous
videos in which I have explained each and every ill gotten from scratch, all these algorithms, all
it's mathematical intuition, all these interna how exactly these algorithms works internally, because
you have to make sure you know all these algorithms very well.
So that's all about this project.
Hope you love this project very much.
Thank you.
Have a nice day.
Keep learning.
Keep growing.
Keep motivating.