unit-2

Download as pdf or txt
Download as pdf or txt
You are on page 1of 19

UNIT-2 NOTES

Applications of Machine Learning, Supervised vs Unsupervised Learning, Python libraries


suitable for Machine Learning

The field of artificial intelligence (AI) and machine learning has been progressing rapidly
towards developing intelligent machines. These intelligent machines, also known as artificial
general intelligence (AGI) or strong AI, aim to exhibit human-level intelligence and perform a
wide range of tasks that typically require human intelligence.

Definitation of Machine Learning: It enables computers to learn from data and make decisions
or predictions without being explicitly programmed to do so. This is part of Artificial
Intelligence.
Normally, the software behaves the way the programmer programmed it; while machine learning
capable of accomplishing intended tasks by using statistical analysis and predictive analytics
techniques.

For Ex: You may have noticed that whenever we like or comment a friend’s pictures or videos
on a social media site, the related images and videos are posted earlier and keeps on displaying.
Same with the ‘people you may know’ suggestions, the system suggests us other user’s profiles
to add as a friend who is somehow related to our existing friend’s list. Wondering! How does the
system know that? That is called Machine learning. The software uses the statistical analysis to
identify the pattern as a user you are performing, and using the predictive analytics it populates
the related news feed on your social media site.
Why we need Machine Learning?
Advancements in AI and machine learning algorithms, coupled with the increasing availability
of big data and computational power, have fueled progress towards intelligent machines. Here
are a few key areas where advancements are being made:
Machine Learning: Machine learning algorithms, such as deep learning, have revolutionized AI
research. These algorithms enable machines to learn patterns and make predictions or decisions
based on data. With the availability of large datasets and improved models, machines are
becoming increasingly capable of understanding and extracting valuable insights from complex
data.
Natural Language Processing (NLP): NLP focuses on enabling machines to understand and
generate human language. Significant progress has been made in areas like machine translation,
sentiment analysis, and chatbots. NLP advancements have led to the development of virtual
assistants like Siri and Alexa, which can understand and respond to natural language queries.
Computer Vision: Computer vision is concerned with enabling machines to interpret and
understand visual information from images or videos. Advances in computer vision have led to
applications like object recognition, facial recognition, autonomous vehicles, and augmented
reality. Machines can now accurately identify and classify objects in real-time, enabling a wide
range of applications in various industries.
Reinforcement Learning: Reinforcement learning involves training machines to make decisions
by trial and error, receiving feedback in the form of rewards or penalties. This approach has
enabled machines to achieve superhuman performance in complex games like chess, Go, and
poker. Reinforcement learning is also being applied to robotics, where machines learn to perform
tasks in physical environments.
Explainable AI: As AI systems become more complex, there is a growing need for transparency
and interpretability. Researchers are working on developing techniques to make AI models and
their decision-making processes more understandable to humans. Explainable AI aims to provide
insights into how AI systems arrive at their decisions, enhancing trust and accountability.

How Machine Learning works?


• The first step is to gathering the past data from the various sources such as excel files,
text files or any other provider. The quality of related data is the foundation of learning for
the software, the more relevant the data, the better learning for the software
• The next step is data preparation. The programmer spends time on preparing the quality
data and fixing the data issues. The missing data should be rectified to improve the data
quality.
• Develop the data model with appropriate algorithms. The models are developed and
tested with relevant algorithms which enable the software to read the correct data sets
intelligently in the real world
• Next step is to testing the model’s accuracy using the data sets used while developing the
models and also the data sets which were not used while developing the models. It shows
the model’s performance and accuracy with the optimum level of precisions.
• Finally, check and improve the performance by using various data sets which were not
used earlier. That shows the software’s capabilities to read new data sets based on the
rules defined in the programmed algorithms.

While significant progress has been made, there are still challenges to overcome on the path
towards intelligent machines. Some of these challenges include ethical considerations,
ensuring fairness and avoiding bias in AI systems, addressing privacy concerns, and ensuring
the safety of AGI.
Overall, the development of intelligent machines holds great promise for enhancing various
aspects of our lives, including healthcare, transportation, education, and more. However, it is
important to approach the development and deployment of AI technologies with careful
consideration of their societal impact.

