Changes from version 1 to version 2

Version 2 of SOM Toolbox is considerably different from version 1. The major changes are in structs, preprocessing and visualization. Then there are a number of minor changes in the way the functions work, in the names of the functions, and in values of default parameters. In addition, there are a lot of new auxiliary functions.

Changes in structs

The most essential changes are in the structs. Therefore, two functions have been provided som_vs2to1 and som_vs1to2 which can be used to convert between version 1 and 2 structs.

Map struct

The changes in the map struct are:
  • the shape of .codebook matrix has been changed from [ydim x xdim x ... zdim x dim] to [munits x dim]. The change is the same as the one performed by the reshape function.
  • the shape of .labels cell array has been changed correspondingly. It is no longer a cell array of cell strings of size [ydim x xdim x ... zdim] but a cell array of strings of size [munits x ml] where ml is the maximum number of labels in a single map unit.
  • the topology information (fields .msize, .lattice and .shape) have been moved from the map struct to a separate topology struct (see below). The map struct has a field .topol which contains this struct.
  • fields .init_type, .train_type and .data_name have been removed, and the field .train_sequence has been changed to field .trainhist which contains an array of training structs (see below).
  • field .normalization field has been replaced with .comp_norm which contains a cell array of length dim, one for each variable. Each cell contains a struct array of normalization structs (see below).

Data struct

The changes in the data struct are:
  • field .normalization field has been replaced with .comp_norm which contains a cell array of length dim, one for each variable. Each cell contains a struct array of normalization struct (see below).
  • field .label_names has been added. This contains the names of the label-variables.

Topology struct

This is a new struct, which contains the fields .msize, .lattice and .shape previously part of map struct. There's also a change in the values that the .shape field can get. The value 'rect' referring to the shape of the map has been changed to 'sheet'.

Training struct

There are a number of changes in the contents of this struct. Field .data_name from map struct has been brought here, and fields .neigh and .mask have been copied here (also from map struct).

Normalization struct

The normalization struct now has normalization information for only one variable (as opposed to version 1, when it had information on all variables). For further information see notes on preprocessing below.

Preprocessing

The functions involved with preprocessing have completely changed. Instead of som_normalize_data and som_denormalize_data, the functions are som_normalize, som_denormalize and som_norm_variable. The functions som_normalize and som_denormalize envelope the operations of adding and removing normalization operations to data and map structs, and call som_norm_variable to do the actual work.

Function som_norm_variable performs normalization operations for a single variable at a time. The possible actions are 'init', 'do' and 'undo', and the possible normalization operations are 'var', 'range', 'log', 'histD' and 'histC'. Of these 'var' equals 'som_var_norm', 'range' equals 'som_lin_norm' and 'histD' equals 'som_hist_norm' of version 1. Normalization of vectors to unit length ('som_unit_norm') is not implemented in version 2. New normalization operations in version 2 are 'log' and 'histC'.

Function names

Version 1 function Version 2 function
som_addhits som_show_add
som_addlabels som_show_add
som_addtraj som_show_add
som_cca cca
som_clear som_show_clear
som_create som_map_struct
som_demo -
som_denormalize_data som_denormalize
som_divide -
som_doit -
som_figuredata -
som_init som_make
som_train som_make
som_normalize_data som_normalize
som_pca pcaproj
som_manualclassify som_select
som_name -
som_plane som_cplane
som_plane3 -
som_planeH som_cplane
som_planeL som_grid
som_planeT -
som_planeU som_cplane
som_profile som_plotplane
som_projection -
som_sammon sammon
som_showgrid som_grid
som_showtitle som_footnote
som_showtitleButtonDownFcn som_footnoteButtonDownFcn
som_trainops -
som_unit_distances som_unit_dists
som_unit_neighborhood som_neighborhood
somui_it som_gui
somui_vis -

Performance

In version 1, the relative performance of sequential, batch and SOM_PAK algorithms were: 23:1.3:1. Now the relative performance is 3:1.2:1. The speed of batch training has not improved that much, but its memory consumption is only fractions of what it was before.



http://www.cis.hut.fi/projects/somtoolbox/documentation/vs1vs2.shtml
somtlbx@mail.cis.hut.fi
Monday, 09-Oct-2000 12:53:06 EEST