All right, my friends.
Are you ready for the demo?
I remind that this demo works for any data set, you know,
regardless of the number of features.
And as long as they have,
you know, the features in the first columns
and then the dependent variable in the last column.
And also assuming that any missing data or categorical data
was already taken care of thanks to your data preprocessing toolkit.
All right.
So this is going to be very exciting because it's really now that I'm going
to show you the power of code templates and how you can quickly
and efficiently select the best regression model.
All right.
So let's do this.
Enough talking I'm going to proceed to the demo.
Now just resetting everything because we're going to do something fun.
We will actually use this run
all option of the runtime which will run all our cells at once.
So that, you know, we can really optimize the efficiency.
But let's not forget to upload the data set in each of the implementations.
Otherwise, this cell won't be able to execute.
So we're going to upload it.
Now it is connecting to runtime.
And then second we should be able to see the up the button.
There we go.
So let's click this upload button.
And now on your machine you're going to find the folder.
You know the model selection folder.
That's the whole machinery. It is it folder.
And that's
this new model selection folder containing you know that regression folder
with all the good templates for regression and the classification with all the good
templates for classification.
If you missed that folder somehow, don't worry, it's
worth given right before this tutorial.
You know, in the article at the bottom you had a zip folder attached
which you could download on your machine
and which contains exactly the same as what I have here.
All right.
So now we're going to go to the regression folder which contains
all the implementations, meaning all the code templates
for each of your regression models, both in ipynb format, which you can open
with either Google Colab or Jupyter Notebook, and in py format,
which you can open with a classic Python terminal or Spyder in Anaconda.
So you have everything
and you also have the data set, you know, containing these four features.
The temperature of the vacuum, the ambient pressure and the humidity.
And we predict the energy output.
All right.
So that's a very classic data set.
Once again very generic.
Trying to represent the other future data sets you'll be working on.
And well speaking of this data set that's exactly what we have to select here.
So we're going to click open to upload the data set in our notebook.
And there it is.
And now as I told you here in the implementation you only have
to enter the name of your data set.
And as far as we concerned here for our demo.
Well this data set is called data dot CSV.
All right.
So now we're going to quickly do exactly the same for other implementations.
Upload
then data dot CSV then open
and loading it's uploading it and we'll have it in a second.
And then we'll just replace the name of the data set here by data CSV.
So that's for polynomial regression.
Now for support vector regression will same upload data
dot CSV open and loading it uploading it in a second we should have it.
There we go.
Now we only replace this by data dot csv.
Then for decision tree regression.
There we go.
Upload then data dot csv open and we will have it in a second.
Upload it in the notebook.
And now replacing this by data dot CSV.
And finally for random forest regression
upload data CSV.
Open.
And now replacing this by data that is V.
And now, my friends, we are finally ready
to test each of our regression models
and figure out in flashlight which one is the best.
Remember, the closer the R-squared coefficient is to one, the better.
Is your regression model.
So in order to figure out which is going to be the best
model, we'll just take the one with the highest R-squared.
You know, with R-squared that is the closest to one.
All right.
Are you ready.
Let's do this starting with multiple linear regression.
So now we're simply going to go to run time and then run.
Oh and all the cells are now executing.
And there you go.
We end up with an R-squared coefficient of oh point 93.
Very good.
Very good. One.
As we can clearly see you know the predictions are amazing.
They're very close to the real results.
So remember this first column is the vector of predictions.
And this second one is the vector of real results.
And that's why here we have an amazing R-squared coefficient.