Perceptron
- Perceptron is a linear classifier
- So it is used only when data are linearly separable
- Initially unit step activation function was used
- In short, it's a simple model of $y = wx + b$ where
- prediction = 1 if y > 0
- otherwise, prediction = 0
Steps
- For d=2 dimensional data,
- W = ($w_0, w_1, w_2$) - (d+1) dimension
- X = ($x_0, x_1, x_2$) - (d+1) dimension
- Here $x_0$ is always $1$
- Now calculation $\hat{y} = w_0 + w_1 x_1 + w_2 x_2$
- if $\hat{y} > 0$, then upper side
- else, lower side
- Update:
- For all incorrectly classified ones:
- $w_{new} = w_{new} + \eta d x$
- d = 1, if it needs to be on upper side
- d = 0, if it needs to be on lower side