wolffd@0: function [c] = sompak(net) wolffd@0: %SOMPAK Combines node weights into one weights matrix. wolffd@0: % wolffd@0: % Description wolffd@0: % C = SOMPAK(NET) takes a SOM data structure NET and combines the node wolffd@0: % weights into a matrix of centres C where each row represents the node wolffd@0: % vector. wolffd@0: % wolffd@0: % The ordering of the parameters in W is defined by the indexing of the wolffd@0: % multi-dimensional array NET.MAP. wolffd@0: % wolffd@0: % See also wolffd@0: % SOM, SOMUNPAK wolffd@0: % wolffd@0: wolffd@0: % Copyright (c) Ian T Nabney (1996-2001) wolffd@0: wolffd@0: errstring = consist(net, 'som'); wolffd@0: if ~isempty(errstring) wolffd@0: error(errstring); wolffd@0: end wolffd@0: % Returns map as a sequence of row vectors wolffd@0: c = (reshape(net.map, net.nin, net.num_nodes))';