SOM Toolbox Online documentation


[hits,ninvalid] = hits(bmus, mmax, values)

HITS Calculate number of occurances of each value.

 hits = hits(bmus,[mmax],[values])

   h = hits(bmus);
   h = hits(bmus,length(sM.codebook)); 

  Input and output arguments ([]'s are optional): 
   bmus     (vector) BMU indeces (or other similar) 
   [mmax]   (scalar) maximum index, default value max(bmus)
            (struct) map or topology struct from where the maximum
                     index is acquired
   [values] (vector) values associated with the data (default = 1)

   hits     (vector) the number of occurances of each index
                     (or if values are given, their sum for each index)
   ninvalid (scalar) number of invalid indeces (NaN, Inf or 
                     <=0 or > mmax)

 See also SOM_HITS, SOM_BMUS.    

[ SOM Toolbox online doc ]