Neural Network Toolbox Previous page   Next Page
compet

Competitive transfer function

Graph and Symbol

Syntax

A = compet(N)

info = compet(code)

Description

compet is a transfer function. Transfer functions calculate a layer's output from its net input.

compet(N) takes one input argument,

and returns output vectors with 1 where each net input vector has its maximum value, and 0 elsewhere.

compet(code) returns information about this function.

These codes are defined:

compet does not have a derivative function

In many network paradigms it is useful to have a layer whose neurons compete for the ability to output a 1. In biology this is done by strong inhibitory connections between each of the neurons in a layer. The result is that the only neuron that can respond with appreciable output is the neuron whose net input is the highest. All other neurons are inhibited so strongly by the winning neuron that their outputs are negligible.

To model this type of layer efficiently on a computer, a competitive transfer function is often used. Such a function transforms the net input vector of a layer of neurons so that the neuron receiving the greatest net input has an output of 1 and all other neurons have outputs of 0.

Examples

Here we define a net input vector N, calculate the output, and plot both with bar graphs.

Network Use

You can create a standard network that uses compet by calling newc or newpnn.

To change a network so a layer uses compet, set net.layers{i,j}.transferFcn to 'compet'.

In either case, call sim to simulate the network with compet.

See newc or newpnn for simulation examples.

See Also


Previous page  combvec con2seq Next page

© 1994-2005 The MathWorks, Inc.