> For the complete documentation index, see [llms.txt](https://ykkim.gitbook.io/dlip/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://ykkim.gitbook.io/dlip/deep-learning-for-perception/notes/perceptron.md).

# Perceptron

updated

## What is a Perceptron?

A Perceptron is an algorithm used for [supervised learning](https://deepai.org/machine-learning-glossary-and-terms/supervised-learning) of binary [classifiers](https://deepai.org/machine-learning-glossary-and-terms/classifier). It is a single layer neural network and a multi-layer perceptron is called Neural Networks.

* [A short description](https://deepai.org/machine-learning-glossary-and-terms/perceptron)
* [Neural Representation of AND, OR, NOT, XOR and XNOR Logic Gates](https://medium.com/@stanleydukor/neural-representation-of-and-or-not-xor-and-xnor-logic-gates-perceptron-algorithm-b0275375fea1)

## How it works

Binary classifier for Predict y = 1 if Wx+b > 0 , otherwise y=0

![](https://3883264845-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-MR8tEAjhiC8uN1kHR2J%2Fuploads%2Fgit-blob-f0a10869a5f282534a1d1ee2fcbb9f461e72441b%2Fimage%20\(216\).png?alt=media)

The perceptron consists of 4 parts.

1. Input values or One input layer
2. Weights and Bias
3. Net sum
4. [Activation Function](https://medium.com/towards-data-science/activation-functions-neural-networks-1cbd9f8d91d6)

**Weights** shows the strength of the particular node.

**A bias** value allows you to shift the activation function curve up or down.

**Activation Function** scales output (0,1) or (-1,1)

![](https://3883264845-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-MR8tEAjhiC8uN1kHR2J%2Fuploads%2Fgit-blob-e7c22c41348eed82ec29340684e75b40ed29503a%2Fimage%20\(223\)%20\(4\)%20\(4\)%20\(4\)%20\(2\).png?alt=media)

## Multi-Layer Perceptron

![](https://3883264845-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-MR8tEAjhiC8uN1kHR2J%2Fuploads%2Fgit-blob-e7c22c41348eed82ec29340684e75b40ed29503a%2Fimage%20\(223\)%20\(4\)%20\(4\)%20\(4\)%20\(2\).png?alt=media)

## Multi-Layer Perceptron

![](https://3883264845-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-MR8tEAjhiC8uN1kHR2J%2Fuploads%2Fgit-blob-d728858660fe9b4dc18e1ce828bc9b5e2fdc75e5%2Fimage%20\(219\).png?alt=media)

![](https://3883264845-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-MR8tEAjhiC8uN1kHR2J%2Fuploads%2Fgit-blob-fd336520d106969ca3f533f9eb6ef02195e74720%2Fimage%20\(215\).png?alt=media)

![](https://3883264845-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-MR8tEAjhiC8uN1kHR2J%2Fuploads%2Fgit-blob-0ca74fa98b30eeadfe6c4e05215658224dcfc90d%2Fimage%20\(221\).png?alt=media)

![](https://3883264845-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-MR8tEAjhiC8uN1kHR2J%2Fuploads%2Fgit-blob-da51cd5211f90befea08e6831059d5d32d2b6a48%2Fimage%20\(217\).png?alt=media)

Since we cannot express XOR with a single Perceptron, we can construct a network of Perceptron or **Multi-Layer Perceptron**

![](https://3883264845-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-MR8tEAjhiC8uN1kHR2J%2Fuploads%2Fgit-blob-de0711ffd046b5ddcdc6ad7f0187bbacf2bd5b27%2Fimage%20\(222\).png?alt=media)

Using the previous AND, NAND, OR gates with perceptrons, we can build **XOR**

![](https://3883264845-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-MR8tEAjhiC8uN1kHR2J%2Fuploads%2Fgit-blob-779d97415f32ddb656ebe68490e63c7d1c208fae%2Fimage%20\(220\).png?alt=media)

## Activation Function
