Main Content

plotsom

R2026b

(To be removed) Plot self-organizing map

plotsom will be removed in a future release. For more information, see Transition Legacy Neural Network Code to dlnetwork Workflows.

For advice on updating your code, see Version History.

Syntax

plotsom(pos)
plotsom(W,D,ND)

Description

plotsom(pos) takes one argument,

POS

N-by-S matrix of S N-dimension neural positions

and plots the neuron positions with red dots, linking the neurons within a Euclidean distance of 1.

plotsom(W,D,ND) takes three arguments,

W

S-by-R weight matrix

D

S-by-S distance matrix

ND

Neighborhood distance (default = 1)

and plots the neuron’s weight vectors with connections between weight vectors whose neurons are within a distance of 1.

Examples

Plot Self-Organizing Maps

These examples generate plots of various layer topologies.

pos = hextop([5 6]); 
plotsom(pos)

Neuron positions for a 5-by-6 hextop layer with triangular connections

pos = gridtop([4 5]); 
plotsom(pos)

Neuron positions for a 4-by-5 gridtop layer with rectangular connections

pos = randtop([18 12]); 
plotsom(pos)

Neuron positions for an 18-by-12 randtop layer with irregular connections

pos = gridtop([4 5 2]); 
plotsom(pos)

3-D neuron positions for a 4-by-5-by-2 gridtop layer

pos = hextop([4 4 3]); 
plotsom(pos)

3-D neuron positions for a 4-by-4-by-3 hextop layer

Version History

Introduced before R2006a

collapse all