Perceptron
Structure
A perceptron is
- a single-layer neural network
- used for supervised learning of binary classifiers
$$ g(x) = \underbrace{\sum_{i=0}^n w_i x_i}_{\text{linear separator}} + \underbrace{w_0}_{\text{offset/bias}} $$
Decision for classification $$ \hat{y} = \begin{cases} 1 &\text{if } g(x) > 0 \\ -1 &\text{else}\end{cases} $$
Update Rule
$w=w+y x$ if prediction is wrong
If label $y=1$ but predict $\hat{y}=-1$: $w = w + x$
If label $y=-1$ but predict $\hat{y}=1$: $w = w - x$