Well- Posed Machine Learning Problems


A computer program is said to learn from experience with respect to some class of tasks and
performance measure, if the performance at the tasks, as measured by performance measure,
improves with the experience.
In general, to have a well-defined learning problem, we must identify these three features:
• The learning task
• The measure of performance
• The task experience
The key concept that we will need to think about for our machines is learning from experience.
Important aspects of ‘learning from experience’ behaviour of humans and other animals
embedded in machine learning are remembering, adapting, and generalizing.
• Remembering and Adapting: Recognizing that last time in a similar situation, a certain action
(that resulted in this output) was attempted and had worked; therefore, it should be tried again or
this same action failed in the last attempt in a similar situation, and so something different should
be tried.
• Generalizing: This aspect is regarding recognizing similarity between different situations. This
makes learning useful because we can use our knowledge in situations which are unseen earlier.

Certain examples that efficiently defines the well-posed learning problem are

1. To better filter emails as spam or not


• Task – Classifying emails as spam or not
• Performance Measure – The fraction of emails accurately classified as spam or not
spam
• Experience – Observing you label emails as spam or not spam
2. A checkers learning problem
• Task – Playing checkers game
• Performance Measure – percent of games won against opposer
• Experience – playing implementation games against itself
3. Handwriting Recognition Problem
• Task – Acknowledging handwritten words within portrayal
• Performance Measure – percent of words accurately classified
• Experience – a directory of handwritten words with given classifications
4. A Robot Driving Problem
• Task – driving on public four-lane highways using sight scanners
• Performance Measure – average distance progressed before a fallacy
• Experience – order of images and steering instructions noted down while observing
a human driver
5. Fruit Prediction Problem
• Task – forecasting different fruits for recognition
• Performance Measure – able to predict maximum variety of fruits
• Experience – training machine with the largest datasets of fruits images
6. Face Recognition Problem
• Task – predicting different types of faces
• Performance Measure – able to predict maximum types of faces
• Experience – training machine with maximum amount of datasets of different face
images
7. Automatic Translation of documents
• Task – translating one type of language used in a document to other language
• Performance Measure – able to convert one language to other efficiently
• Experience – training machine with a large dataset of different types of languages

APPLICATIONS OF MACHINE LEARNING

Machine learning is a buzzword for today's technology, and it is growing very rapidly day by
day. We are using machine learning in our daily life even without knowing it such as Google
Maps, Google assistant, Alexa, etc. Below are some most trending real-world applications of
Machine Learning:

1. Image Recognition:
• Image recognition is one of the most common applications of machine learning. It is used
to identify objects, persons, places, digital images, etc. The popular use case of image
recognition and face detection is, Automatic friend tagging suggestion:
• Facebook provides us a feature of auto friend tagging suggestion. Whenever we upload a
photo with our Facebook friends, then we automatically get a tagging suggestion with
name, and the technology behind this is machine learning's face
detection and recognition algorithm.
• It is based on the Facebook project named "Deep Face," which is responsible for face
recognition and person identification in the picture.
2. Speech Recognition
• While using Google, we get an option of "Search by voice," it comes under speech
recognition, and it's a popular application of machine learning.
• Speech recognition is a process of converting voice instructions into text, and it is also
known as "Speech to text", or "Computer speech recognition." At present, machine
learning algorithms are widely used by various applications of speech
recognition. Google assistant, Siri, Cortana, and Alexa are using speech recognition
technology to follow the voice instructions.

3. Traffic prediction:
• If we want to visit a new place, we take help of Google Maps, which shows us the correct
path with the shortest route and predicts the traffic conditions.
• It predicts the traffic conditions such as whether traffic is cleared, slow-moving, or
heavily congested with the help of two ways:
o Real Time location of the vehicle form Google Map app and sensors
o Average time has taken on past days at the same time.
• Everyone who is using Google Map is helping this app to make it better. It takes
information from the user and sends back to its database to improve the performance.

4. Product recommendations:
• Machine learning is widely used by various e-commerce and entertainment companies
such as Amazon, Netflix, etc., for product recommendation to the user. Whenever we
search for some product on Amazon, then we started getting an advertisement for the
same product while internet surfing on the same browser and this is because of machine
learning.
• Google understands the user interest using various machine learning algorithms and
suggests the product as per customer interest.
• As similar, when we use Netflix, we find some recommendations for entertainment
series, movies, etc., and this is also done with the help of machine learning.

