Neural Network Toolbox Previous page   Next Page

Topologies (gridtop, hextop, randtop)

You can specify different topologies for the original neuron locations with the functions gridtop, hextop or randtop.

The gridtop topology starts with neurons in a rectangular grid similar to that shown in the previous figure. For example, suppose that you want a 2-by-3 array of six neurons You can get this with:

Here neuron 1 has the position (0,0); neuron 2 has the position (1,0); neuron 3 had the position (0,1); etc.

Note that had we asked for a gridtop with the arguments reversed we would have gotten a slightly different arrangement.

An 8-by-10 set of neurons in a gridtop topology can be created and plotted with the code shown below

to give the following graph.

As shown, the neurons in the gridtop topology do indeed lie on a grid.

The hextop function creates a similar set of neurons, but they are in a hexagonal pattern. A 2-by-3 pattern of hextop neurons is generated as follows:

Note that hextop is the default pattern for SOFM networks generated with newsom.

An 8-by-10 set of neurons in a hextop topology can be created and plotted with the code shown below.

to give the following graph.

Note the positions of the neurons in a hexagonal arrangement.

Finally, the randtop function creates neurons in an N dimensional random pattern. The following code generates a random pattern of neurons.

An 8-by-10 set of neurons in a randtop topology can be created and plotted with the code shown below

to give the following graph.

For examples, see the help for these topology functions.


Previous page  Self-Organizing Maps Distance Funct. (dist, linkdist, mandist, boxdist) Next page

© 1994-2005 The MathWorks, Inc.