コード例 #1
0
# drawtype="rbg" tries to draw colors on map - needs an input data with 3 vectors

# drawtype="black-white" draws black-white
# drawtype="networkx" graph drawing using the networkx library
# drawtype="None" - default draws empty space

# Also there is networkx graph drawing

# labels=True or False draws labels on the map... labels are necessary...

# draw_every_epoch=0 Don't draw anything
# draw_every_epoch=10 draw every 10 epochs
# -

map1.impact_matrix

labels = True
drawtype = "rbg"

# +
# Going through a large cycle combining of number of iteration whole cycles

map1.large_cycle(draw_every_epoch=100, drawtype=drawtype)
# -

# Drawing all the history
plt.rcParams['figure.dpi'] = 150
map1.draw_all(drawtype, labels=labels)

map1.draw_all(drawtype="networkx", labels=labels)
コード例 #2
0
ファイル: classic_som.py プロジェクト: maxuw/som-with-graphs
# +
# ### Drawing configuration

# drawtype="rbg" tries to draw colors on map - needs an input data with 3 dimensions or columns (colors)

# drawtype="black-white" draws black-white - needs an input data with one dimension or column (gray_colors)
# drawtype="networkx" graph drawing using the networkx library
# drawtype="None" - default draws empty space

# Also there is networkx graph drawing

# labels=True or False draws labels on the map... labels are necessary...

# draw_every_epoch=0 Don't draw anything
# draw_every_epoch=10 draw every 10 epochs
# -

labels = True
drawtype = "rbg"

# +
# Going through a large cycle combining of number of iteration whole cycles

map1.large_cycle(draw_every_epoch=100, drawtype=drawtype)
# -

# Drawing all the history
plt.rcParams['figure.dpi'] = 150
map1.draw_all(drawtype, labels=labels)