5. Self-driving cars:
One of the most exciting applications of machine learning is self-driving cars. Machine learning
plays a significant role in self-driving cars. Tesla, the most popular car manufacturing company
is working on self-driving car. It is using unsupervised learning method to train the car models to
detect people and objects while driving.

6. Email Spam and Malware Filtering:


• Whenever we receive a new email, it is filtered automatically as important, normal, and
spam. We always receive an important mail in our inbox with the important symbol and
spam emails in our spam box, and the technology behind this is Machine learning. Below
are some spam filters used by Gmail:
o Content Filter
o Header filter
o General blacklists filter
o Rules-based filters
o Permission filters
• Some machine learning algorithms such as Multi-Layer Perceptron, Decision tree,
and Naïve Bayes classifier are used for email spam filtering and malware detection.

7.Virtual Personal Assistant:


• We have various virtual personal assistants such as Google
assistant, Alexa, Cortana, Siri. As the name suggests, they help us in finding the
information using our voice instruction. These assistants can help us in various ways just
by our voice instructions such as Play music, call someone, Open an email, Scheduling
an appointment, etc.
• These virtual assistants use machine learning algorithms as an important part.
• These assistant record our voice instructions, send it over the server on a cloud, and
decode it using ML algorithms and act accordingly.

8. Online Fraud Detection:


• Machine learning is making our online transaction safe and secure by detecting fraud
transaction. Whenever we perform some online transaction, there may be various ways
that a fraudulent transaction can take place such as fake accounts, fake ids, and steal
money in the middle of a transaction. So to detect this, Feed Forward Neural
network helps us by checking whether it is a genuine transaction or a fraud transaction.
• For each genuine transaction, the output is converted into some hash values, and these
values become the input for the next round. For each genuine transaction, there is a
specific pattern which gets change for the fraud transaction hence, it detects it and makes
our online transactions more secure.

9. Stock Market trading:


Machine learning is widely used in stock market trading. In the stock market, there is always a
risk of up and downs in shares, so for this machine learning's long short term memory neural
network is used for the prediction of stock market trends.
10. Medical Diagnosis:
In medical science, machine learning is used for diseases diagnoses. With this, medical
technology is growing very fast and able to build 3D models that can predict the exact position
of lesions in the brain. It helps in finding brain tumors and other brain-related diseases easily.

11. Automatic Language Translation:


• Nowadays, if we visit a new place and we are not aware of the language then it is not a
problem at all, as for this also machine learning helps us by converting the text into our
known languages. Google's GNMT (Google Neural Machine Translation) provide this
feature, which is a Neural Machine Learning that translates the text into our familiar
language, and it called as automatic translation.
• The technology behind the automatic translation is a sequence-to-sequence learning
algorithm, which is used with image recognition and translates the text from one
language to another language.

12. Business Intelligence:


It is essential for businesses to be able to comprehend the commercial control of their
organization well, in terms of customer base, market, supply and resources, and competition.
Business Intelligence (BI) technologies offer not only historical and current information but also
predictive views of business operations
Types of Machine Learning
Machine learning is a subset of AI, which enables the machine to automatically learn from data,
improve performance from past experiences, and make predictions. Machine learning contains a
set of algorithms that work on a huge amount of data. Data is fed to these algorithms to train
them, and on the basis of training, they build the model & perform a specific task.
These ML algorithms help to solve different business problems like Regression, Classification,
Forecasting, Clustering, and Associations, etc.
Based on the methods and way of learning, machine learning is divided into mainly four types,
which are:
1. Supervised Machine Learning
2. Unsupervised Machine Learning
3. Semi-Supervised Machine Learning
4. Reinforcement Learning

In this topic, we will provide a detailed description of the types of Machine Learning along with
their respective algorithms:

1. Supervised Machine Learning


As its name suggests, Supervised machine learning is based on supervision. It means in the
supervised learning technique, we train the machines using the "labelled" dataset, and based on
the training, the machine predicts the output. Here, the labelled data specifies that some of the
inputs are already mapped to the output. More preciously, we can say; first, we train the machine
with the input and corresponding output, and then we ask the machine to predict the output using
the test dataset.

