Neural Network Toolbox |
Self-Organizing Map Functions
There are two kinds of functions that control how neurons in self-organizing maps respond. They are topology and distance functions.
Topology Functions
Topology functions calculate the positions of a layer's neurons given its dimensions.
Once defined, you can assign your topology function to any layer of a network. For example, the following line of code assigns the topology function yourtopf
to the second layer of a network.
Your topology function is used whenever your network is trained or adapts.
To be a valid topology function your function must calculate positions pos
from dimensions dim
as follows,
dimi
is the number of neurons along the ith dimension of the layer.
pos
is an matrix of S position vectors, where S is the total number of neurons that is defined by the product dim1*dim1*...*dimN
.
The toolbox contains an example custom topology function called mytopf
. Enter the following lines of code to see how it is used.
If you type that code, you get the following plot.
Enter the following command to see how mytf
is implemented.
You can use mytopf
as a template to create your own topology function.
Distance Functions
Distance functions calculate the distances of a layer's neurons given their position.
Once defined, you can assign your distance function to any layer of a network. For example, the following line of code assigns the topology function yourdistf
to the second layer of a network.
Your distance function is used whenever your network is trained or adapts.
To be a valid distance function, it must calculate distances d
from position pos
as follows,
The toolbox contains an example custom distance function called mydistf
. Enter the following lines of code to see how it is used.
Enter the following command to see how mytf
is implemented.
You can use mydistf
as a template to create your own distance function.
Learning Functions | Network Object Reference |
© 1994-2005 The MathWorks, Inc.