next up previous contents
Next: Spreading the groups of Up: The Tree-Structured Self-Organizing Map Previous: Getting and setting data

Computing a U-matrix

  

calcumat Compute a U-matrix
-s <som> name of the TS-SOM
-d <data> data for distance computing
-umat <umat> name for the resulting U-matrix data
grpumat U-matrix for groups
-s <som> name of the SOM
-w <weights> prototype data
-c <groups> classified data for the groups
-fout <field-out> resulting field
[-in] within groups, default is between

This command computes a U-matrix for a TS-SOM. <data> should contain those variables of the neurons, which are used for computing the distances between neurons. The result is a data frame <umat> containing the distance information between neurons. The operation creates a data frame that contains one data record for every neuron. The distances between neurons are stored in fields (2 directions tex2html_wrap_inline7519 SOM dimensions). The data frame will be <umat>.data. In addition, the operation stores the minimum and maximum values in each layer in frame <umat>.dminmax. For instructions, how to visualize the U-matrix, see umat (section 7.2.6).

grpumat collects U-matrix distances into one field based on specified groups. If flag -in is not given, then distances between neurons of distinct groups are collected, whereas with the flag only distances between the neurons belonging to the same group are picked.

Example: As an example, three weights rm_w, zn_w and age_w are selected to be the basis of distance computing. Then, a U-matrix is computed and created into a graphic structure. To see the result, run the example `ex7.10' (section 7.2.6).

...
NDA> somtr -d boston -sout s1 -l 5
...
NDA> select umatflds -f s1_W.rm_w s1_W.zn_w s1_W.age_w
NDA> calcumat -s s1 -d umatflds -umat umat1
NDA> ls -fr umat1
 umat1.data
 umat1.data.d_0_0
 umat1.data.d_0_1
 umat1.data.d_1_0
 umat1.data.d_1_1
 umat1.dminmax
 umat1.dminmax.min
 umat1.dminmax.max
# Set graphical presentation
NDA> mkgrp grp1 -s s1
NDA> nsize grp1 -v 1.0
NDA> layer grp1 -l 4
NDA> umat grp1 -umat umat1
...


next up previous contents
Next: Spreading the groups of Up: The Tree-Structured Self-Organizing Map Previous: Getting and setting data

Anssi Lensu
Wed Oct 6 12:57:48 EET DST 1999