Let's understand supervised learning with an example. Suppose we have an input dataset of cats
and dog images. So, first, we will provide the training to the machine to understand the images,
such as the shape & size of the tail of cat and dog, Shape of eyes, colour, height (dogs are taller,
cats are smaller), etc. After completion of training, we input the picture of a cat and ask the
machine to identify the object and predict the output. Now, the machine is well trained, so it will
check all the features of the object, such as height, shape, colour, eyes, ears, tail, etc., and find
that it's a cat. So, it will put it in the Cat category. This is the process of how the machine
identifies the objects in Supervised Learning.
The main goal of the supervised learning technique is to map the input variable(x) with the
output variable(y). Some real-world applications of supervised learning are Risk Assessment,
Fraud Detection, Spam filtering, etc.

Categories of Supervised Machine Learning


Supervised machine learning can be classified into two types of problems, which are given
below:
o Classification
o Regression
a) Classification
Classification algorithms are used to solve the classification problems in which the output
variable is categorical, such as "Yes" or No, Male or Female, Red or Blue, etc. The classification
algorithms predict the categories present in the dataset. Some real-world examples of
classification algorithms are Spam Detection, Email filtering, etc.
Some popular classification algorithms are given below:
o Random Forest Algorithm
o Decision Tree Algorithm
o Logistic Regression Algorithm
o Support Vector Machine Algorithm

b) Regression
Regression algorithms are used to solve regression problems in which there is a linear
relationship between input and output variables. These are used to predict continuous output
variables, such as market trends, weather prediction, etc.
Some popular Regression algorithms are given below:
o Simple Linear Regression Algorithm
o Multivariate Regression Algorithm
o Decision Tree Algorithm
o Lasso Regression

Advantages and Disadvantages of Supervised Learning


Advantages:
o Since supervised learning work with the labelled dataset so we can have an exact idea
about the classes of objects.
o These algorithms are helpful in predicting the output on the basis of prior experience.
Disadvantages:
o These algorithms are not able to solve complex tasks.
o It may predict the wrong output if the test data is different from the training data.
o It requires lots of computational time to train the algorithm.
Applications of Supervised Learning
Some common applications of Supervised Learning are given below:
o Image Segmentation:
Supervised Learning algorithms are used in image segmentation. In this process, image
classification is performed on different image data with pre-defined labels.
o Medical Diagnosis:
Supervised algorithms are also used in the medical field for diagnosis purposes. It is done
by using medical images and past labelled data with labels for disease conditions. With
such a process, the machine can identify a disease for the new patients.
o Fraud Detection - Supervised Learning classification algorithms are used for identifying
fraud transactions, fraud customers, etc. It is done by using historic data to identify the
patterns that can lead to possible fraud.
o Spam detection - In spam detection & filtering, classification algorithms are used. These
algorithms classify an email as spam or not spam. The spam emails are sent to the spam
folder.
o Speech Recognition - Supervised learning algorithms are also used in speech
recognition. The algorithm is trained with voice data, and various identifications can be
done using the same, such as voice-activated passwords, voice commands, etc.

2. Unsupervised Machine Learning


Unsupervised learning is different from the Supervised learning technique; as its name suggests,
there is no need for supervision. It means, in unsupervised machine learning, the machine is
trained using the unlabeled dataset, and the machine predicts the output without any supervision.

In unsupervised learning, the models are trained with the data that is neither classified nor
labelled, and the model acts on that data without any supervision. The main aim of the
unsupervised learning algorithm is to group or categories the unsorted dataset according to the
similarities, patterns, and differences. Machines are instructed to find the hidden patterns from
the input dataset.

Let's take an example to understand it more preciously; suppose there is a basket of fruit images,
and we input it into the machine learning model. The images are totally unknown to the model,
and the task of the machine is to find the patterns and categories of the objects.

