Chapter 6: Machine
Learning
Chapter Index
S. No. Reference Particulars Slide
No. From - To
1 Learning Objectives 3
2 Topic 1 Meaning of Machine Lear 4
ning
3 Topic 2 Types of Machine Learnin 5-8
g
4 Topic 3 Supervised Learning Algo 9- 13
rithms
5 Topic 4 Unsupervised Learning Al 14 - 19
gorithms
6 Topic 5 Applications of Machine L 20
earning in Business
7 Let’s Sum Up 21
Learning Objectives
Describe the meaning of machine learning
Discuss various types of machine learning
Explain different supervised learning algorithms
Explain unsupervised learning algorithms
Discuss various applications of machine learning in
business
1. Meaning of Machine Learning
Some popular definitions of machine learning are:
During 1950s, a paper named ‘Computing Machinery and
Intelligence’ was published by Alan Turing, where he asked, “Can
machines think?”. The paper described a game where it was tested
if a machine can outperform human thinking and make it difficult to
identify whether it’s a machine or a human being.
The term ‘Machine Learning’ was coined by Arthur Samuel in 1959.
He defined Machine Learning as ‘a field of study that gives
computers the ability to learn without being explicitly programmed’.
Tom M. Mitchell’s defined Machine Learning as “A computer
program is said to learn from experience E with respect to some
class of tasks T and performance measure P, if its performance at
tasks in T, as measured by P, improves with the experience E.”
2. Types of Machine Learning
There are a number of different algorithms which one can
employ in machine learning. The required output is what
decides which algorithm to use. Machine Learning algorithms
fall into three types:
1. Supervised Learning
2. Un-Supervised Learning
3. Reinforcement Learning
2. Types of Machine Learning
Supervised Learning
Supervised learning refers to the fact where the system is
given a data in which whatever is needed is given. In other
words, the data set is properly labelled for supervised learning.
The main categories of this kind of learning are as follows:
Classification: When the data is used to predict a category to
which the data point may belong to. For example, while stating
an image, whether it is of an animal or a human. There can be
two or more classifying categories.
Regression: When the relationship between two variables
needs to be defined and how the change in one variable
affects the other, it becomes a regression model.
2. Types of Machine Learning
Unsupervised Learning
In unsupervised learning, where the system trains itself to
accomplish the task without any human intervention, i.e., the
system running an unsupervised learning algorithm tries to
find hidden information within the data set.
The main categories of this kind of learning are as follows:
Clustering: Grouping of variables into clusters according to
some defined criteria. Further analysis is then performed in
these clusters.
Dimensionality Reduction: If the input data has high
dimensionality, it gets necessary to remove unwanted or
redundant data.
2. Types of Machine Learning
Reinforcement Learning
Reinforcement learning is a type of machine learning
algorithm which enables machines maximize their
performance by identifying the ideal solution based on some
conditions.
This is a reward-based system where the machine discovers
the best action based on high-yielding rewards.
One classical example of reinforcement learning is ‘Tower of
Hanoi’, where we have 3 towers and some disks which are
circular sized and kept on one another from low to high on the
left most tower. The objective is to transfer all the disks from
left most tower to right most tower using least number of
moves, provided no bigger disk can be put on a smaller disk.
[Link] Learning Algorithms
A supervised learning algorithm analyzes a training data and
generates a function in inference, which can be further utilized to
map new training examples. In an ideal scenario, an algorithm
correctly determines the class labels that are unseen. This needs
a learning algorithm which can generalize the training data for
forecasting situations that are unseen in a reasonable manner.
The different types of supervised learning algorithms are as
follows:
Decision Trees
Linear Regression
Logistic Regression
Naive Bayes
K-nearest Neighbors (KNN)
[Link] Learning Algorithms
Decision Trees
It is a supervised learning technique. This technique uses a
graphical representation to visualize all the possible outcomes
based on the decisions.
This algorithm uses Tree representation which comprises a root
and children nodes along with leaf nodes. The root classifies the
main decision or condition, followed by alternate solutions which
are its branches (child nodes).
This structure helps identify all the alternatives and accordingly
the decision-making process becomes easier and effective.
Decision trees can be used when the analyst wants to make
sure all paths related to a condition are well-checked and
analyzed based on their reward depending on the problem.
[Link] Learning Algorithms
Linear Regression
• Machine learning primarily involves two stages – one where we
give an input set to the system and other where the system
identifies the output set based on the provided input and
condition. In Linear Regression, the relationship between the
input variable (x) and output variable (y) is expressed as an
equation of the form y = a + bx. Here, a and b are the slope
and intercept, respectively. The following figure shows the
plotted x and y values for a dataset:
[Link] Learning Algorithms
Naive Bayes
This algorithm is called ‘naive’ because it assumes that all the
variables are independent of each other, which is a naive
assumption to make in real-world examples.
To calculate the probability of an outcome given the value of some
variable, that is, to calculate the probability of a hypothesis (h)
being true, given our prior knowledge(d), we use Bayes’ Theorem as
follows:
P(h|d) = (P(d|h) P(h))/P(d)
where,
P(h|d) = Posterior probability
P(d|h) = Likelihood
P(h) = Class prior probability
[Link] Learning Algorithms
K-nearest Neighbors (KNN)
KNN is the short term for K-nearest Neighbors. This approach
uses the complete input data set.
The KNN algorithm takes the entire data set as a training set,
i.e., it considers all the cases and creates new cases based on
the measures of distance.
The value of k is user-specified. For example, in pattern
recognition, if we need to find a new case, i.e., the output, KNN
finds out the nearest instance based on the neighbor distances.
[Link] Learning Algorithms
Unsupervised learning involves unlabeled data sets where
we need to program such an algorithm which can
automatically group the data into sets which are of the same
kind or having a certain degree of coherence in between
them.
The different types of unsupervised learning algorithms are
as follows:
K-means
Principal Component Analysis (PCA)
[Link] Learning Algorithms
K-Means
• K-means algorithms come into play for such purposes where
we need cluster creation based on data points which are
having some sort of relevance in between them.
• K-means is an iterative (repetitive) approach which does two
things – cluster assignment step and moving cluster step. In
order to do so, we follow these steps:
1. We randomly find points which we mark as cluster
centroids. If you want 2 clusters, then you need 2 cluster
centroids.
2. Now every data set is gone through and assigned a
centroid based on the distance.
[Link] Learning Algorithms
K-Means
3. The next step is the moving cluster step where the data
points categorized for cluster centroid 1 and 2 are moved based
on the averages of the entire cluster.
4. Now repeat steps 2 and 3, which mark the iterative process.
Keep repeating steps until the points converge and you can
distinctively identify the clusters; for this case, until you get 2
clusters.
[Link] Learning Algorithms
Principal Component Analysis (PCA)
Dimensionality reduction problem can be solved by using
Principal Component Analysis (PCA).
For instance, we have a data set having 2 dimensions x and
y and we need to reduce the dimensions from 2 to 1. The
objective of PCA is to find a lower dimension surface
(direction) onto which the data is to be projected (minimize
dimension) so that the projection error gets minimized.
[Link] Learning Algorithms
Association Rule Mining
Association mining also known as Market Basket analysis is used
to make product recommendations based on the products which
are bought together at a relatively higher frequency.
Association Mining is the basis of the modern recommender
systems, giants like amazon, Netflix use association rules and
analysis to recommend user about their products depending on
the products bought by the user frequently together.
Association mining is done on the transaction level data which
are taken from retail market say an online e-commerce store, for
this purpose we use Apriori algorithm to find patterns.
[Link] Learning Algorithms
Apriori Algorithm
Using apriori principles, we can reduce the number of
itemsets needed to be examined.
The aproiri principle explains that if an itemset is not
frequent, then all of its subsets also must not be frequent.
Putting it in on transaction set example case, if cheese spread
was found to be infrequent, then we can expect {bread,
cheese spread} to be infrequent. This give us liberty and valid
reasons to exclude {bread, cheese spread} or any itemset
containing cheese spread from the list of frequent itemsets,
hence popular items, from analysis. Using these principles,
the dataset can be made consolidated and relevant.
[Link] of Machine Learning in
Business
Most of the prominent business organizations depend heavily
upon machine learning algorithms for understanding their
clients and opportunities to generate revenue.
Some common machine-learning applications in business are
as follows:
1. Customer Experience Evaluation
2. Demand Pricing
3. Customer Segmentation
4. Fraud Detection
5. Logistics
6. Software
7. Spam Detection
8. Voice Recognition
9. Online Trading
10. Healthcare Services
Let’s Sum Up
A process where the computing systems start learning on their own
based on the data and processing results without any human
intervention is known as machine learning.
Machine learning can help us identify the latest trends and patterns
which are being used in the logistics discipline.
Supervised learning refers to the fact where the system is given a
data in which whatever is needed is given.
To calculate the probability that an event will occur, given that
another event has already occurred, we use Bayes’ Theorem..
Using machine learning algorithms, we can identify insights related
to financial data which may be important and can help reduce
frauds.
THANK YOU