Mercurial > hg > camir-aes2014
annotate toolboxes/FullBNT-1.0.7/netlab3.3/sompak.m @ 0:e9a9cd732c1e tip
first hg version after svn
author | wolffd |
---|---|
date | Tue, 10 Feb 2015 15:05:51 +0000 |
parents | |
children |
rev | line source |
---|---|
wolffd@0 | 1 function [c] = sompak(net) |
wolffd@0 | 2 %SOMPAK Combines node weights into one weights matrix. |
wolffd@0 | 3 % |
wolffd@0 | 4 % Description |
wolffd@0 | 5 % C = SOMPAK(NET) takes a SOM data structure NET and combines the node |
wolffd@0 | 6 % weights into a matrix of centres C where each row represents the node |
wolffd@0 | 7 % vector. |
wolffd@0 | 8 % |
wolffd@0 | 9 % The ordering of the parameters in W is defined by the indexing of the |
wolffd@0 | 10 % multi-dimensional array NET.MAP. |
wolffd@0 | 11 % |
wolffd@0 | 12 % See also |
wolffd@0 | 13 % SOM, SOMUNPAK |
wolffd@0 | 14 % |
wolffd@0 | 15 |
wolffd@0 | 16 % Copyright (c) Ian T Nabney (1996-2001) |
wolffd@0 | 17 |
wolffd@0 | 18 errstring = consist(net, 'som'); |
wolffd@0 | 19 if ~isempty(errstring) |
wolffd@0 | 20 error(errstring); |
wolffd@0 | 21 end |
wolffd@0 | 22 % Returns map as a sequence of row vectors |
wolffd@0 | 23 c = (reshape(net.map, net.nin, net.num_nodes))'; |