CHAPTER ONE
Introduction to Machine Learning
Outline
✓ What is Machine Learning?
✓ History and Relationship to other fields
✓ Essential math and statistics for Machine Learning
✓ Types of Machine Learning techniques
✓ Application of Machine Learning
2
What is Machine Learning?
✓ “Learning is any process by which a system improves performance from
experience.” Herbert Simon
✓ Machine learning is the field of study that gives computers the ability to
learn without being explicitly programmed. | Arthur L. Samuel, AI pioneer, 1959
✓ Definition by Tom Mitchell (1998):
❑ Machine Learning is the study of algorithms that
➢ Improve their performance P
➢ at some task T
➢ With experience E.
❑ A well-defined learning task is given by <P, T, E>
3
Cont’d…
✓ A classic example of a task that requires machine learning:
✓ Handwriting recognition learning problem
❑ Task T : Recognizing and classifying handwritten words within images
❑ Performance P : Percent of words correctly classified
❑ Training experience E: A dataset of handwritten words with given classifications
4
Cont’d…
✓ In the real world, we are surrounded by humans who
can learn everything from their experiences with their
learning capability, and we have computers or
machines which work on our instructions.
✓ But can a machine also learn from experiences or past
data like a human does? So here comes the role
of Machine Learning.
5
Cont’d…
✓ For many problems, it’s difficult to program the correct behavior by hand
❑ recognizing people and objects
❑ understanding human speech
✓ Machine learning approach: program an algorithm to automatically learn
from data, or from experience
✓ Why might you want to use a learning algorithm?
❑ hard to code up a solution by hand (e.g. vision, speech)
❑ system needs to adapt to a changing environment (e.g. spam detection)
❑ want the system to perform better than the human programmers
❑ privacy/fairness (e.g. ranking search results)
6
Cont’d…
✓ Uses computing-based systems to make sense out of data
❑ Extracting patterns, fitting data to functions, classifying data, etc
✓ ML systems can learn and improve
❑ With historical data, time and experience
✓ Bridges theoretical computer science and real noise data.
7
…cont’d
✓ Traditional Programming
Data
Computer Output
Program
❑ Explicit programming is used to solve problems.
❑ Rules can be manually specified.
✓ Machine Learning
Data
Computer Program
Output
❑ Samples are used for training.
❑ The decision-making rules are complex or difficult to describe.
❑ Rules are automatically learned by machines
8
Data
✓ Data: It can be any unprocessed fact, value, text, sound, or picture that is
not being interpreted and analyzed.
✓ Data is the most important part of all Data Analytics, Machine Learning,
Artificial Intelligence.
✓ Data: A set of data records (also called examples, instances or cases)
described by
✓ k attributes: A1, A2, … Ak.
✓ A Class: Each example is labelled with a pre-defined class.
✓ Without data, we can't train any model and all modern research and
automation will go in vain.
9
Cont’d…
Label: “Motorcycle”
✓ Images/video Suggest tags
Image search…
Speech recognition
✓ Audio Music classification
Speaker identification…
Web search
✓ Text
Anti-spam Machine
translation…
10
Model
✓ A machine learning model is a file that has been trained to recognize certain
types of patterns.
✓ You train a model over a set of data, providing it an algorithm that it can
use to reason over and learn from those data.
11
History and Relationship to Other Fields
✓ Artificial Intelligence: A new technical science that focuses on the
research and development of theories, methods, techniques, and
application systems for simulating and extending human intelligence
✓ Machine Learning is said as a subset of artificial intelligence that is
mainly concerned with the development of algorithms which allow a
computer to learn from the data and past experiences on their own.
✓ Deep learning:
❑ A new field of machine learning.
❑ The concept of deep learning originates from the research on artificial
neural networks.
❑ The multi-layer perceptron (MLP) is a type a deep learning architecture.
❑ Deep learning aims to simulate the human brain to interpret data such as
images, sounds, and texts
12
Cont’d…
✓ Before some years (about 40-50 years),
machine learning was science fiction, but
today it is the part of our daily life.
✓ Machine learning is making our day-to-day
life easy from self-driving cars to Amazon
virtual assistant "Alexa".
✓ However, the idea behind machine
learning is so old and has a long history.
13
Cont’d…
• Rule-Based AI
• Introduction of SVMs and decision trees.
• ML program for playing checkers.
Emergence of AI and ML Data and Modern ML
1960s - 1970s 1990s - 2000s:
1980s: 2010s - Present:
1940s - 1950s:
Statistical Learning and AI Winter Deep Learning and Real-World
Early Foundations
Applications
• Turing Test • Backpropagation Algorithm
• Deep Learning Boom (2010s)
• Machine Learning in Daily Life
14
Essential Mathematics and Statistics for ML
✓ Machine learning is being widely used in almost all areas of the real
world, from Google Assistant to self-driving cars.
✓ It is about developing models that can automatically extract
important information and patterns from data.
✓ But here, an important question arises: what is the magic behind
ML, and the answer is mathematics.
✓ Mathematics is the core of designing ML algorithms that can
automatically learn from data and make predictions.
✓ Therefore, it is very important to understand the Maths before going
into the deep understanding of ML algorithms.
15
Cont’d…
✓ The significance of Mathematics in ML:
❑ Mathematics defines the concept behind the ML algorithms & helps in choosing the
right algorithm by considering accuracy, training time, the complexity of the model,
number of features.
❑ Computers understand data differently than humans, such as an image is seen as a 2D-
3D matrix by a computer for which mathematics is required.
❑ With Maths, we can correctly determine the interval & uncertainty.
❑ It helps in selecting correct parameter values and validation methods.
❑ Understanding the Bias-Variance trade-off helps us identify underfitting and overfitting
issues that are the main issues in ML models.
16
Cont’d…
✓ After understanding the need for Maths, the
next question arises: what level of maths is
required and what concepts one needs to
understand.
✓ To answer this question, we have provided
the basic level of mathematics required for an
ML Engineer/ Scientist.
✓ Apart from the below concepts, the level of
maths also depends upon the individual's
interest and the type of research someone is
working on.
17
Cont’d…
✓ Essential Statistics for Machine Learning: ❑ Linear & Logistic Regression
❑ Descriptive Statistics ➢ Models relationships between variables for
prediction.
➢ Mean, Median, Variance, Standard Deviation
❑ Bayesian Inference
➢ Summarizes and describes data distributions.
➢ Bayes' Theorem
❑ Probability Distributions
➢ Updates predictions with new data.
➢ Normal, Binomial, Poisson Distributions
❑ Statistical Significance
➢ Models data and uncertainty in predictions.
➢ Measures the reliability of model results.
❑ Hypothesis Testing
➢ p-values, Confidence Intervals
➢ Validates assumptions and measures significance.
➢ Regression Analysis
18
Machine Learning Lifecycle
✓ Machine Learning Lifecycle is a structured process that defines how machine
learning (ML) models are developed, deployed and maintained.
✓ It consists of a series of steps that ensure the model is accurate, reliable and
scalable.
Exploratory Monitoring
Data Data Feature Model Model Model
Problem Definition Data Analysis and
Collection Preprocessing Engineering Development Evaluation Deployment
(EDA) Maintenance
19
Types of Machine Learning techniques
20
Supervised Learning
✓ Supervised learning is a type of machine learning method in
which we provide sample labeled data to the machine
learning system in order to train it, and on that basis, it
predicts the output.
✓ The system creates a model using labeled data to
understand the datasets and learn about each data, once the
training and processing are done then we test the model by
providing a sample data to check whether it is predicting the
exact output or not.
✓ The goal of supervised learning is to map input data with
the output data.
✓ The supervised learning is based on supervision, and it is the
same as when a student learns things in the supervision of
the teacher.
21
Unsupervised Learning
✓ Unsupervised learning is a learning method in which
a machine learns without any supervision.
✓ The training is provided to the machine with the set
of data that has not been labeled, classified, or
categorized, and the algorithm needs to act on that
data without any supervision.
✓ The goal of unsupervised learning is to restructure
the input data into new features or a group of
objects with similar patterns.
✓ In unsupervised learning, we don't have a
predetermined result.
✓ The machine tries to find useful insights from the
huge amount of data.
22
Reinforcement Learning
✓ Reinforcement learning is a feedback-based learning
method, in which a learning agent gets a reward for
each right action and gets a penalty for each wrong
action.
✓ The agent learns automatically with these feedbacks
and improves its performance.
✓ In reinforcement learning, the agent interacts with the
environment and explores it.
✓ The goal of an agent is to get the most reward points,
and hence, it improves its performance.
✓ The robotic dog, which automatically learns the
movement of his arms, is an example of Reinforcement
learning.
23
Application 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.
24
Cont’d…
✓ 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.
25
Cont’d…
✓ 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.
26
Cont’d…
✓ 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:
❑ Real Time location of the vehicle form Google Map
app and sensors
❑ 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.
27
Review Questions
✓ What is machine learning, and how does it differ from traditional
programming?
✓ What are the three main types of machine learning? Describe each one with
examples.
✓ Explain how reinforcement learning differs from other machine learning
techniques.
28
Projects
✓ Build a machine learning model to predict student performance (pass/fail).
✓ Develop a machine learning model to predict housing prices.
✓ Develop a machine learning model to predict employee attrition (i.e.,
whether an employee will leave or stay).
29
End of Ch.1
Questions, Ambiguities, Doubts, … ???