Lecture 2 - Introduction To ML
Lecture 2 - Introduction To ML
ML Basics
Introduction
Dr. Rajdip Nayek
Block V, Room 418D
Department of Applied Mechanics
Indian Institute of Technology Delhi
E-mail: [email protected]
Outline
• Machine learning vs classical programming
2
Classical programming vs Machine learning
• Classical programming
• Program/code the rules for every task
Data
Classical Answers
Rules programming
Data
Machine Rules
Answers Learning
3
Types of machine learning
Broadly speaking, there are three types of machine learning algorithms
5
Supervised learning examples
Misclassification
6
Supervised learning examples
Object Recognition: Detect the class of the object
• ImageNet
• 1000 classes
• Lots of variability in
lighting, viewpoint,
etc.
• Deep neural
networks reduced
error rates from
26% to under 4%
7
Supervised learning examples
Machine Translation: Translate a sentence from one language to another
Wu et al.
2016
Google
Neural
Machine
Translation
(GNMT)
8
Unsupervised learning examples
Unsupervised learning: no labelled examples, you only have input data. You
are looking for interesting patterns in the data
• To find clusters in data
Poisson’s ratio
210 GPa 0.279
70 GPa 0.325
⋮ ⋮
190 GPa 0.267 Elastic modulus
9
Unsupervised learning examples
Unsupervised learning: no labelled examples, you only have input data. You
are looking for interesting patterns in the data
• To find clusters in data
10
Unsupervised learning examples
Unsupervised learning: no labelled examples, you only have input data. You
are looking for interesting patterns in the data
Generated faces
(not true faces)
11
Reinforcement learning
Computer playing a game
Computer (agent that performs action)
Agent
Environment
Game (environment)
• Negative reinforcements
• Hunger
• Pain
• Positive reinforcements
• Food
• Pleasure
13
Neurons
and
Neural Networks
14
Computer emulation of human brain
• Many decades back, researchers suggested the idea that the computer
can be as powerful as the human brain
• If the combined signal from the different dendrites is strong enough, the
neuron generates an action potential in the form of an electrical signal
16
Neural networks
• Idea: Mimic the brain to do computation
• Nodes (also called units) correspond to nucleui
• Links (arrows) correspond to dendrites
• A single processing unit: The output node (𝑦) has incoming connections
from input nodes (𝑥), each associated with a weight (𝑤)
𝑦
𝑦
Output node
Output node
𝑏 Weights
Bias 𝑏 𝑤𝐾
Bias 𝑤1
Weights 𝑤1 𝑤𝐾 1 𝑥1 ⋯ 𝑥𝐾
𝑥1 𝑥𝐾 Input nodes
⋯
Input nodes
17
Neural networks
• Idea: Mimic the brain to do computation
• Nodes (also called units) correspond to nucleui
• Links (arrows) correspond to dendrites
• A single processing unit: The output node (𝑦) has incoming connections
from input nodes (𝑥), each associated with a weight (𝑤)
Weights Input
𝑦 Bias
Output node 𝑦 = 𝜎 𝒘𝑇 𝒙 + 𝑏
Weights Output
Bias 𝑏 𝑤𝐾
𝑤1 Nonlinear
1 𝑥1 Activation
⋯ 𝑥𝐾 function
Input nodes
18
Neural networks
• Activation functions are usually nonlinear
𝑧 𝑧>0
𝜎 𝑧 =ቊ
0 𝑧≤0
Images
from
ImageNet