Hello my friends, and welcome to this new section where you will finally learn on
how to evaluate your regression models and mostly on how to select the best one.
All right, so this is indeed a section that has been long awaited.
Because indeed, in this whole part two of regression, we built many machine
learning models.
And now most of you must have the question, okay, that's cool.
I have all these regression models in the toolkit, but which one do I select?
Which one should I apply for my data set?
And well, I actually have some very good news for you.
We will give the answer to this exact question in this tutorial.
So I'm going to try to reveal everything in this same tutorial so that you know,
this can be the ultimate tutorial of regression, where you finally learn on
how to use your regression toolkit the right way on your future datasets.
So what I will do in this tutorial is I will introduce you to this toolkit
that I've just made and which contains all the regression models we learned
together into some very generic code
templates by very generic code templates, I mean that
you will be able to use these code templates on your future data set.
By having only 1 or 2 things to change, I made them as generic as possible
so that they can be ready to deploy on your data sets.
And besides, each of them contains, at the end of the implementation,
the evaluation tool, you know, allowing to evaluate your model
so that you can very easily and quickly compare the performance of each of them.
In other words, you know, in short, thanks to this tool kit, you will be able
to select the best model for your data set in a very short amount of time.
You know, very, very efficiently.
And that's exactly what I'll prove to you.
You know what I'm going to show you in this tutorial?
We're going to take a real world
data set, you know, with several features and lots of observations.
I will deploy each of the regression models of the toolkit on this data set,
and you will see how quickly and efficiently
I managed to figure out the best model.
And that's actually the answer to the question
how should I select the best model?
And the simple answer is
try all your models, try all your models, and just select the best one.
Having the best performance result.
And that performance result is measured
by, of course, the coefficient r squared or adjusted r squared.
All right.
So there we go.
Let me introduce you to this toolkit.
And then let's proceed to the demo.
But first let's make sure everyone here is on the same page.
This is a new folder you know different than the whole machine learning.
It is a folder containing ten parts.
This is a new folder where you will get, you know, that regression toolkit
containing all the regression models.
And then when we tackle part three, the classification toolkit with all the
classification models, and mostly you know this is the model selection folder.
This is the folder you will want to use when you want to deploy
either your regression models or your classification models
on your data set, in order to quickly and efficiently select the best one.
And now there we go.
Let's enter this regression folder for model selection and as you see
it contains five regression models
that we studied in this part two you know multiple linear regression.
And I didn't include simple linear regression of course, because
now we will work with a real world data set with therefore several features.
Then we have polynomial regression.
Then support vector regression, then decision tree
regression and of course random forest regression.
And as I told you, I made each of these implementations
very generic so that you can deploy them on your future
data sets by having only 1 or 2 things to change.
Assuming, of course, that your data set has a CSV format
and contains all the features in the first columns, and the dependent
variable in the last column, that's really the essential condition.
And then of course, here
I chose a data set without missing values or categorical data.
That's because I trust
you will know how to handle this thanks to your data preprocessing toolkit.
So this data set is quite classic but yet real world because as you can see,
it contains several features and many, many observations.
Actually almost 10,000 observations if we scroll down.
Yes, almost 10,000.
All right.
With, as you can see, only numerical values, no categorical data in strings.
And once again, no missing data.
And I chose such a data set so that, you know, we can make our code
templates for each of our regression models 100% generic,
so that you only have to change the name of the data set.