Perceptron

Structure

A perceptron is

  • a single-layer neural network
  • used for supervised learning of binary classifiers
Perceptron

Perceptron

$$ 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$