Hello and
welcome to the final tutorial of part one Data Pre-processing.
We finally completed all the steps that there is to do to prepare any data
sets on which we will build our machine learning models.
And now what
we only need to do left is to prepare the data pre-processing template.
Because we learned a few stuff, we learned how to import a data
set to take care of missing data, to encode categorical data,
to split the data set into the training set and the data set, and to apply feature
scaling to put all of our variables on the same scale.
However, in the data pre-processing template,
we're not going to include all of these.
We are only going to include the importing the libraries.
Then of course we need to import the data set.
Then regarding missing data, I just wanted to show you how to take care
of that in case you have some missing data in your data sets.
You know, in your work.
So we are not going to include this in the templates.
It's just good to know how to take care of this.
But then we will focus on the machine learning models themselves.
And if in your work experience you encounter missing data
you know how to handle this.
Any missing data issues then?
As for categorical data, we won't include it either in the template
because we are going to find
very few examples of data where we have to encode the data.
There will be some examples,
but we won't include it in the templates because our data sets are going
to be well prepared
so that we can mainly focus on the machine learning models and get the maximum fun.
And then of course, we will include this in the template,
splitting the data sets into the training set and the test set.
Because that's a very important step.
You need to split your data
set between training and test, because you need to evaluate your model
on a different set than the sets on which you build your model and feature scaling.
Okay, so feature scaling.
I hesitated to include it in the template, but we are going to include it
only we're going to put that as comment because you're going to see that
there are several libraries in R and Python, and some of them require us
to apply features getting to the data, and some of them don't.
So most of them don't.
Actually most of them take care of that for you.
You don't have to do it manually,
but you will see that some libraries don't apply the feature scaling.
I won't tell you
which models there are right now, because I will let you find out the surprise.
But keep that in mind
and you will see that sometimes we will have to use feature scaling.
Okay, so let's start making the template.
It's going to be very quick.
Let's do it right now. Let's jump to R.
All right.
So here is all the steps that we did together.
So importing the data sets.
Yes we're keeping it of course taking care of missing data.
That was just to show you we won't need it in the future. So.
But you will probably need it in your future.
But in the future of this course, we won't need it.
So we will remove it
and coding categorical data.
Same here.
We will have to do it once or twice, but not all the time.
So we will remove it.
And as I told you, I'm putting this in a separate file
so that you can still use it if you need it for your work.
All right.
And now I think we have everything
splitting the data set into the training set and test set.
Of course we are keeping that and feature scaling feature scaling.
As for Python we're going to put that in comment.
So then the three double quotes
is not a way to put multiline comments in R.
So unfortunately we cannot do it.
What we need to do is this is a good trick.
You select the two lines here and then you press Command and Control
plus shift plus C.
And that puts all your lines in comment.
And eventually we'll just add a final touch to this template,
which is the case where we need to take a subset of our data set.
And in that case we will add the line data set
equals.
Then we take the same data set.
And we use the square brackets to select
the indexes of the columns we are interested in to build our model.
So let's just put some numbers here.
And if we need to select specific columns of interest
in our future data sets we will change those indexes.
But for now let's just put this line in comment.
All right.
So the template is ready on as well.
We are ready to start our machine learning models.
You have no idea how I'm excited about that.
I can't wait to show you how it's going to be a lot of fun.
We're going to make awesome predictions.
You know, we will.
We will have
some kind of scenarios, business problems, and we will have to solve them.
And then we will use the power of machine learning to solve these problems.
You will see how machine learning is powerful.
It gives you amazing predictions, amazing results.
And keep in mind you will never be lost because we will always know what
we are coding. We will always visualize it.
There will always be some visual graphics
of what we are doing when we make every machine learning model.
So I can't wait to start this with you.
This was the boring part, but the very important part to do
so that's great that we did it and now it's time to have fun.
So thank you for watching this data pre-processing tutorials.
Congratulations for completing this part.
You are now ready to make machine learning models,
and I look forward to seeing you in the next part.
Until then, enjoy machine learning.