Packages In Machine Learning

3)Packages In Machine Learning

Here I'm Discussing with you the important python packages which are more widely used in Machine Learning

3.a) Pandas
3.b)NumPy
3.c)Matplotlib
3.d)Scikit-learn
3.e)Tensorflow & Keras

3.a) Pandas 

  • Python Pandas package is mainly used for  DataManipulation(changes in data) and Analysis
  • It is a free package which is used in Machine Learning
  • The name Pandas is derived from the term 'Panel Data'
  • We can create the DataFrames by using pandas which are used in most while Doing the Machine Learning practice
Installation of Pandas



    Open Your command prompt and simply type ' pip install pandas  ' , thats it and pandas package will be installed

As we all know the basics of the python programming we know how to import a particular package
pandas is also imported in the same way

Creating Our Own Dataset By Using pandas

Creating DataSet

Output


Loading the csv files 



Deleting a column or row
syntax for deleting

Output


If you want to delete a row place the row name you want to delete in the place of column name and put axis = 0 which refers that the deleted part must be a row.
inplace = True means if you dont place it,when you call the main dataframe in our case it is new_dataframe will return the dataset along with the coloumn/row you want to delete. So put inplace = True for permanently delete that  coloumn/row

Remaining Features we will discuss them later

2)NumPy

NumPy is a library for the Python programming language, adding support for large, multi-dimensional Arrays and Matrices, along with a large collection of high-level mathematical functions to operate on these arrays

NumPy installation and importing


Some Basic operations performed by NumPy are

creating an array using array( )

np.array function can help us creating the 1-d and 2-d arrays

range ( ) in NumPy

range(10) will help us printing the numbers from 0 to 9 because range function will always print upto
 n-1 values i.e 10-1 = 9

Using ones and zeros functions


zeros((4,3)) means it contains 4rows and 3 columns filled with zeros and similar to ones also

Converting a 1-D array into 2-D Using reshape( )

reshape(2,2) defines there will be the 2 rows and 2 columns which forms the 2-D array
Output


3)Matplotlib

Matplotlib is a plotting library for the Python programming language and its numerical mathematics extension NumPy. It provides an object-oriented API for embedding plots into applications using general-purpose GUI toolkits like TkinterwxPythonQt, or GTK+

Installation of matplot lib in cmd


Importing can be done by using 





Types of graphs present in the matplot lib are given below



Example of Matplotlib

  • pyplot is the package which is present inside the matplotlib used for plotting
  • plt.plot( ) used for plotting the x and y values and adding them colors and labels to differentiate between them
  • plt.xlabel and plt.ylabel are used to name the x-axis and the y-axis
  • plt.legend( ) will show the small box which shows the details of which color of line is belonging to the which data
  • see the given below example to understand it very well



4)Scikit-learn

It is popularly known as sklearn.It is a free machine learning library for python programming language

It features various classificationregression and clustering algorithms including support vector machinesrandom forestsgradient boostingk-means and DBSCAN, and is designed to interoperate with the Python numerical and scientific libraries NumPy and SciPy.

Installation of sklearn


Features of sklearn

Scikit-learn integrates well with many other Python libraries, such
as matplotlib and plotly for plotting, numpy for array vectorization, pandas dataframes, scipy, and many more

While Doing some projects in the ML this library helps you a lot in simplifying the tasks

We will discuss more important features in sklearn in upcomig lectures

5)TensorFlow and Keras

TensorFlow is mainly used in neural networks and is the free open source which is available in python

TensorFlow is Google Brain's second-generation system

In 2017, Google's TensorFlow team decided to support Keras in TensorFlow's core library and from that day keras is also one of the part in tensorflow

If one is install tensorflow automatically keras will also be installed

keras is capable of running on top of tensorflow

keras was  Designed to enable fast experimentation with Deep Neural Networks

Installation of TensorFlow



We Will Discuss More Features in TensorFlow & In Keras in our upcoming Lectures

<Prev>                                                                                   <Next>

Just Mail Your Doubts to sudeepdeep340@gmail.com

'' Don't Forgot To Share This Blog With Your Friends!! ''

Thank You!!
Happy Coding  : )

Comments

Popular posts from this blog

Types In Machine Learning