⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 som_bmus.html

📁 Kohonen的SOM软件包
💻 HTML
字号:
<!DOCTYPE HTML PUBLIC "-//IETF//DTD HTML//EN"><html><head><title>SOM Toolbox / som_bmus </title></head><body bgcolor=#f0f0f0><table border=0 width="100%" cellpadding=0 cellspacing=0><tr><td valign=baseline><font size=+2>SOM Toolbox</font></td><td valign=baseline align=center><a href="somtoolbox.html">Online documentation</td><td valign=baseline align=right><a href="http://www.cis.hut.fi/projects/somtoolbox/" target="_top">http://www.cis.hut.fi/projects/somtoolbox/</a></td></tr></table><hr><H1> som_bmus </H1><H3> Purpose </H3><PRE> Finds Best-Matching Units (BMUs) for given data vector from a given map.</PRE><H3> Syntax </H3><UL><PRE>  Bmus = som_bmus(sMap, sData)  Bmus = som_bmus(..., which)  Bmus = som_bmus(..., which, mask)  [Bmus, Qerrs] = som_bmus(...)</PRE></UL><H3> Description </H3><PRE> Returns the indexes and corresponding quantization errors of the vectors in sMap that best matched the vectors in sData. By default only the index of the best matching unit (/vector) is returned, but the 'which' argument can be used to get others as well. For example it might be desirable to get also second- and third-best matching units as well (which = [1:3]).  A mask can be used to weight the search process. The mask is used to weight the influence of components in the distance calculation, as follows:    distance(x,y) = (x-y)' diag(mask) (x-y) where x and y are two vectors, and diag(mask) is a diagonal matrix with  the elements of mask vector on the diagonal.  The vectors in the data set (sData) can contain unknown components (NaNs), but the map (sMap) cannot. If there are completely empty vectors (all NaNs), the returned BMUs and quantization errors for those  vectors are NaNs.</PRE><H3> Required input arguments </H3><PRE>   sMap              The vectors from among which the BMUs are searched                     for. These must not have any unknown components (NaNs).            (struct) map struct            (matrix) codebook matrix, size munits x dim   sData             The data vector(s) for which the BMUs are searched.            (struct) data struct            (matrix) data matrix, size dlen x dim</PRE><H3> Optional input arguments </H3><PRE>   which    (vector) which BMUs are returned,                      by default only the best (ie. which = [1])            (string) 'all', 'best' or 'worst' meaning [1:munits],                     [1] and [munits] respectively     mask     (vector) mask vector to be used in BMU search,                      by default sMap.mask, or ones(dim,1) in case                     a matrix was given</PRE><H3> Output arguments </H3><PRE>   Bmus     (matrix) the requested BMUs for each data vector,                      size dlen x length(which)   Qerrors  (matrix) the corresponding quantization errors,                      size equal to that of Bmus</PRE><H3> Examples </H3><PRE> Simplest case:  bmu = som_bmus(sM, [0.3 -0.4 1.0]);           % 3-dimensional data, returns BMU for vector [0.3 -0.4 1]  bmu = som_bmus(sM, [0.3 -0.4 1.0], [3 5]);           % as above, except returns the 3rd and 5th BMUs  bmu = som_bmus(sM, [0.3 -0.4 1.0], [], [1 0 1]);           % as above, except ignores second component in searching  [bmus qerrs] = som_bmus(sM, D);           % returns BMUs and corresponding quantization errors            % for each vector in D  bmus = som_bmus(sM, sD);           % returns BMUs for each vector in sD using the mask in sM</PRE><H3> See also </H3><TABLE NOBORDER WIDTH=80%><TR><TD><a href="som_quality.html"><B>som_quality</B></a><TD> Measure the quantization and topographic error of a SOM.</TABLE><p><hr><br><br><!-- Last updated: May 30 2002 --></body></html>

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -