Machine learning and its applications was a gentle introduction to machine learning presented by Dr. Ganesh Neelakanta Iyer. The presentation covered an introduction to machine learning, different types of machine learning problems including classification, regression, and clustering. It also provided examples of applications of machine learning at companies like Facebook, Google, and McDonald's. The presentation concluded with discussing the general machine learning framework and steps involved in working with machine learning problems.
1. Machine Learning and Its Applications
ganesh.vigneswara@gmail.com, ni_ganesh@cb.amrita.edu
Dr Ganesh Neelakanta Iyer
Amrita Vishwa Vidyapeetham
Associate Professor, Dept of Computer Science and Engg
Amrita School of Engineering, Coimbatore
ViTECoN 2019
A Gentle Introduction
2. About Me • Associate Professor, Amrita Vishwa Vidyapeetham
• Masters & PhD from National University of Singapore (NUS)
• Several years in Industry/Academia
• Architect, Manager, Technology Evangelist, Visiting Faculty
• Talks/workshops in USA, Europe, Australia, Asia
• Cloud/Edge Computing, IoT, Software Engineering, Game
Theory, Machine Learning
• Kathakali Artist, Composer, Speaker, Traveler, Photographer
GANESHNIYER http://ganeshniyer.com
3. Agenda
• Introduction
– Challenges of today’s world
– Artificial Intelligence
– AI vs ML
• Machine Learning
– Introduction
– Types of ML
– Applications
– ML Algorithms
Deep Learning
Introduction
Applications
ML and DL with Cloud
Services
Platforms
Infrastructure
ML & DL resources
Courses
Data Sets
Projects
4. DISCLAIMER
• I am NOT an expert in Machine Learning. I intend to share
some knowledge I have to help you kick-start your interest
• I have been informed that audience are new to this area. So the
session is a GENTLE introduction to ML
• For all guys who are forced to be here today, please enjoy
Dilbert cartoons and pictures of countries I have been
• No MATHEMATICAL Formula in this 200+ slide deck. Deal?
5. The Challenges of today’s world
Slides credit:
Fred Streefland
Cyber Security Strategist EMEA
Paloalto Networks
15. Artificial Intelligence
• “The study of the modelling of human mental functions by
computer programs.” —Collins Dictionary
Dr Ganesh Neelakanta Iyer 15https://medium.com/life-of-a-technologist/what-would-the-managers-manage-in-
the-age-of-ai-6a00c26df257
16. Artificial Intelligence
• AI is composed of 2 words Artificial and Intelligence
• Anything which is not natural and created by humans is artificial
• Intelligence means ability to understand, reason, plan etc.
• So any code, tech or algorithm that enable machine to mimic,
develop or demonstrate the human cognition or behavior is AI
Dr Ganesh Neelakanta Iyer 16
17. Possible applications of AI
Dr Ganesh Neelakanta Iyer 17https://pbs.twimg.com/media/DUn4kQzXkAAaqGS.jpg
18.
19.
20. McDonald’s + Dynamic Yield
• McDonald’s thinks AI can help it sell more fast food to customers
• The company has announced that it is acquiring Dynamic Yield, an Israeli company
that uses AI to customize experiences
• McDonald's would use AI to tweak the menu options on the displays in the outlets,
based on factors such as the time of day, the weather outside and how busy the
restaurant is at the time
• If it is warm outside, the menu could offer more options for cold drinks such as
shakes, and perhaps more warm tea options if it is cold outside
• The system will also make recommendations in real-time for additional items that a
customer might want to order, based on what they had already ordered
https://www.news18.com/news/tech/a-burger-french-fries-and-some-artificial-intelligence-with-your-next-mcdonalds-order-2078213.html
28. Machine Learning
• Machine learning is the field of study that gives computers
the ability to learn without being explicitly programmed.
• In simple term, Machine Learning means making
prediction based on data
Dr Ganesh Neelakanta Iyer 28
29. Machine Learning
Dr Ganesh Neelakanta Iyer 29https://towardsdatascience.com/machine-learning-65dbd95f1603
30. A quick history.
From intuition to machine learning
Early
1900s
1970s
1990s
Now
Intuition Statistical
programming languages
Automated
machine learning
Manual analysis Visual statistical software
Using experience and
judgement to predict
outcomes
Writing code to construct
statistical models
The software knows how to analyze
your data and does it for you
Manual
calculations to
predict outcomes
Drag and drop workflows with menu
driven commands to set up and
statistical analysisSlide credit: Edit
33. Why machine learning is hard?
Learning to identify an ‘apple’?
Apple Apple corporation Peach
Colour Red White Red
Type Fruit Logo Fruit
Shape Oval Cut oval Round
Slide credit: Edit
34. So much for a cat.
Principle of machine learning
Slide credit: Edit
47. Machine Learning Definition - Recap
• “Machine learning is the science of getting computers to act
without being explicitly programmed.” —Stanford University
• It’s a subset of AI which uses statistical methods to enable
machines to improve with experience
• It enables a computer to act and take data driven decisions to
carry out a certain task
• These programs or algorithms are designed in such a way
that they can learn and improve over time when exposed to
new data
https://towardsdatascience.com/cousins-of-artificial-intelligence-dda4edc27b55
49. Example
• Suppose we want to create a
system that tells us the
expected weight of person
based on its height
• Firstly, we will collect the data
• Each point on graph
represents a data point
Dr Ganesh Neelakanta Iyer 49
https://towardsdatascience.com/cousins-of-artificial-intelligence-dda4edc27b55
50. Example
• To start with, we will draw a
simple line to predict weight
based on height
• A simple line could be W=H-100
• Where
– W=Weight in kgs
– H=Height in cms
Dr Ganesh Neelakanta Iyer 50
https://towardsdatascience.com/cousins-of-artificial-intelligence-dda4edc27b55
51. Example
• This line can help us to make
prediction
• Our main goal is to reduce
distance between estimated
value and actual value i.e the
error
• In order to achieve this, will draw
a straight line which fits through
all the points
Dr Ganesh Neelakanta Iyer 51
https://towardsdatascience.com/cousins-of-artificial-intelligence-dda4edc27b55
52. Example
• Our main goal is to minimize the
error and make them as small as
possible
• Decreasing the error between
actual and estimated value
improves the performance of model
and also the more data points we
collect the better our model will
become
• So when we feed new data (height
of a person), it could easily tell us
the weight of the person
Dr Ganesh Neelakanta Iyer 52
https://towardsdatascience.com/cousins-of-artificial-intelligence-dda4edc27b55
54. Types of ML problems
Type of ML Problem Description Example
Classification Pick one of N labels Cat, dog, horse, or bear
Regression Predict numerical values Click-through rate
Clustering Group similar examples Most relevant documents
(unsupervised)
Association rule learning Infer likely association
patterns in data
If you buy hamburger buns,
you're likely to buy
hamburgers (unsupervised)
Structured output Create complex output Natural language parse trees,
image recognition bounding
boxes
Ranking Identify position on a scale or
status
Search result ranking
Dr Ganesh Neelakanta Iyer 54
55. The ML Mindset
• "Machine Learning changes the way you think about a
problem. The focus shifts from a mathematical science to
a natural science, running experiments and using
statistics, not logic, to analyse its results."
– Peter Norvig - Google Research Director
Dr Ganesh Neelakanta Iyer 55
58. Classification
• A classification problem is when the output variable is a category,
such as “red” or “blue” or “disease” and “no disease”
• A classification model attempts to draw some conclusion from
observed values
• Given one or more inputs a classification model will try to predict the
value of one or more outcomes
Dr Ganesh Neelakanta Iyer 58
59. Classification
• A classification problem is when the output variable is a category,
such as “red” or “blue” or “disease” and “no disease”
• A classification model attempts to draw some conclusion from
observed values
• Given one or more inputs a classification model will try to predict the
value of one or more outcomes
https://developers.google.com/machine-
learning/guides/text-classification/
60. Regression
• A regression problem is when the output variable is a real or
continuous value, such as “salary” or “weight”
• Many different models can be used, the simplest is the linear
regression
• It tries to fit data with the best hyper-plane which goes through the
points
61. Classification vs Regression
PARAMENTER CLASSIFICATION REGRESSION
Basic
Mapping Fuction is used for
mapping of values to predefined
classes.
Mapping Fuction is used for
mapping of values to
continuous output.
Involves prediction of Discrete values Continuous values
Nature of the predicted data Unordered Ordered
Method of calculation by measuring accuracy
by measurement of root mean
square error
Example Algorithms
Decision tree, logistic
regression, etc.
Regression tree (Random
forest), Linear regression, etc.
Dr Ganesh Neelakanta Iyer 61
62. Examples
• Regression vs Classification
– Predicting age of a person
– Predicting nationality of a person
– Predicting whether stock price of a company will increase tomorrow
– Predicting the gender of a person by his/her handwriting style
– Predicting house price based on area
– Predicting whether monsoon will be normal next year
– Predict the number of copies a music album will be sold next month
Dr Ganesh Neelakanta Iyer 62
63. Examples
• Regression vs Classification
– Predicting age of a person
– Predicting nationality of a person
– Predicting whether stock price of a company will increase tomorrow
– Predicting the gender of a person by his/her handwriting style
– Predicting house price based on area
– Predicting whether monsoon will be normal next year
– Predict the number of copies a music album will be sold next month
Dr Ganesh Neelakanta Iyer 63
64. Clustering
• It is basically a type of unsupervised
learning method
• Clustering is the task of dividing the
population or data points into a
number of groups such that data
points in the same groups are more
similar to other data points in the
same group and dissimilar to the
data points in other groups
• It is basically a collection of objects
on the basis of similarity and
dissimilarity between them.
Dr Ganesh Neelakanta Iyer 64
https://analyticstraining.com/cluster-analysis-for-business/
65. Clustering - Applications
Marketing It can be used to characterize & discover customer segments for marketing
purposes
Biology It can be used for classification among different species of plants and
animals.
Libraries It is used in clustering different books on the basis of topics and information
Insurance It is used to acknowledge the customers, their policies and identifying the
frauds.
City Planning It is used to make groups of houses and to study their values based on
their geographical locations and other factors present.
Earthquake
studies
By learning the earthquake affected areas we can determine the
dangerous zones.
Dr Ganesh Neelakanta Iyer 65
66. Dimensionality Reduction
• In machine learning classification problems, there are often too
many factors on the basis of which the final classification is done
• These factors are basically variables called features. The higher the
number of features, the harder it gets to visualize the training set and
then work on it
• Sometimes, most of these features are correlated, and hence
redundant
• This is where dimensionality reduction algorithms come into play.
Dimensionality reduction is the process of reducing the number of
random variables under consideration, by obtaining a set of principal
variables
• It can be divided into feature selection and feature extraction
Dr Ganesh Neelakanta Iyer 66
67.
68. ML – How it works?
Once
you've
selected
your
model, you
typically
follow the
same
general
procedure.
Preprocess your data so that it will feed
properly into your model.
Construct your model.
Train your model on a dataset and tune all
relevant parameters for optimal performance.
Evaluate your model and determine its
usefulness
Dr Ganesh Neelakanta Iyer 68
69. Steps involved when working with ML
Step Example
1. Set the research goal. I want to predict how heavy traffic will be on a given day.
2. Make a hypothesis. I think the weather forecast is an informative signal.
3. Collect the data. Collect historical traffic data and weather on each day.
4. Test your hypothesis. Train a model using this data.
5. Analyze your results. Is this model better than existing systems?
6. Reach a conclusion. I should (not) use this model to make predictions, because of X, Y,
and Z.
7. Refine hypothesis and repeat. Time of year could be a helpful signal.
Dr Ganesh Neelakanta Iyer 69
https://developers.google.com/machine-learning/problem-
framing/big-questions
70. Identifying Good Problems for ML
• Focus on problems that would be difficult to solve with traditional
programming
– For example, consider Smart Reply. The Smart Reply team recognized that
users spend a lot of time replying to emails and messages; a product that can
predict likely responses can save user time
– Another example is in Google Photos, where the business problem was to find a
specific photo by keyword search without manual tagging.
• Imagine trying to create a system like Smart Reply or Google Photos
search with conventional programming
– There isn't a clear approach
– By contrast, machine learning can solve these problems by examining patterns in
data and adapting with them. Think of ML as just one of the tools in your toolkit
and only bring it out when appropriate
Dr Ganesh Neelakanta Iyer 70
71. Identifying Good Problems for ML
Be prepared to have your assumptions challenged.
Know the Problem
Before Focusing on
the Data
ML requires a lot of relevant data.
Lean on Your
Team's Logs
You should not try to make ML do the hard work of
discovering which features are relevant for you
Predictive Power
Aim to make decisions, not just predictions.
Predictions vs.
Decisions
Dr Ganesh Neelakanta Iyer 71
72. Hard ML problems
Clustering
• What does each cluster
mean in an unsupervised
learning problem? For
example, if your model
indicates that the user is in
the blue cluster, you'll have
to determine what the blue
cluster represents
Dr Ganesh Neelakanta Iyer 72
73. Hard ML problems
Anomaly Detection
• Sometimes, people want to use ML to identify anomalies. The trick is,
how do you decide what constitutes an anomaly to get labeled data?
Dr Ganesh Neelakanta Iyer 73
74. Hard ML problems
Causation
• ML can identify correlations—mutual relationships or connections between
two or more things
• It is easy to see that something happened, but hard to see why it happened
• Did consumers buy a particular book because they saw a positive review
the week before, or would they have bought it even without that review?
Dr Ganesh Neelakanta Iyer 74
75. Hard ML problems
No Existing Data
• if you have no data to train a model, then machine learning
cannot help you. Without data, use a simple, heuristic, rule-
based system
Dr Ganesh Neelakanta Iyer 75
78. Two major types
Dr Ganesh Neelakanta Iyer 78
https://blog.westerndigital.com/machine-learning-pipeline-object-storage/
79. Types of ML
• Supervised learning: In supervised learning problems,
predictive models are created based on input set of
records with output data (numbers or labels).
• Unsupervised learning: In unsupervised learning,
patterns or structures are found in data and labelled
appropriately.
Dr Ganesh Neelakanta Iyer 79
https://vitalflux.com/dummies-notes-supervised-vs-
unsupervised-learning/
80. Types of ML Algorithms
Dr Ganesh Neelakanta Iyer
80
81. Machine Learning Algorithms
• Supervised Regression
• Simple and multiple linear regression
• Decision tree or forest regression
• Artificial Neural networks
• Ordinal regression
• Poisson regression
• Nearest neighbor methods (e.g., k-NN or k-
Nearest Neighbors)
•
Supervised Two-class & Multi-class
Classification
• Logistic regression and multinomial
regression
• Artificial Neural networks
• Decision tree, forest, and jungles
• SVM (support vector machine)
• Perceptron methods
• Bayesian classifiers (e.g., Naive Bayes)
• Nearest neighbor methods (e.g., k-NN or k-
Nearest Neighbors)
• One versus all multiclass
•
Unsupervised
• K-means clustering
• Hierarchical clustering
•
Anomaly Detection
• Support vector machine (one class)
• PCA (Principle component analysis)
Dr Ganesh Neelakanta Iyer 81
https://www.innoarchitech.com/machine-learning-an-in-depth-non-technical-guide/
82. Naïve Bayes Classifier
• Imagine two people Alice and Bob whose word usage pattern
you know. To keep example simple, lets assume that Alice
uses combination of three words [love, great, wonderful] more
often and Bob uses words [dog, ball, wonderful] often.
• Lets assume you received and anonymous email whose
sender can be either Alice or Bob. Lets say the content of
email is “I love beach sand. Additionally the sunset at beach
offers wonderful view”
• Can you guess who the sender might be?
Dr Ganesh Neelakanta Iyer 82
https://medium.com/machine-learning-101/chapter-1-supervised-learning-and-naive-
bayes-classification-part-1-theory-8b9e361897d5
83. Naïve Bayes Classifier
• Now let’s add a combination and probability in the data
we have.Suppose Alice and Bob uses following words
with probabilities as show below. Now, can you guess
who is the sender for the content : “Wonderful Love.”
• Now what do you think?
• This is where we apply
Bayes theorem
Dr Ganesh Neelakanta Iyer 83
https://medium.com/machine-learning-101/chapter-1-supervised-learning-and-naive-
bayes-classification-part-1-theory-8b9e361897d5
84. Naïve Bayes Classifier
• Naive Bayes classifier calculates the probabilities for every
factor ( here in case of email example would be Alice and Bob
for given input feature)
• Then it selects the outcome with highest probability.
• This classifier assumes the features (in this case we had
words as input) are independent. Hence the word naïve
• Even with this it is powerful algorithm used for
– Real time Prediction
– Text classification/ Spam Filtering
– Recommendation System
Dr Ganesh Neelakanta Iyer 84
https://medium.com/machine-learning-101/chapter-1-supervised-learning-and-naive-
bayes-classification-part-1-theory-8b9e361897d5
87. Support Vector Machine
• A Support Vector Machine (SVM) is a discriminative
classifier formally defined by a separating hyperplane
• In other words, given labeled training data (supervised
learning), the algorithm outputs an optimal hyperplane
which categorizes new examples
• In two dimensional space this hyperplane is a line dividing
a plane in two parts where in each class lay in either side
Confusing? Don’t worry, we shall learn in laymen terms
Dr Ganesh Neelakanta Iyer 87
https://medium.com/machine-learning-101/chapter-2-svm-support-vector-
machine-theory-f0812effc72
88. Support Vector Machine
• Suppose you are given plot of two label classes on graph
as shown in image (A). Can you decide a separating line
for the classes?
Dr Ganesh Neelakanta Iyer 88
• Separation of classes. That’s what SVM does
• It finds out a line/ hyper-plane (in multidimensional space
that separate outs classes)
https://medium.com/machine-learning-101/chapter-2-svm-support-vector-
machine-theory-f0812effc72
89. Support Vector Machine
Lets make it a bit complex…
• So far so good. Now consider what if we had data as
shown in image below? Clearly, there is no line that can
separate the two classes in this x-y plane.
Dr Ganesh Neelakanta Iyer 89
Can you draw a
separating line in
this plane?
Transforming back to
x-y plane, a line
transforms to circle.
plot of zy axis. A
separation can be
made here.
https://medium.com/machine-learning-101/chapter-2-svm-support-vector-
machine-theory-f0812effc72
90. Support Vector Machine
Lets make it a little more complex…
• What if data plot overlaps? Or, what in case some of the
black points are inside the blue ones? Which line among
1 or 2?should we draw?
Dr Ganesh Neelakanta Iyer 90
In real world
application, finding
perfect class for
millions of training
data set takes lot of
time
https://medium.com/machine-learning-101/chapter-2-svm-support-vector-
machine-theory-f0812effc72
91. SVM – Coding sample
• While you will get fair enough idea about implementation
just by reading, I strongly recommend you to open editor
and code along with the tutorial. I will give you better
insight and long lasting learning.
Dr Ganesh Neelakanta Iyer 91
https://medium.com/machine-learning-101/chapter-2-svm-support-vector-machine-coding-edd8f1cf8f2d
92. Decision Trees
• Decision tree is one of the most popular machine learning
algorithms used all along
• Decision trees are used for both classification and
regression problems
– Decision tress often mimic the human level thinking so its so
simple to understand the data and make some good
interpretations.
– Decision trees actually make you see the logic for the data to
interpret
Dr Ganesh Neelakanta Iyer 92
https://medium.com/deep-math-machine-learning-ai/chapter-4-decision-
trees-algorithms-b93975f7a1f1
93. Decision Trees
Dr Ganesh Neelakanta Iyer 93
https://medium.com/deep-math-machine-learning-ai/chapter-4-decision-
trees-algorithms-b93975f7a1f1
94. K- Nearest neighbors (KNN)
• Supervised machine learning algorithm as target variable
is known
• Non parametric as it does not make an assumption about
the underlying data distribution pattern
• Lazy algorithm as KNN does not have a training step. All
data points will be used only at the time of prediction. With no
training step, prediction step is costly. An eager learner
algorithm eagerly learns during the training step.
• Used for both Classification and Regression
• Uses feature similarity to predict the cluster that the new
point will fall into.
Dr Ganesh Neelakanta Iyer 94
https://medium.com/datadriveninvestor/k-nearest-neighbors-knn-
7b4bd0128da7
95. K- Nearest neighbors (KNN)
• You moved to a new neighborhood and want to be friends
with your neighbors
• You start to socialize with your neighbors
• You decide to pick neighbors that match your thinking,
interests and hobbies
• Here thinking, interest and hobby are features
• You decide your neighborhood friend circle based on interest,
hobby and thinking similarity
• This is analogous to how KNN works
Dr Ganesh Neelakanta Iyer 95
96. What is K is K nearest neighbors?
• K is a number used to identify similar neighbors for the new
data point.
• Referring to our example of friend circle in our new
neighborhood. We select 3 neighbors that we want to be very
close friends based on common thinking or hobbies. In this
case K is 3.
• KNN takes K nearest neighbors to decide where the new data
point with belong to. This decision is based on feature
similarity
Dr Ganesh Neelakanta Iyer 96
97. How do we chose the value of K?
• Choice of K has a drastic impact on the results we obtain
from KNN.
• We can take the test set and plot the accuracy rate or F1
score against different values of K.
• We see a high error rate for test set when K=1. Hence we
can conclude that model overfits when k=1
Dr Ganesh Neelakanta Iyer 97
98. How do we chose the value of K?
• For a high value of K, we
see that the F1 score
starts to drop
• The test set reaches a
minimum error rate when
k=5
Dr Ganesh Neelakanta Iyer 98
99. How does KNN work?
• We have age and experience in an organization along with the salaries.
• We want to predict the salary of a new candidate whose age and experience is available.
• Step 1: Choose a value for K. K should be an odd number.
• Step2: Find the distance of the new point to each of the training data.
• Step 3:Find the K nearest neighbors to the new data point.
• Step 4: For classification, count the number of data points in each category among the k
neighbors. New data point will belong to class that has the most neighbors.
• For regression, value for the new data point will be the average of the k neighbors.
Dr Ganesh Neelakanta Iyer 99
100. How does KNN work?
• K =5. We
will
average
salary of
the 5
nearest
neighbors
to predict
the salary
of the
new
data point
Dr Ganesh Neelakanta Iyer 100
102. Deep Learning
• “Deep Learning is a subfield of machine learning
concerned with algorithms inspired by the structure and
function of the brain called artificial neural networks”
—Machine Learning Mastery
Dr Ganesh Neelakanta Iyer 102
103. Deep Learning
• It’s a particular kind of machine
learning that is inspired by the
functionality of our brain cells called
neurons which lead to the concept
of artificial neural network(ANN)
• ANN is modeled using layers of
artificial neurons or computational
units to receive input and apply an
activation function along with
threshold
Dr Ganesh Neelakanta Iyer 103
https://towardsdatascience.com/cousins-of-artificial-intelligence-dda4edc27b55
104. What is Deep Learning?
Dr Ganesh Neelakanta Iyer 104
https://medium.com/swlh/ill-tell-you-why-deep-learning-is-so-popular-and-in-demand-
5aca72628780
105. AI vs ML vs DL
Dr Ganesh Neelakanta Iyer 105https://twitter.com/IainLJBrown/status/952846885651443712
106. Deep Learning
• In simple model the
first layer is input
layer, followed by a
hidden layer, and
lastly by an output
layer
• Each layer contains
one or more neurons
Dr Ganesh Neelakanta Iyer 106
https://towardsdatascience.com/cousins-of-artificial-intelligence-dda4edc27b55
107. Deep Learning
• In simple model the
first layer is input
layer, followed by a
hidden layer, and
lastly by an output
layer
• Each layer contains
one or more neurons
Dr Ganesh Neelakanta Iyer 107
https://towardsdatascience.com/cousins-of-artificial-intelligence-dda4edc27b55
108. How you recognize square from other
shapes?
• First thing we do is check whether the
figure has four lines
• If yes, we further check if all are lines
are connected and closed
• If yes we finally check if all are
perpendicular and all sides are equal
• We consider the figure as square if it
satisfies all the conditions
Dr Ganesh Neelakanta Iyer 108
https://towardsdatascience.com/cousins-of-artificial-intelligence-dda4edc27b55
109. How you recognize square from other
shapes?
• As we saw in the example it’s
nothing but nested hierarchy of
concepts
• So we took a complex task of
identifying a square and broken
down into simpler tasks
• Deep learning also does the same
thing but at a larger scale
Dr Ganesh Neelakanta Iyer 109
https://towardsdatascience.com/cousins-of-artificial-intelligence-dda4edc27b55
110. Example
• For instance, A machine performs a task of identifying an animal. Task of the
machine is to identify weather given image is of cat or dog
Dr Ganesh Neelakanta Iyer 110
https://towardsdatascience.com/cousins-of-artificial-intelligence-dda4edc27b55
111. Example
• If we would have asked us to solve this using concept machine learning
then we would have defined features such as check if it has whiskers or
not, check if tail is straight or curve and many other features
• We will define all features and let our system identify which features are
more important in classifying a particular animal
• Now when it comes to deep learning it takes it to one step ahead
• Deep learning automatically finds which features are most important for
classifying as compared to machine learning where we had to manually
give out the features
Dr Ganesh Neelakanta Iyer 111
113. ML vs DL
• Easiest way to understand difference between machine
learning and deep learning is “DL IS ML”
• More specifically it’s the next evolution of machine
learning
Dr Ganesh Neelakanta Iyer 113
114. Data Dependency
• The most important difference between the
two is the performance as the data size
increases
• We can see that as the size of the data is
small deep learning doesn't performs that well
but why?
• This is because deep learning algorithm
requires large amount of data to understand it
perfectly
• On the other hand machine learning works
perfectly on smaller datasets
Dr Ganesh Neelakanta Iyer 114
115. Hardware Dependency
• Deep learning algorithms are highly dependent on high end
machines while machine learning algorithms can work on low
end machines as well
• This is because requirement of deep learning algorithms
include GPU’s which is an integral part of its working
• GPU’s are required as they perform large amount of matrix
multiplication operations and these operations are only be
efficiently optimized if they use GPU’s
Dr Ganesh Neelakanta Iyer 115
116. Feature engineering
• It’s the process of putting domain knowledge to reduce the
complexity of data and make patterns more visible to learning
algorithms
• This process it’s difficult and expensive in terms of time and
expertise
• In case of machine learning, most of the features are to need be
identified by an expert and then hand coded as per the domain and
data type
• The performance of machine learning depends upon how accurately
features are identified and extracted
• But in deep learning it tries to learn high level features from the data
and because of this it makes ahead of machine learning
Dr Ganesh Neelakanta Iyer 116
117. Problem Solving Approach
• When we solve problem using machine learning, its recommended
that break down the problem into sub parts first, solve them
individually and then combine them to get the final result
• On the other hand in deep learning it solves the problem end to end
Dr Ganesh Neelakanta Iyer 117
118. Problem Solving Approach - Example
• The task is multiple object detection i.e what is the object and
where it is present in the image
Dr Ganesh Neelakanta Iyer 118
So let’s see how this
problem is tackled using
machine learning and
deep learning.
119. Problem Solving Approach - Example
• In a machine learning approach, we will divide problem in to
two parts
– object detection and object recognition
• We will use an algorithm like bounding box detection as an
example to scan through image and detect all objects then
use object recognition algorithm to recognize relevant objects
• When we combine results of both the algorithms we will get
the final result that what is the object and where it is present
in the image
Dr Ganesh Neelakanta Iyer 119
120. Problem Solving Approach - Example
• In deep learning it perform the process from end to end.
We will pass an image to an algorithm and our algorithm
will give out the location along with the name of the object
Dr Ganesh Neelakanta Iyer 120
121. Execution Time
• Deep learning algorithms take a lot of time to train
– This is because there are so many parameters in a deep learning
algorithm that takes the training longer than usual
– Whereas in machine learning the training time is relatively less as
compared to deep learning.
• Now the execution time is completely reverse when it comes
to the testing of data
– During testing deep learning algorithms takes very less time to run
whereas the machine learning algorithms like KNN test time
increases as the size of the data increases
Dr Ganesh Neelakanta Iyer 121
122. Interpretability
• Suppose we use deep learning to give automated essay scoring
• The Performance it gives is excellent and same as human beings
but there are some issues that it doesn’t tell us why it has given that
score, indeed mathematically it’s possible to find out which nodes of
deep neural network were activated at that time but we don’t know
what the neurons were supposed to model and what these layers
were doing collectively
• So we fail to interpret the result but in machine learning algorithms
like decision tree gives us a crisp rule that why it chose what it chose
so it is easy to interpret reasoning behind it
Dr Ganesh Neelakanta Iyer 122
123. Applications of Deep Learning
https://towardsdatascience.com/what-can-deep-learning-bring-to-your-app-fb1a6be63801
124. Recommendation Engine
Facebook “People You May Know”
Netflix “Other Movies You May Enjoy”
LinkedIn “Jobs You May Be Interested In”
Amazon “Customer who bought this item also bought …”
Google “Visually Similar Images”
YouTube “Recommended Videos”
125. Recommendation Engine
• Content-Based and Collaborative
Filtering methods
– Content-Based refers to quantizing
objects in your app as a set of
features and fitting regression models
to predict the tendencies of a user
based on his or her own data
– Collaborative Filtering is more difficult
to implement, but performs better as
it incorporates the behavior of the
entire user base to make predictions
for single users
Dr Ganesh Neelakanta Iyer 125
https://medium.com/@humansforai/recommendation-
engines-e431b6b6b446
127. Text Sentiment Analysis
• Many apps have comments or comment-based review
systems built into their apps
• Natural Language Processing research and Recurrent Neural
Networks have come a long way and it is now entirely
possible to deploy these models on the text in your app to
extract higher-level information
• This can be very useful for evaluating the sentimental polarity
in the comments sections, or extracting meaningful topics
through Named-Entity Recognition models
Dr Ganesh Neelakanta Iyer 127
129. Chatbots
• Chatbots are seen by many as one
of the pillars of the next-generation of
user-interfaces on the web
• Chatbots can be trained with
samples of dialogue and recurrent
neural networks
Dr Ganesh Neelakanta Iyer 129
131. Image Recognition
• Image retrieval and classification are very useful if your
app utilizes images
• Some of the most popular approaches include using
recognition models to sort images into different
categories, or using auto-encoders to retrieve images
based on visual similarity
• Image recognition tactics can also be used to segment
and classify video data, since videos are really just a time-
sequence of images
Dr Ganesh Neelakanta Iyer 131
https://towardsdatascience.com/hacking-your-image-
recognition-model-909ad4176247
132. Marketing Research
• Deep Learning can also be useful behind the scenes.
Market segmentation, marketing campaign analysis, and
many more can be improved using Deep Learning
regression and classification models
• This will really help the most if you have a massive
amount of data, otherwise, you are probably best using
traditional machine learning algorithms for these tasks
rather than Deep Learning
Dr Ganesh Neelakanta Iyer 132
https://towardsdatascience.com/what-can-deep-learning-
bring-to-your-app-fb1a6be63801
134. Cloud-based Machine Learning Services
• Machine learning platforms are one of the fastest growing
services of the public cloud
• Unlike other cloud-based services, ML and AI platforms
are available through diverse delivery models such as
– cognitive computing
– automated machine learning
– ML model management
– ML model serving and
– GPU-based computing
Dr Ganesh Neelakanta Iyer 134
135. ML and AI
spectrum in Cloud
• Like the original
cloud delivery
models of IaaS,
PaaS, and SaaS,
ML and AI
spectrum span
infrastructure,
platform and high-
level services
exposed as APIs
Dr Ganesh Neelakanta Iyer 135
https://www.forbes.com/sites/janakirammsv/2019/01/01/an-executives-
guide-to-understanding-cloud-based-machine-learning-
services/#7fa721383e3e
136. Cognitive Services
• Cognitive computing is delivered as a set of APIs that offer computer
vision, natural language processing (NLP) and speech services
• Developers can consume these APIs like any other web service or
REST API
• Developers are not expected to know intricate details of machine
learning algorithms or data processing pipelines to take advantage
of these services
• As the consumption of these services rises, the quality of cognitive
services increases
• With the increase in data and usage of the services, cloud providers
are continually improving the accuracy of the predictions
Dr Ganesh Neelakanta Iyer 136
137. Automated ML
• Developers can use the APIs after training the service
with custom data
• AutoML offers a middle ground to consuming pre-trained
models vs. training custom models from scratch
• From object detection to sentiment analysis, you will be
able to tap into readily available AI services
• Think of these APIs the SaaS equivalent of AI where you
only pay for what you use
Dr Ganesh Neelakanta Iyer 137
139. Amazon Rekognition
https://aws.amazon.com/rekognition/
• Amazon Rekognition makes it easy to add image and video analysis to
your applications
• You just provide an image or video to the Rekognition API, and the service
can identify the objects, people, text, scenes, and activities, as well as
detect any inappropriate content.
• Amazon Rekognition also provides highly accurate facial analysis and
facial recognition on images and video that you provide.
• You can detect, analyze, and compare faces for a wide variety of user
verification, people counting, and public safety use cases
Dr Ganesh Neelakanta Iyer 139
140. Amazon Rekognition
https://aws.amazon.com/rekognition/
• Amazon Rekognition is based on the same proven, highly scalable,
deep learning technology developed by Amazon’s computer vision
scientists to analyze billions of images and videos daily, and requires
no machine learning expertise to use
• Amazon Rekognition is a simple and easy to use API that can
quickly analyze any image or video file stored in Amazon S3.
• Amazon Rekognition is always learning from new data, and we are
continually adding new labels and facial recognition features to the
service
Dr Ganesh Neelakanta Iyer 140
151. Google Cloud Vision API
https://cloud.google.com/products/ai/building-blocks/
• Cloud Vision offers both pretrained models via an API and the ability to
build custom models using AutoML Vision to provide flexibility depending
on your use case
• Cloud Vision API enables developers to understand the content of an
image by encapsulating powerful machine learning models in an easy-to-
use REST API
• It quickly classifies images into thousands of categories, detects individual
objects and faces within images, and reads printed words contained within
images
• You can build metadata on your image catalog, moderate offensive
content, or enable new marketing scenarios through image sentiment
analysis. Dr Ganesh Neelakanta Iyer 151
152. Google AutoML Vision
• AutoML Vision Beta makes it possible for developers
with limited machine learning expertise to train high-
quality custom models
• After uploading and labeling images, AutoML Vision will
train a model that can scale as needed to adapt to
demands
• AutoML Vision offers higher model accuracy and faster
time to create a production-ready model.
Dr Ganesh Neelakanta Iyer 152
158. Characteristics
• Insight from your images
– Easily detect broad sets of objects in your images, from flowers,
animals, or transportation to thousands of other object categories
commonly found within images
– Vision API improves over time as new concepts are introduced and
accuracy is improved. With AutoML Vision, you can create custom
models that highlight specific concepts from your images
– This enables use cases ranging from categorizing product images to
diagnosing diseases
Dr Ganesh Neelakanta Iyer 158
159. Characteristics
• Extract text
– Optical Character Recognition (OCR) enables you to detect text
within your images, along with automatic language
identification.
– Vision API supports a broad set of languages
Dr Ganesh Neelakanta Iyer 159
160. Characteristics
• Power of the web
– Vision API uses the power of Google Image Search to find
topical entities like celebrities, logos, or news events
– Millions of entities are supported, so you can be confident that
the latest relevant images are available
– Combine this with Visually Similar Search to find similar images
on the web.
Dr Ganesh Neelakanta Iyer 160
161. Characteristics
• Content moderation
– Powered by Google SafeSearch, easily moderate content and
detect inappropriate content from your crowd-sourced images
– Vision API enables you to detect different types of inappropriate
content, from adult to violent content.
Dr Ganesh Neelakanta Iyer 161
162. Image search
Use Vision API and AutoML Vision to make images searchable across broad topics and
scenes, including custom categories.
Dr Ganesh Neelakanta Iyer 162
https://cloud.google.com/solutions/image-search-app-with-cloud-vision/
163. Document classification
Access information efficiently by using the Vision and Natural Language APIs to transcribe and
classify documents.
Dr Ganesh Neelakanta Iyer 163
164. Product Search
Find products of interest within images and visually search product catalogs using Cloud Vision API
Dr Ganesh Neelakanta Iyer 164
165. Cloud Vision API features
Label
detection
Web detection
Optical
character
Handwriting
recognitionBETA Logo detection
Object
localizerBETA
Integrated
REST API
Landmark
detection
Face detection
Content
moderation
ML Kit
integration
Product
searchBETA
Image
attributes
Dr Ganesh Neelakanta Iyer 165
168. Video Intelligence
• Google also assures the Video Intelligence to perform
video analysis, classification, and labeling
• This allows searching through the videos based on the
extracted metadata
• It is also possible to detect the change of the scene and
filter the explicit content.
Dr Ganesh Neelakanta Iyer 168
169.
170.
171.
172. Microsoft Computer Vision
• Extract rich information from images to categorize and
process visual data—and perform machine-assisted
moderation of images to help curate your services
• This feature returns information about visual content found in
an image
• Use tagging, domain-specific models, and descriptions in four
languages to identify content and label it with confidence
• Apply the adult/racy settings to help you detect potential adult
content
• Identify image types and color schemes in pictures
Dr Ganesh Neelakanta Iyer 172
174. Microsoft Computer Vision
Dr Ganesh Neelakanta Iyer 174
Analyze an
image
Read text in
images
Preview: Read
handwritten
text from
images
Recognize
celebrities and
landmarks
Analyze video
in near real-
time
Generate a
thumbnail
176. ML Platform as a Service
• When cognitive APIs fall short of requirements, you can
leverage ML PaaS to build highly customized machine
learning models
• For example, while a cognitive API may be able to identify the
vehicle as a car, it may not be able to classify the car based
on the make and model
• Assuming you have a large dataset of cars labeled with the
make and model, your data science team can rely on ML
PaaS to train and deploy a custom model that’s tailormade for
the business scenario
Dr Ganesh Neelakanta Iyer 176
177. ML Platform as a Service
• Similar to PaaS delivery model where developers bring their
code and host it at scale, ML PaaS expects data scientists to
bring their own dataset and code that can train a model
against custom data
• They will be spared from provisioning compute, storage and
networking environments to run complex machine learning
jobs
• Data scientists are expected to create and test the code with
a smaller dataset in their local environments before running it
as a job in the public cloud platform
Dr Ganesh Neelakanta Iyer 177
178. ML Platform as a Service
• ML PaaS removes the friction involved in setting up and configuring data
science environments
• It provides pre-configured environments that can be used by data
scientists to train, tune, and host the model
• ML PaaS efficiently handles the lifecycle of a machine learning model by
providing tools from data preparation phase to model hosting
• They come with popular tools such as Jupyter Notebooks which are
familiar to the data scientists
• ML PaaS tackles the complexity involved in running the training jobs on a
cluster of computers
• They abstract the underpinnings through simple Python or R API for the
data scientists
Dr Ganesh Neelakanta Iyer 178
183. • Simplify and accelerate the building, training and deployment of your ML models
• Use automated ML to identify suitable algorithms and tune hyperparameters faster
• Seamlessly deploy to the cloud and the edge with one click
• Access all these capabilities from your favourite Python environment using the latest
open-source frameworks, such as PyTorch, TensorFlow and scikit-learn
184.
185. How to use Azure Machine Learning service
• Step 1: Creating
a workspace
• Install the SDK in
your favourite
Python
environment, and
create your
workspace to store
your compute
resources,
models,
deployments and
run histories in the
cloud.
Dr Ganesh Neelakanta Iyer 185
186. How to use Azure Machine Learning service
• Step 2: Build and
train
• Use frameworks of
your choice and
automated
machine learning
capabilities to
identify suitable
algorithms and
hyperparameters
faster. Track your
experiments and
easily access
powerful GPUs in
the cloud.
Dr Ganesh Neelakanta Iyer 186
187. How to use Azure Machine Learning service
• Step 3: Deploy and
manage
• Deploy models to the
cloud or at the edge
and leverage
hardware-
accelerated models
on field-
programmable gate
arrays (FPGAs) for
super-fast
inferencing. When
your model is in
production, monitor it
for performance and
data drift, and retrain
it as needed.
Dr Ganesh Neelakanta Iyer 187
188.
189. ML Infrastructure Services
• Think of ML infrastructure as the IaaS of the machine learning stack
• Cloud providers offer raw VMs backed by high-end CPUs and
accelerators such as graphics processing unit (GPU) and field
programmable gate array (FPGA)
• Developers and data scientists that need access to raw compute
power turn to ML infrastructure
• For complex deep learning projects that heavily rely on niche toolkits
and libraries, organizations choose ML infrastructure
• They get ultimate control of the hardware and software configuration
which may not be available from ML PaaS offerings
Dr Ganesh Neelakanta Iyer 189
190. ML Infrastructure Services
• Recent hardware investments from Amazon, Google,
Microsoft and Facebook, made ML infrastructure cheaper and
efficient
• Cloud providers are now offering custom hardware that’s
highly optimized for running ML workloads in the cloud
• Google’s TPU and Microsoft’s FPGA offerings are examples
of custom hardware accelerators exclusively meant for ML
jobs
• When combined with the recent computing trends such as
Kubernetes, ML infrastructure becomes an attractive choice
for enterprises
Dr Ganesh Neelakanta Iyer 190
191.
192.
193.
194.
195.
196. Deep Learning Cloud Service Providers
# Name URL
1 Alibaba https://www.alibabacloud.com
2 AWS EC2 https://aws.amazon.com/machine-learning/amis
3 AWS Sagemaker https://aws.amazon.com/sagemaker
4 Cirrascale http://www.cirrascale.com
5 Cogeco Peer 1 https://www.cogecopeer1.com
6 Crestle https://www.crestle.com
7 Deep Cognition https://deepcognition.ai
8 Domino https://www.dominodatalab.com
9 Exoscale https://www.exoscale.com
10 FloydHub https://www.floydhub.com/jobs
11 Google Cloud https://cloud.google.com/products/ai
12 Google Colab https://colab.research.google.com
13 GPUEater https://www.gpueater.com
14 Hetzner https://www.hetzner.com
15 IBM Watson https://www.ibm.com/watson
16 Kaggle https://www.kaggle.com
https://towardsdatascience.com/list-of-deep-
learning-cloud-service-providers-579f2c769ed6
199. Fun ML projects for beginners
• Machine Learning Gladiator
• Play Money Ball
• Predict Stock Prices
• Teach a Neural Network to Read Handwriting
• Investigate Enron
• Write ML Algorithms from Scratch
• Mine Social Media Sentiment
• Improve Health Care
https://elitedatascience.com/machine-learning-projects-for-beginners
201. Interesting ML projects to start trying
• Beginner Level
– Iris Data
– Loan Prediction Data
– Bigmart Sales Data
– Boston Housing Data
– Time Series Analysis
Data
– Wine Quality Data
– Turkiye Student
Evaluation Data
– Heights and Weights
Data
• Intermediate Level
– Black Friday Data
– Human Activity
Recognition Data
– Siam Competition
Data
– Trip History Data
– Million Song Data
– Census Income Data
– Movie Lens Data
– Twitter Classification
Data
• Advanced Level
– Identify your Digits
– Urban Sound
Classification
– Vox Celebrity Data
– ImageNet Data
– Chicago Crime Data
– Age Detection of
Indian Actors Data
– Recommendation
Engine Data
– VisualQA Data
https://www.analyticsvidhya.com/blog/2018/05/24-ultimate-data-science-projects-to-boost-your-knowledge-and-skills/
207. Dr Ganesh Neelakanta Iyer
ni_amrita@cb.amrita.edu
ganesh.vigneswara@gmail.com
GANESHNIYER
http://ganeshniyer.com/
https://www.amrita.edu/faculty/ni-ganesh
208. Game Theory for Networks
ViTECoN 2019 Tutorial at TT Gallery 1 from 2 PM to 5 PM
Dr Ganesh Neelakanta Iyer
Amrita Vishwa Vidyapeetham, Coimbatore
Associate Professor, Dept of Computer Science and Engg
https://amrita.edu/faculty/ni-ganesh
http://ganeshniyer.com