So there you go.
That's the. Whole implementation. Let me scroll down a bit.
And as you can see. You will.
Get many tools.
So let's have a look at them one by one through the table of contents.
So the first thing I'll teach you is how.
To import. The libraries.
These are the libraries we will always use.
In any machine learning model implementation.
So we. Will include them in the template.
So that. They can be ready to.
Use. For our implementations.
Then I. Will teach you how to. Import.
The data set that exact same data set which I.
Just introduced to. You a. Few seconds ago.
That data set I will show you how to first upload.
It on Google Colab, and then import it in your Python file.
All right.
So that's the second step importing the dataset.
Then I will teach. You how to take care.
Of missing data.
Because indeed in most of the.
Data sets you work with in.
Your machine learning career, you might encounter some missing data.
And that's the case here for our data set.
As you can see, there is a missing salary here and a missing age.
And I will teach you. Exactly what to.
Do in order to handle this.
There are some techniques. Which are.
The most relevant to then, you know,
optimize the training of your machine learning models.
And I will. Show you the best of. These techniques.
All right then. After.
Taking care of the missing. Data, I will teach you how.
To encode.
Categorical data, whether it is the.
Independent variable.
Which is your predictors, or the.
Dependent. Variable, which is what you want to predict.
So as you can see in our data.
Set, well we have actually two categorical variables.
We have. This one the country column containing in.
These three categories.
France, Spain and Germany as.
Opposed. To all these numerical.
Values. In the. Other variables.
And also we have this categorical.
Variable containing two. Categories.
Yes and no.
All right. So I will teach you what to do with that.
Situation so that then you can be ready.
To preprocess. Any data.
After this I will teach you how to split the data set.
Into the training set and a data set.
And that step is very important because each time you want to train a
machine learning model.
Well, you have to create two separate sets.
One training set.
Where you're going to.
Train your machine learning model to understand the correlations inside your.
Data set.
And one test.
Set that you're going to use to evaluate your.
Machine learning models.
And that's therefore on new observations.
Because the test set.
You know, is like new data on which the model wasn't trained.
So that's very important to do this in order to check that indeed there is not.
Overfitting.
You know, when your machine learning model is trained too.
Well. On the training set.
So well that.
It doesn't perform well on new observations.
And so that's. Why this step. Is very important.
And we will include it in the data preprocessing template.
And finally.
I will teach you a.
Very important tool
that you might have to use in some of your machine learning model implementations.
Which is feature. Scaling.
Which actually scales all your features.
To make sure they are on the. Right scale.
So you won't have to use. That all the. Time.
We will see.
Of course, in each of the machine learning model implementation, whether.
We have to apply feature. Scaling or not.
So you'll have. Everything, but.
We. Have to include. This feature scaling.
Tool in the data preprocessing toolkit, because indeed.
We'll have to use it. From time to time.
All right.
That's the table of contents.
And we are going to reimplement.
All. This from scratch.
However, if you feel. You're comfortable.
With all these tools.
And you understand them already, and you can't. Wait.
To move on to the machine learning implementations.
Well, feel free to just read this code.
And make sure you understand it.
100%, and then move on to.
Part two.
Regression, where we're going to build.
Our first regression. Models.
However, I really insist that this course must be action based.
So I. Really want you to take action as much as you can.
And that's why.
If you're ready to do this for data preprocessing, well, stay.
With me in this part one,
because we are going to re-implement each and every single one.
Of these tools.
And to do. This.
Because remember that.
This colab file is.
Actually in read only mode.
Well, to do this, we'll have to create a copy by.
Clicking. File here.
And then. Save a copy in drive.
This will.
As you can see.
Create a copy of this Google.
Colab implementation on.
Which you will be able to.
Modify and.
Mostly code. Your own implementation.
All right.
And that's exactly what we're going to do now. We're going to.
Actually. Re-Implement all. These code.
Cells from scratch so that I make.
Sure that you take. Action.
And therefore we're. Going to remove.
Each.
One of.
These code cells by.
Clicking this trash button here.
But make sure not to remove.
Well, the text cells.
This is a text cell.
This is a code cell.
So make sure to only remove.
The code cells
so that we can actually keep this well highlighted structure of this.
Implementation. All right. Almost done.
A few code cells left.
Trash button.
Trash trash trash.
And almost done. There we go.
All right.
So that's the whole structure of this implementation.
These are all the tools that you will.
Probably need when.
Preprocessing your future data sets for your future.
Machine learning models.
So it's very important that you understand well this implementation.
So whenever you're. Ready let's start.
From the next tutorial to.
Master data preprocessing.