Skip to main content

Learn Machine Learning Using Python In Data Science - (Part -2)

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 clients
    purchased one of their products.. So keep with us.

                                                                Thank You!

Comments

Popular posts from this blog

Learn Machine Learning Using Python In Data Science - (Part -1)

Part -1 :-  Students , In this part we will see little bit of theory about leaning paths , Difference between  AI ,ML and DL as well as regression and  types of regression. CONTENT 1: Learning Paths Hey Data Scientist, Simple Way Learn Machine Learning  is bringing you a new learning experience. We know how difficult it is to carve out a career track so we’re introducing the Simple Way Learn Machine Learning  to guarantee your way to success. This Skill Track is a perfect fit if you: Struggle to determine the skills you need to succeed in this field, Are unsure which courses are right for you, Desire to arrange your learning curve efficiently and on your schedule. Built to deliver streamlined on-the-job success, the Simple Way To Learn Machine Learning    provides structured curriculums for in-demand Machine Learning skills. After completion, All Parts Track students will walk away with the required Machine Learning skills and a complete portfolio of work to showcase in competitive job

Learn Machine Learning Using Python In Data Science - (Part -4)

  Part - 4  :-  Students, so now let's add a new tool to our preprocessing toolkit, which is taking care of missing data. So indeed, if we have a look again at our data set data that CSI, we noticed that there is a missing salary here for this specific customer from Germany of 40 years old and who purchased a product. Download Data.csv :-  Download S o generally you don't want to have any missing data in your data set for the simple reason that it can cause some errors when training your machinery model and therefore you must handle them. A first way is to just ignore the observation by deleting it. That's one method and this actually works. If you have a large dataset and you know, if you have only one percent missing data, you know, removing one percent of the observations won't change much the learning quality of your model. So one percent is fine, but sometimes you're going to have a lot of missing data and therefore you must handle them the right way. So that w

Learn Machine Learning Using Python In Data Science - (Part -3)

Part - 3  :- Students, Now let's learn together how to import a data set. As a reminder, we're going to learn how to import the following data set data that CSV, which is a very simple data set of, let's say, a retail company that is doing some analysis on which clients purchased one of their products. Download Data.csv :-  Download So the rows in this data set correspond to different customers of this employee. And for each of these customers, we have the country, they live in their age, their salary and whether or not they purchased the product. OK, so we're going to learn how to import that GSV on Python, using, of course, to Pendas library. Importing The Dataset :-  So let's first create a new code cell and now let's import this dataset. So the first thing we have to do is to create a new variable and this variable will contain exactly the dataset. Since now we're importing the data set and we want to integrate the data set in a variable, I'm going t