So, now the machine will discover its patterns and differences, such as colour difference, shape
difference, and predict the output when it is tested with the test dataset.
Categories of Unsupervised Machine Learning
Unsupervised Learning can be further classified into two types, which are given below:
o Clustering
o Association
1) Clustering
The clustering technique is used when we want to find the inherent groups from the data. It is a
way to group the objects into a cluster such that the objects with the most similarities remain in
one group and have fewer or no similarities with the objects of other groups. An example of the
clustering algorithm is grouping the customers by their purchasing behaviour.
Some of the popular clustering algorithms are given below:
o K-Means Clustering algorithm
o Mean-shift algorithm
o DBSCAN Algorithm
o Principal Component Analysis
o Independent Component Analysis

2) Association
Association rule learning is an unsupervised learning technique, which finds interesting relations
among variables within a large dataset. The main aim of this learning algorithm is to find the
dependency of one data item on another data item and map those variables accordingly so that it
can generate maximum profit. This algorithm is mainly applied in Market Basket analysis, Web
usage mining, continuous production, etc.
Some popular algorithms of Association rule learning are Apriori Algorithm, Eclat, FP-growth
algorithm.

Advantages and Disadvantages of Unsupervised Learning Algorithm


Advantages:
o These algorithms can be used for complicated tasks compared to the supervised ones
because these algorithms work on the unlabeled dataset.
o Unsupervised algorithms are preferable for various tasks as getting the unlabeled dataset
is easier as compared to the labelled dataset.
Disadvantages:
o The output of an unsupervised algorithm can be less accurate as the dataset is not
labelled, and algorithms are not trained with the exact output in prior.
o Working with Unsupervised learning is more difficult as it works with the unlabelled
dataset that does not map with the output.

Applications of Unsupervised Learning


o Network Analysis: Unsupervised learning is used for identifying plagiarism and
copyright in document network analysis of text data for scholarly articles.
o Recommendation Systems: Recommendation systems widely use unsupervised learning
techniques for building recommendation applications for different web applications and
e-commerce websites.
o Anomaly Detection: Anomaly detection is a popular application of unsupervised
learning, which can identify unusual data points within the dataset. It is used to discover
fraudulent transactions.
o Singular Value Decomposition: Singular Value Decomposition or SVD is used to
extract particular information from the database. For example, extracting information of
each user located at a particular location.

3. Semi-Supervised Learning
Semi-Supervised learning is a type of Machine Learning algorithm that lies between Supervised
and Unsupervised machine learning. It represents the intermediate ground between Supervised
(With Labelled training data) and Unsupervised learning (with no labelled training data)
algorithms and uses the combination of labelled and unlabeled datasets during the training
period.

Although Semi-supervised learning is the middle ground between supervised and unsupervised
learning and operates on the data that consists of a few labels, it mostly consists of unlabeled
data. As labels are costly, but for corporate purposes, they may have few labels. It is completely
different from supervised and unsupervised learning as they are based on the presence & absence
of labels.

To overcome the drawbacks of supervised learning and unsupervised learning algorithms, the
concept of Semi-supervised learning is introduced. The main aim of semi-supervised learning is
to effectively use all the available data, rather than only labelled data like in supervised learning.
Initially, similar data is clustered along with an unsupervised learning algorithm, and further, it
helps to label the unlabeled data into labelled data. It is because labelled data is a comparatively
more expensive acquisition than unlabeled data.

We can imagine these algorithms with an example. Supervised learning is where a student is
under the supervision of an instructor at home and college. Further, if that student is
self-analysing the same concept without any help from the instructor, it comes under
unsupervised learning. Under semi-supervised learning, the student has to revise himself after
analyzing the same concept under the guidance of an instructor at college.

Advantages and disadvantages of Semi-supervised Learning


Advantages:
o It is simple and easy to understand the algorithm.
o It is highly efficient.
o It is used to solve drawbacks of Supervised and Unsupervised Learning algorithms.
Disadvantages:
o Iterations results may not be stable.
o We cannot apply these algorithms to network-level data.
o Accuracy is low.

4. Reinforcement Learning

Reinforcement learning works on a feedback-based process, in which an AI agent (A software


component) automatically explore its surrounding by hitting & trail, taking action, learning from
experiences, and improving its performance. Agent gets rewarded for each good action and get
punished for each bad action; hence the goal of reinforcement learning agent is to maximize the
rewards.

