0% found this document useful (0 votes)
24 views10 pages

ML Libraries PPT (3.3)

Uploaded by

nipun.yadav.ug23
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PPTX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
24 views10 pages

ML Libraries PPT (3.3)

Uploaded by

nipun.yadav.ug23
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PPTX, PDF, TXT or read online on Scribd
You are on page 1/ 10

Search

Python Libraries for


Machine Learning
Search

Numpy and
02

Vectorization
NumPy is a powerful Python library used for numerical computing, particularly in data
science, machine learning, and scientific computing. It provides support for large,
multi-dimensional arrays and matrices, along with a collection of high-level
mathematical functions to operate on these arrays.
Vectorization refers to performing operations element wise without explicitly specifying loops, leading to a
cleaner and computationaly efficient code
In essence, vectorization allows for the application of operations (such as addition, multiplication, etc.)
directly on whole arrays or large sets of data without the need for explicit loops.

It significantly enhances performance by leveraging low-level optimizations and parallelization under the
hood.
Search

04 BLAS (Basic Linear Algebra Subprograms)


BLAS is a collection of highly optimized routines for
performing basic vector and matrix operations such as dot
products, matrix multiplication, etc.
NumPy employs BLAS (typically via libraries like OpenBLAS,
MKL (Intel Math Kernel Library), or ATLAS) to carry out linear
algebra operations efficiently, in C and Fortran over which
Python is based, many operations are implemented using
threads, those are also leveraged.

Parallelization in BLAS:
Many BLAS implementations support multi-threading,
meaning that matrix operations (like multiplication or
addition) can be performed across multiple CPU cores
simultaneously.
For example, when multiplying two large matrices, BLAS will
split the computation across cores, performing block-level
matrix multiplications in parallel.
Search

04

Pandas and
Datasets
Relevance
Machine Learning is all about that data isn’t it?
Well this library allows us to perform data aggregation, transformation and is wildly
flexible
Panda provides DataSeries and DataFrames(which are essentially Series indexed on
the same attributes)

Before training models, often feature engineering proves to be essential


Pandas proves to be extremely helpful in the data cleaning phase of the machine
learning cycle.
Data Manipulation,
07 optimized and indexed..

With flexibility to support variety of other libraries and being supported by countless libraries, PyTorch proves to
be indispensable for Machine Learning applications, in the above image you coan see some specific methods for
date-time parsing and processing among other methods that aid data manipulation and cleaning
Search

09
PyTorch
PyTorch is an optimized Deep Learning tensor library based on Python and Torch
and is mainly used for applications using GPUs and CPUs. PyTorch is favored
over other Deep Learning frameworks like TensorFlow and Keras since it uses
dynamic computation graphs and is completely Pythonic. It allows scientists,
developers, and neural network debuggers to run and test portions of the code
in real-time. Thus, users don’t have to wait for the entire code to be
implemented to check if a part of the code works or not.

Tensor Computation (similar to NumPy) with strong GPU (Graphical Processing Unit) acceleration
support
Automatic Differentiation for creating and training deep neural networks
Search

TensorFlow
08

TensorFlow is an open-source library developed by


Google primarily for deep learning applications. It also
supports traditional machine learning. TensorFlow
was originally developed for large numerical
computations without keeping deep learning in mind.
However, it proved to be very useful for deep learning
development as well, and therefore Google open-
sourced it.
TensorFlow works on the basis of data flow graphs that
have nodes and edges. As the execution mechanism is
in the form of graphs, it is much easier to execute
TensorFlow code in a distributed manner across a
cluster of computers while using GPUs.
Search

08
PyTorch vs TensorFlow
Although PyTorch also supports distributed Optimized for scalability and production-ready
training, it has historically been considered less deployment. It supports various deployment
optimized for large-scale production compared to options, such as TensorFlow Serving, TensorFlow
TensorFlow. However, PyTorch has made Lite (for mobile), and TensorFlow.js (for running
significant improvements in this area models in browsers). TensorFlow can be deployed
on multiple platforms with ease.

Known for being more Pythonic and easier to use, especially Initially had a steeper learning curve due to its
for research. The dynamic nature of PyTorch makes it static graph approach. However, with TensorFlow
intuitive, and you can write code in a straightforward 2.x and the integration of Keras as the default
manner, just like normal Python code high-level API, it has become much easier to use,
even for beginners.

PyTorch's dynamic nature makes it much easier to


TensorFlow traditionally had a more challenging
debug using Python's standard debugging tools
debugging experience due to its static graph
like PDB. You can print intermediate values, check
execution. However, with TensorFlow 2.x, eager
tensor shapes, and make changes on the fly,
execution allows for more flexibility and easier
which significantly improves the debugging
debugging
experience.
Search

04

The Scikitlearn
Library

Scikit-learn is an open-source Python library that implements a range of machine learning, pre-
processing, cross-validation, and visualization algorithms using a unified interface. It is an open-
source machine-learning library that provides a plethora of tools for various machine-learning tasks
such as Classification, Regression, Clustering, and many more.

Be it encoding data(OneHotEncoding) or feature scaling with transformation functions like


MinMaxScaler(Normalisation) or performing train test splits, scikit learn provides for a wide spectrum
of operations to handle data cleaning and other preprocessing tasks
Search

Thankyou By Nipun Yadav


2023UCS1591

You might also like