How to visualize Umatrix in SOM?

3 views (last 30 days)
AS
AS on 15 Feb 2020
Hi, I am learning SOM for Umatrix representation. When I plot Umatrix, I am getting reverse representation of it. Higher color values showing Class and Lower values are showing boundary. I want to make it reverse. I am attaching the figure, where the higher values in colorbar representing separate class and dark blue is showing separation between classes. I want to get reverse, so that lower values will show class.
D=data;
D1 = som_normalize(D, 'range');
smI=som_lininit(D1, 'msize',[17 17], 'lattice', 'rect', 'shape', 'sheet');
smR=som_batchtrain(smI, D, 'radius',[7 2], 'trainlen',2500, 'neigh', 'gaussian');
sMap=som_batchtrain(smR, D1, 'radius',[2 2], 'trainlen', 1500, 'neigh', 'gaussian');
colormap(jet)
caxis([1 5])
Y=som_show(sMap, 'umat', 'all');
X=flipud(Y);
M=sMap.codebook;
Is there anybody can help me fix this?

Answers (0)

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!