In reinforcement learning, there is no labelled data like supervised learning, and agents learn
from their experiences only. The reinforcement learning process is similar to a human being; for
example, a child learns various things by experiences in his day-to-day life. An example of
reinforcement learning is to play a game, where the Game is the environment, moves of an agent
at each step define states, and the goal of the agent is to get a high score. Agent receives
feedback in terms of punishment and rewards.

Due to its way of working, reinforcement learning is employed in different fields such as Game
theory, Operation Research, Information theory, multi-agent systems.
A reinforcement learning problem can be formalized using Markov Decision Process (MDP). In
MDP, the agent constantly interacts with the environment and performs actions; at each action,
the environment responds and generates a new state.

Categories of Reinforcement Learning


Reinforcement learning is categorized mainly into two types of methods/algorithms:
o Positive Reinforcement Learning: Positive reinforcement learning specifies increasing
the tendency that the required behaviour would occur again by adding something. It
enhances the strength of the behaviour of the agent and positively impacts it.
o Negative Reinforcement Learning: Negative reinforcement learning works exactly
opposite to the positive RL. It increases the tendency that the specific behaviour would
occur again by avoiding the negative condition.
Real-world Use cases of Reinforcement Learning
o Video Games:
RL algorithms are much popular in gaming applications. It is used to gain super-human
performance. Some popular games that use RL algorithms are AlphaGO and AlphaGO
Zero.
o Resource Management:
The "Resource Management with Deep Reinforcement Learning" paper showed that how
to use RL in computer to automatically learn and schedule resources to wait for different
jobs in order to minimize average job slowdown.
o Robotics:
RL is widely being used in Robotics applications. Robots are used in the industrial and
manufacturing area, and these robots are made more powerful with reinforcement
learning. There are different industries that have their vision of building intelligent robots
using AI and Machine learning technology.
o Text Mining
Text-mining, one of the great applications of NLP, is now being implemented with the
help of Reinforcement Learning by Salesforce company.

Advantages and Disadvantages of Reinforcement Learning


Advantages
o It helps in solving complex real-world problems which are difficult to be solved by
general techniques.
o The learning model of RL is similar to the learning of human beings; hence most accurate
results can be found.
o Helps in achieving long term results.
Disadvantage
o RL algorithms are not preferred for simple problems.
o RL algorithms require huge data and computations.
o Too much reinforcement learning can lead to an overload of states which can weaken the
results.
The curse of dimensionality limits reinforcement learning for real physical systems.

Parameters Supervised machine learning Unsupervised machine learning


Algorithms are trained using labeled Algorithms are used against data that
Input Data
data. is not labeled
Computational
Simpler method Computationally complex
Complexity
Accuracy Highly accurate Less accurate
No. of classes No. of classes is known No. of classes is not known
Data Analysis Uses offline analysis Uses real-time analysis of data
Linear and Logistics regression,
K-Means clustering, Hierarchical
Random forest,
Algorithms used clustering,
Support Vector Machine, Neural
Apriori algorithm, etc.
Network, etc.
Output Desired output is given. Desired output is not given.
Training data Use training data to infer model. No training data is used.
It is not possible to learn larger and It is possible to learn larger and more
Complex model more complex models than with complex models with unsupervised
supervised learning. learning.
Model We can test our model. We can not test our model.
Supervised learning is also called Unsupervised learning is also called
Called as
classification. clustering.
Example: Optical character
Example Example: Find a face in an image.
recognition.

Python libraries suitable for Machine Learning


In the older days, people used to perform Machine Learning tasks by manually coding all the
algorithms and mathematical and statistical formulas. This made the processing time-consuming,
tedious, and inefficient. But in the modern days, it is become very much easy and more efficient
compared to the older days with various python libraries, frameworks, and modules. Today,
Python is one of the most popular programming languages for this task and it has replaced many
languages in the industry, one of the reasons is its vast collection of libraries.
Python libraries are collections of modules that contain useful codes and functions, eliminating
the need to write them from scratch. There are tens of thousands of Python libraries that help
machine learning developers, as well as professionals working in data science, data visualization,
and more.
Python is the preferred language for machine learning because its syntax and commands are
closely related to English, making it efficient and easy to learn. Compared with C++, R and Java,
Python remains one of the simplest languages, enabling accessibility, versatility, and portability.
It can operate on nearly any operating system or platform.
Python libraries that are used in Machine Learning are:

