0% found this document useful (0 votes)
4 views47 pages

1 - ML - Introduction

The document provides an overview of Machine Learning (ML), its types, and applications, emphasizing the distinction between AI, ML, and Deep Learning. It explains the need for algorithms in scenarios like spam detection and customer prediction, highlighting the role of data in training models. Various ML types, including supervised, unsupervised, semi-supervised, and reinforcement learning, are discussed along with their respective tasks and applications.

Uploaded by

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

1 - ML - Introduction

The document provides an overview of Machine Learning (ML), its types, and applications, emphasizing the distinction between AI, ML, and Deep Learning. It explains the need for algorithms in scenarios like spam detection and customer prediction, highlighting the role of data in training models. Various ML types, including supervised, unsupervised, semi-supervised, and reinforcement learning, are discussed along with their respective tasks and applications.

Uploaded by

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

Machine Learning

By:
Dr SOMARAJU SUVVARI
Assistant Professor,
Dept. of CSE, NIT Patna
Introduction to Machine Learning
(Source: Machine Learning Foundations - Supervised, Unsupervised, and Advanced Learning by
Taeho Jo, springer publication)
Introduction
Machine Learning
 To Solve a problem on a computer what we need?

 Algorithm

 Input → ALGORITHM → Output

 Example – Sorting (For the same task we have various algorithms – look for efficient one)
Introduction
Machine Learning
 Consider the following problem

 Identify the spam emails from legitimate emails

 Do we have an algorithm?

 No

 We know input – An email document (simply it is a file of characters)

 We also know output – Yes / No (Spam or not)

 We have thousands of example messages, some of which we know to be spam


Introduction to Machine Learning
Machine Learning
 Why no algorithm for spam email detection?

 We do not know how to transform the input to the output.

 What can be considered spam changes in time and from individual to individual.

 What we lack in knowledge?

 What we want?

 We want is to learn what constitutes spam from them.

 We would like the computer (machine) to extract automatically the algorithm for this task.

 We don’t want to learn to sort numbers – since we have algorithms.


Introduction to Machine Learning
Machine Learning
 There are many applications for which we do not have an algorithm but do have example data.

 We currently have the ability to store and process large amounts of data, as well as to access it from physically
distinct locations over a computer network.
Introduction to Machine Learning
Machine Learning
 Consider another scenario

 Super market chain that has hundreds of stores

 POS terminals records the details of each transactions (gigabytes of data every day)

 Supermarket chain wants to predict who are the likely customers for a product?

 Is algorithm exist?

 No

 Why?

 It changes in time and geographic locations?


Introduction to Machine Learning
Machine Learning
 What is to be done?

 We do believe that there is a process that explain the data we observe.

 May be we do not know the details of the process underlying the generation of the data.

 For example, consumer behavior – we know that it is not completely random.

 People do not go to supermarkets and buy things randomly.

 Buy beer, likely to by chips.

 Buy ice-cream in summer.

 We may not be able to identify the process completely, but we believe we can construct a good and useful approximation (
identifying complete process is may not be possible)
Introduction to Machine Learning
Machine Learning
 What is to be done?

 Assumption – In the future, at least in near future will not be much different from the
past wen the sample data was collected, the future prediction can also be right.
Artificial Intelligence vs Machine Learning vs Deep Learning

Source: Google (medium.com)


Artificial Intelligence vs Machine Learning vs Deep Learning
Artificial Intelligence (AI)
 AI is the science that makes the machines to mimic human intelligence such as decision making, video/audio/text
processing, etc.

 AI is the broad field that contains other fields like Machine Learning, Robotics, Computer vision, etc.

 The term AI was coined in 1956, but it became popular these days due the fact that the improvement in processing
power, availability of large data, innovation of new and more powerful algorithms, etc.
Artificial Intelligence vs Machine Learning vs Deep Learning
Artificial Intelligence (AI)
 In one category of AI the Machines behave according to a well-defined rules.

 Oven is an example for AI.

 This category of AI does not have the ability to make decisions and make any changes by itself.

 In other category of AI algorithms, the machines try to learn by themselves using the input data and improve the
accuracy in giving outputs.

 Speech recognition, visual perception, and language translation are the examples in this category.
Artificial Intelligence vs Machine Learning vs Deep Learning
Machine Learning (ML)
 It is a sub field of AI, it makes the machines to improve at a given task with experience (labelled data).

 For example, we want to identify an email is legitimate email or spam email. In order to do this

 First some set of spam and non spam email data will be given to the machine.

 Let machine come up with the knowledge why some emails are labelled as spam and why not remaining emails are not labelled
