| SOM Toolbox | Online documentation | http://www.cis.hut.fi/projects/somtoolbox/ |
Ne = som_neighbors(sM,neigh)
Ne = som_neighbors(sM,neigh)
sM (struct) map or data struct
(matrix) data matrix, size n x dim
[neigh] (string) 'kNN' or 'Nk' (which is valid for a SOM only)
for example '6NN' or 'N1'
default is '10NN' for a data set and 'N1' for SOM
Ne (matrix) size n x n, a sparse matrix
indicating the neighbors of each sample by value 1
(note: the unit itself also has value 0)