1. Numpy
2. Scipy
3. Scikit-learn
4. TensorFlow
5. Keras
6. PyTorch
7. Pandas
8. Matplotlib
1. Numpy

NumPy is a fundamental library for scientific computing in Python. It supports large,


multidimensional arrays and matrices and a collection of mathematical functions to operate
on these arrays efficiently. NumPy is extensively used in various machine learning
applications, including image processing, natural language processing, and data analysis.
For example, in image processing, NumPy arrays are used to represent images, and the
library’s functions enable operations such as cropping, resizing, and filtering.
2.SciPy

SciPy is a library for scientific computing in Python. It provides various functions and
algorithms for numerical integration, optimization, signal processing, and linear algebra. SciPy
builds on top of NumPy and provides additional functionality for scientific computing tasks.
SciPy is extensively used in machine learning for optimization, signal processing, and statistical
analysis tasks. It offers functions for numerical integration, interpolation, and solving differential
equations. SciPy also provides statistical distributions and hypothesis-testing functions, making it
a valuable tool for data analysis and modelling.

3.Scikit-learn

Scikit-learn is a comprehensive machine-learning library that provides various algorithms and


tools for various tasks, including classification, regression, clustering, and dimensionality
reduction. It offers a consistent API and supports integration with other libraries like NumPy and
Pandas.
Scikit-learn is extensively used in machine learning projects for classification, regression, and
model evaluation tasks. It provides a rich set of algorithms and functions for feature selection,
model training, and performance evaluation. Scikit-learn also offers utilities for data
preprocessing, cross-validation, and hyperparameter tuning.
4. TensorFlow

Developed by Google Brain, TensorFlow is an open-source library for numerical computation


and machine learning. As the name suggests, TensorFlow is a framework that involves defining
and running computations involving tensors. It can train and run deep neural networks that can
be used to develop several AI applications. TensorFlow is widely used in the field of deep
learning research and application.

5. Keras

Keras is a high-level deep-learning library that provides a user-friendly interface for building and
training neural networks. It offers a wide range of pre-built layers, activation, and loss functions,
making it easy to create complex neural network architectures. Keras supports CPU and GPU
acceleration and can seamlessly integrate with other deep learning libraries like TensorFlow.
Keras is extensively used in deep learning projects for tasks such as image recognition, text
classification, and generative modeling. It provides a simple and intuitive API for defining and
training neural networks, allowing rapid prototyping and experimentation. Keras also supports
transfer learning and model deployment on various platforms.

6.PyTorch

PyTorch is a popular deep-learning library that provides a flexible and efficient framework for
building and training neural networks. It offers dynamic computational graphs, automatic
differentiation, and GPU acceleration, making it a preferred choice for deep learning research
and development.
PyTorch is extensively used in deep learning projects for tasks such as image classification,
object detection, and natural language processing. It provides many pre-built neural network
architectures, modules, optimization algorithms, and loss functions. PyTorch also supports
transfer learning and model deployment on various platforms.
7.Pandas

Pandas is a powerful library for data manipulation and analysis. It provides data structures like
DataFrames and Series for efficient, structured data handling. Pandas offers a wide range of data
cleaning, transformation, and exploration functions, making it an essential tool for machine
learning tasks.
Pandas are extensively used in data preprocessing, feature engineering, and exploratory data
analysis. It enables tasks such as data cleaning, missing value imputation, and data aggregation.
Pandas also integrates well with other libraries like NumPy and Matplotlib, facilitating seamless
data analysis and visualization.

8.Matplotlib

Matplotlib is a popular library for data visualization in Python. It provides a wide range of
functions and classes for creating various types of plots, including line plots, scatter plots, bar
plots, and histograms. Matplotlib is highly customizable and allows for detailed control over plot
aesthetics.
Matplotlib is extensively used in machine learning for visualizing data distributions, model
performance, and feature importance. It enables the creation of informative and visually
appealing plots that aid in data exploration and model interpretation. Matplotlib integrates well
with other libraries like NumPy and Pandas, making it a versatile tool for data visualization.

You might also like