Learning From Data Lecture 2 The Perceptron
The Learning Setup A Simple Learning Algorithm: PLA Other Views of Learning Is Learning Feasible: A Puzzle
- M. Magdon-Ismail
CSCI 4100/6100
Learning From Data Lecture 2 The Perceptron The Learning Setup A - - PowerPoint PPT Presentation
Learning From Data Lecture 2 The Perceptron The Learning Setup A Simple Learning Algorithm: PLA Other Views of Learning Is Learning Feasible: A Puzzle M. Magdon-Ismail CSCI 4100/6100 recap: The Plan 1. What is Learning? 2. Can We do it?
The Learning Setup A Simple Learning Algorithm: PLA Other Views of Learning Is Learning Feasible: A Puzzle
CSCI 4100/6100
recap: The Plan
concepts theory practice
. . . our sword will be computer algorithms
c A M L Creator: Malik Magdon-Ismail
The Perceptron: 2 /25
Recap: key players − →
recap: The Key Players
(The target f is unknown.)
(yn = f(xn).)
c A M L Creator: Malik Magdon-Ismail
The Perceptron: 3 /25
Recap: learning setup − →
recap: Summary of the Learning Setup
(ideal credit approval formula) (historical records of credit customers) (set of candidate formulas) (learned credit approval formula) UNKNOWN TARGET FUNCTION f : X → Y TRAINING EXAMPLES (x1, y1), (x2, y2), . . . , (xN, yN) HYPOTHESIS SET H FINAL HYPOTHESIS g ≈ f LEARNING ALGORITHM A
yn = f(xn)
c A M L Creator: Malik Magdon-Ismail
The Perceptron: 4 /25
Simple learning model − →
d
d
(“Credit Score” is good)
d
(“Credit Score” is bad)
input xi is important = ⇒ large weight |wi| input xi beneficial for credit = ⇒ positive weight wi > 0 input xi detrimental for credit = ⇒ negative weight wi < 0
c A M L Creator: Malik Magdon-Ismail
The Perceptron: 5 /25
Rewriting the model − →
d
d
c A M L Creator: Malik Magdon-Ismail
The Perceptron: 6 /25
Perceptron − →
c A M L Creator: Malik Magdon-Ismail
The Perceptron: 7 /25
Geometry of perceptron − →
(Problem 1.2 in LFD)
Age Income Age Income
c A M L Creator: Malik Magdon-Ismail
The Perceptron: 8 /25
Use the data − →
Age Income Age Income
(“It’s obvious - just look at the data and draw the line,” is not a valid solution.)
c A M L Creator: Malik Magdon-Ismail
The Perceptron: 9 /25
How to learn g − →
Age Income
c A M L Creator: Malik Magdon-Ismail
The Perceptron: 10 /25
PLA − →
1: w(1) = 0 2: for iteration t = 1, 2, 3, . . . 3: the weight vector is w(t). 4: From (x1, y1), . . . , (xN, yN) pick any misclassified example. 5: Call the misclassified example (x∗, y∗),
6: Update the weight:
7: t ← t + 1
w(t + 1) w(t) w(t) w(t + 1) x∗ y∗ = −1 x∗ y∗x∗ y∗ = +1 y∗x∗
c A M L Creator: Malik Magdon-Ismail
The Perceptron: 11 /25
PLA convergence − →
iteration 1
c A M L Creator: Malik Magdon-Ismail
The Perceptron: 12 /25
Start − →
iteration 1
c A M L Creator: Malik Magdon-Ismail
The Perceptron: 13 /25
Iteration 1 − →
iteration 1
c A M L Creator: Malik Magdon-Ismail
The Perceptron: 14 /25
Iteratrion 2 − →
Age Income
iteration 2
c A M L Creator: Malik Magdon-Ismail
The Perceptron: 15 /25
Iteration 3 − →
Age Income
iteration 3
c A M L Creator: Malik Magdon-Ismail
The Perceptron: 16 /25
Iteration 4 − →
iteration 4
c A M L Creator: Malik Magdon-Ismail
The Perceptron: 17 /25
Iteration 5 − →
Age Income
iteration 5
c A M L Creator: Malik Magdon-Ismail
The Perceptron: 18 /25
Iteration 6 − →
iteration 6
c A M L Creator: Malik Magdon-Ismail
The Perceptron: 19 /25
Non-separable data? − →
iteration 1
c A M L Creator: Malik Magdon-Ismail
The Perceptron: 20 /25
We can fit! − →
(So computationally, things seem good.)
c A M L Creator: Malik Magdon-Ismail
The Perceptron: 21 /25
Other views of learning − →
c A M L Creator: Malik Magdon-Ismail
The Perceptron: 22 /25
Coins – supervised − →
c A M L Creator: Malik Magdon-Ismail
The Perceptron: 23 /25
Coins – unsupervised − →
c A M L Creator: Malik Magdon-Ismail
The Perceptron: 24 /25
Puzzle: outside the data − →
c A M L Creator: Malik Magdon-Ismail
The Perceptron: 25 /25