SOM Toolbox Online documentation http://www.cis.hut.fi/projects/somtoolbox/

som_distortion3

[Err,sPropTotal,sPropMunits,sPropComps] = som_distortion3(sM,D,rad)

SOM_DISTORTION3 Map distortion measures.
  
 [sE,Err] = som_distortion3(sM,[D],[rad]);
 
  sE = som_distortion3(sM); 

  Input and output arguments ([]'s are optional): 
   sM          (struct) map struct
   [D]         (matrix) a matrix, size dlen x dim
               (struct) data or map struct
                        by default the map struct is used
   [rad]       (scalar) neighborhood radius, looked from sM.trainhist
                        by default, or = 1 if that has no valid values
                           
   Err         (matrix) size munits x dim x 3
                        distortion error elements (quantization error, 
                        neighborhood bias, and neighborhood variance)
                        for each map unit and component
   sPropTotal  (struct) .n   = length of data
                        .h   = mean neighborhood function value
                        .err = errors
   sPropMunits (struct) .Ni  = hits per map unit
                        .Hi  = sum of neighborhood values for each map unit
                        .Err = errors per map unit
   sPropComps  (struct) .e1  = total squared distance to centroid
                        .eq  = total squared distance to BMU
                        .Err = errors per component

 See also  SOM_QUALITY.



[ SOM Toolbox online doc ]