as spam.

 Now if we given a new email our machine will recognize whether it is a spam email or not.
Artificial Intelligence vs Machine Learning vs Deep Learning
Machine Learning (ML) - Types
Type Description

Supervised ML • Has labelled data and it acts as a supervisor


• Learn according to the labelled data
• Predicts the output
• Used to solve classification and regression type of problems

Un-supervised ML • Does not have any labelled data


• Tries to find the patterns and/or structures inside the data and
make clusters of similar data types.

Reinforced ML • Tries to find an optimized solution


• Reward and punishment based training
• Learns how to act in certain solutions.
Artificial Intelligence vs Machine Learning vs Deep Learning
Machine Learning (ML)

 All ML techniques are classified as AI ones.

 However, not all AI could count as ML, since some basic rule based engines could be

classified as AI but they do not belong to ML since they do not learn from

experience.

 Not all ML techniques are DL, as SVM, Decision Trees, etc. does not belong to the

DL.
Machine Learning vs Deep Learning
“Traditional” machine learning:

handcrafte learned
INPUT cat
d features classifier

Deep learning:

learn learned learned


learned
INPUT low-level mid-level high-level cat
classifier
features features features
Artificial Intelligence vs Machine Learning vs Deep Learning
Deep Learning (DL)
 DL is a specialized field of ML that relies on training of Deep Artificial Neural Networks using large size of data
sets.

 How it is different from ML?


 In ML first selects the model to train by manually perform feature extraction.

 In DL first select the architecture of the network and features are extracted automatically (in most of the cases the).

Source: https://www.xenonstack.com/blog/log-analytics-deep-machine-learning/#xenonstack6
Machine Learning
Machine Learning (ML)

 Defined as the computation paradigm where the capacity for solving the given
problem is built by previous examples.

 Case based learning.

 Training examples

 The process of solving the real problems after learning the training examples is
called generalization.
Machine Learning
Machine Learning (ML) Tasks
 Classification - process of classifying items into one or some among the
predefined categories

 Regression Process of estimating a continuous value or values based on the


current input factors

 Clustering - Process of segmenting an entire group into subgroups based on


similarities among items.

 Reinforcement - Learning algorithms are needed for implementing an


autonomous agent or agents.
Machine Learning
Machine Learning (ML) Types

Supervised ML

 Assumed that all of previous examples, called training examples, are labelled.
 Classification and Regression

 Unsupervised ML

 Assumed that all of previous examples, called training examples, are un-labelled.4

 Examples are learned depending on their similarities

 Clustering
Machine Learning
Application areas
 Classification
 Binary classification where each item is classified into one of two categories is
mentioned as the simplest classification type.
 Binary classification

 Positive

 Negative

 The binary classification is expanded into a multiple classification (soft


classification) by predefining more categories.
Machine Learning
Application areas
 Classification
 Multiple classification

 Class-1

 Class-2

 Class-3

 …….

 ……..

 Class-n
Machine Learning
Application areas
 Classification

 Multiple classification modified into binary classification


 Class-1

 Binary classification

 Positive

 Negative

 Class-2

 Binary classification

 Positive

 Negative

 ……..

 Class-n

 Binary classification

 Positive

 Negative
Machine Learning
Application areas
 Regression

 A process of estimating an output value based on multiple factors

 In classification the output value is discrete

 In regression the output value is continuous

 There are two types of regression:

 Univariate regression - where only one output value is estimated


Machine Learning
Application areas
 Regression

 Multivariate regression - where more than one output value is done (prediction of
multiple stock prices and currencies)
Machine Learning
Application areas
 Regression

 It is possible to decompose the multivariate regression into independent


univariate regressions.

 The auto regression, the moving average, and the ARMA (Auto Regression and
Moving Average) are traditional approaches to the time series prediction.

 The time series prediction which is the special type of regression


Machine Learning
Application areas
 Clustering

 Process of segmenting a group of items into subgroups each of which contains similar
ones

 It is required to define a similarity metric between items for executing data clustering.

 The clustering is used for automating a collection of labeled examples, so the clustering
may be integrated with the classification for organizing data items.

 Binary Clustering
Machine Learning
Application areas
 Clustering

 Multiple Clustering
Machine Learning
Application areas
 Clustering

 Multiple Clustering through binary clustering


