1 - ML - Introduction
1 - ML - Introduction
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
Example – Sorting (For the same task we have various algorithms – look for efficient one)
Introduction
Machine Learning
Consider the following problem
Do we have an algorithm?
No
What can be considered spam changes in time and from individual to individual.
What we want?
We would like the computer (machine) to extract automatically the algorithm for this task.
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
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?
May be we do not know the details of the process underlying the generation of the data.
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
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.
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
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:
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.
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
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
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
Class-1
Class-2
Class-3
…….
……..
Class-n
Machine Learning
Application areas
Classification
Binary classification
Positive
Negative
Class-2
Binary classification
Positive
Negative
……..
Class-n
Binary classification
Positive
Negative
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
The auto regression, the moving average, and the ARMA (Auto Regression and
Moving Average) are traditional approaches to the time series prediction.
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
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 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.
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.
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 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 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.
If the reward is given, the current output is set as the desired one, and otherwise,
the output is updated.