SOM Toolbox | Online documentation | http://www.cis.hut.fi/projects/somtoolbox/ |
Col = som_coloring(sM,ncol,chaingap,dw)
SOM_COLORING Make a SOM-based coloring for given data/map. Col = som_coloring(sM,[ncol],[chaingap],[dw]) Col = som_coloring(sM,5); som_show(sM,'color',Col); Input and output arguments ([]'s are optional): sM (struct) map or data struct (matrix) data matrix [ncol] (scalar) number of colors to use [chaingap] (scalar) size of gap in the color circle (see below), 0.1 by default [dw] (scalar) 1 = use input space distances to stretch the color circle (default) 0 = don't use Col (matrix) color for each data/codebook vector This function trains a 1-dimensional SOM using the input data (codebook of a SOM, or a set of data vectors). A color from the color circle (see HSV function) is associated with each map unit, and each data/codebook vector of the input data picks its color from its BMU on the 1-dimensional SOM. If the chaingap argument == 0, the 1-dimensional map has a cylinder (in effect, a ring) topology. Otherwise, the topology is rectangular (in effect, a chain). The colors are mapped to the 1-dimensional SOM simply by picking colors from the color circle. If chaingap>0, a slice of the color circle is removed before map units pick their colors from it. This creates a discontiuity in the coloring at the ends of the 1-dimensional SOM. If the dw argument == 0, the colors are picked from the color circle equidistantly. If not, the distances between the prototype vectors in the 1-dimensional SOM are taken into account. See also SOM_KMEANSCOLOR, SOM_KMEANSCOLOR2, SOM_FUZZYCOLOR.