## Documentation Center |

Perceptron

`perceptron(hardlimitTF,perceptronLF)`

Perceptrons are simple single-layer binary classifiers, which divide the input space with a linear decision boundary.

Perceptrons are provide for historical interest. For much better
results use `patternnet`, which
can solve non-linearly separable problems. Sometimes when people refer
to perceptrons they are referring to feed-forward pattern recognition
networks, such as `patternnet`. But the original
perceptron, described here, can solve only very simple problems.

Perceptrons can learn to solve a narrow class of classification problems. Their significance is they have a simple learning rule and were one of the first neural networks to reliably solve a given class of problems.

`perceptron(hardlimitTF,perceptronLF)` takes
these arguments,

hardlimitTF | Hard limit transfer function (default = |

perceptronLF | Perceptron learning rule (default = |

and returns a perceptron.

In addition to the default hard limit transfer functions, perceptrons
can be created with the `hardlims` transfer
function. The other option for the perceptron learning rule is `learnpn`.

Here a perceptron is used to solve a very simple classification logical-OR problem.

x = [0 0 1 1; 0 1 0 1]; t = [0 1 1 1]; net = perceptron; net = train(net,x,t); view(net) y = net(x);

`narnet` | `narxnet` | `preparets` | `removedelay` | `timedelaynet`

Was this topic helpful?