Part - 2 :- Students , This is the first very important step of this journey, because indeed, any time you build a machine learning model, you always have a data processing phase to work on. Right. You have to pre-process the data in the right way so that the machine learning model that you're going to build can be trained the right way on the data.
Requirements :- Use any python IDE. Ex :- PyCharm , Google Collab , Jupyter notebook.
Learning model, you always have a data processing phase to work on.
You know, you're going to learn by doing in this part and therefore for this implementation and each future implementation, we will reimplemented from scratch. And so there you go. Our first implementation will be for all the data processing tools using some Machine Learning Module.
Importing The Libraries / Modules :-
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.
We're going to import three libraries now, which are known by matplotlib and pandas numpy will allow us to work with arrays because indeed you will see that your future machine learning models will expect some arrays as inputs. And therefore we need a library to work with these arrays.
And that's by then we'll import matplotlib, which is the library that will allow us to plot some very nice charts.
You will see that we will actually many charts and graphs in this course. And finally, Pandas, which will allow us to not only import the data set, but also create the matrix of features and the dependent variable vector.
1.numpy module - import numpy as np
We go import then you need to follow by the name of the library you want to import. And the first one we want to import is called numpy and then what we usually do is we add a shortcut because each time we will use a function of the numpy library.
So each time we will call numpy, I will actually call np, then next library is import.
2. matplotlib module - import matplotlib.pyplot as plt
And actually, as I told you, a library is an example of modules. And here we're interested in a particular module called by matplotlib, and that's the module that allows us to plot very nice charts. And so here we're not only going to import matplotlib, but particularly, well, the pyplot module.
And as you can see, in order to get this module, I added a dot here which allows you to access the different modules of the matplotlib library and the module, which is pyplot. And again, we're going to add a little shortcut here, which we're going to call plt that's the usual name for this module.
3.Pandas Module - import pandas as pd
And finally, we're going to import a final library, which is the pandas library, a super useful library to preprocessor data sets and mostly to import them. And same for this library. We're going to add the simple shortcut name Pd. And there you go.
Congratulations now, not only you know how to import the libraries, but mostly you have your very first data processing tool in your toolkit. So now we're going to move on to the third part (Part-3) which will be to import the data set. And that's exactly what we'll do in the next part.
- In our next part (Part-3) we will see how to import the following data set data that ASV, which is a very simple data set of, let's say, a retail company that is doing some analysis on which clientspurchased one of their products.. So keep with us.
Thank You!
Comments
Post a Comment