CMSC 678 Fall 2022 - Homework 2
Due at the start of class on Thursday October 6
Question 1 (30 points)
Starting with a weight vector that is all 0's, show the Perceptron
algorithm running on the following dataset:
| Instance Number |
x |
y |
| 1 |
(1, 2) |
1 |
| 2 |
(1, 1) |
-1 |
| 3 |
(2, 2) |
1 |
| 4 |
(2, 1) |
-1 |
Run through the instances in order from 1 to 4, and for each update
give the following information:
- Weight vector before the update
- The value of wx
- The predicted y value
- The weight vector after the update
Note that the weight vector after the update becomes the weight
vector before the update for the next instance. Be sure to include a
weight w0, or bias term. You can pretend that each instance has a 1
prepended to it if that makes it easier conceptually.