Machine Learning
Application areas
 Hybrid Tasks

 Mixtures of the tasks which were mentioned in the previous sections

 Classification + Regression
Machine Learning
Application areas
 Hybrid Tasks
 Clustering + Classification
Machine Learning
Application areas
 Hybrid Tasks
 Clustering + Classification
Machine Learning
Application areas
 Hybrid Tasks
 Constraint Clustering
Machine Learning Types
 Supervised ML
 Two kinds of output value in the supervised learning;
 The target output which is initially assigned to each training example

 The computed output which is computed by the learning algorithm.

 The supervised learning is the learning paradigm where the parameters are
optimized for minimizing the difference between the target output and the
computed output.

 The KNN (K Nearest Neighbor), the Naive Bayes, and the decision tree belong to
the supervised learning, and the classification and the regression are application
areas of this type of learning algorithms.
Machine Learning Types
 Supervised ML

 Let us mention the training examples which the supervised learning algorithms learn.

 Each training example is associated with its own category or a continuous value.

 The output which is initially labeled to each training example is called target output,
and one which is computed by the learning algorithm is called computed output.

 The goal of the Supervised ML

 Minimize the misclassification

 Minimize the error between the target output and the computed output.
Machine Learning Types
 Supervised ML
 Their parameters are initialized at random and the labeled training examples are
prepared.

 Their output values are computed and the parameters are updated to minimize the
error between the target outputs and the computed outputs.

 The process is iterated to minimize the error or reach the convergence of the
parameters.

 The learning process in the supervised learning is to optimize the parameters for
minimizing the error.
Machine Learning Types
 Supervised ML
Machine Learning Types
 Un-Supervised ML
 The training examples which are given for the learning paradigm are unlabeled
and the clustering prototypes are initialized at random.

 The number of clusters is decided and the cluster prototypes are


initialized.

 Each data items in the group is arranged into the cluster whose
prototype is most similar, and they are updated into more similar as
their won arranged items.

 The arrangement and the update of the cluster prototypes are iterated
until their convergences.
Machine Learning Types
 Un-Supervised ML
 The supervised learning is for minimizing the error or the misclassifications
between the computed outputs and the target ones, whereas the unsupervised
learning is for maximizing the similarities between the cluster prototypes and
the data items.
Machine Learning Types
 Semi-Supervised ML
 Use both labelled data and un-labelled data

 The training example which are labeled originally are prepared and unlabeled
ones are added.

 The parameters of the machine learning algorithms are updated by minimizing


the error between the computed labels and the target labels to the labeled
examples and by minimizing distance between the cluster prototypes and the
input vectors to the unlabeled examples.
 The semi-supervised learning is implemented
Machine Learning Types
 Semi-Supervised ML

 The semi-supervised learning is implemented by combining a supervised learning algorithm and an

unsupervised one with each other;

 The unlabeled training examples are clustered by the unsupervised learning algorithm, based on the labeled
ones, and both originally labeled examples and subsequently labeled ones are used for training the supervised
learning algorithm.

 The semi-supervised learning is viewed as a compound or a combination of the supervised learning and the
unsupervised one.
Machine Learning Types
 Semi-Supervised ML
 The semi-supervised learning is implemented by combining the unsupervised
learning algorithm and the supervised one with each other.

 The labeled examples and the unlabeled examples are initially given as the
training examples, and the unlabeled examples are clustered by the unsupervised
learning algorithm, referring the labeled ones.

 The supervised learning algorithm is trained with both kinds of examples.

 A typical scheme of implementing the semi-supervised learning by the


combination is to combine the Naive Bayes and the EM algorithm by Nigam et
al.
Machine Learning Types
 Semi-Supervised ML
Machine Learning Types
 Reinforcement ML
 It is a learning type where the parameters are updated for maximizing the reward
and minimizing the penalty.

 The input is received from the external environment and the output is generated
as the action.

 The reward or the penalty is given from the environment as the critics, and the
parameters are updated for getting the reward and avoiding the penalty, as much
as possible.

 This learning type is viewed as the interaction between the environment and the
learning agent.
Machine Learning Types
 Reinforcement ML
 The learning agent accepts the percept from the external environment as the input
and generates the action at random or from its table as the output.

 The reward or the penalty is given to the action.

 If the reward is given, the current output is set as the desired one, and otherwise,
the output is updated.

 Applications - Autonomous moving agent, implementing a game player, etc.


Machine Learning Types
 Reinforcement ML
THANK YOU

You might also like