som1.py
来自「orange源码 数据挖掘技术」· Python 代码 · 共 15 行
PY
15 行
# Description: Self Organizing Maps on iris data set
# Category: modelling
# Uses: iris
# Referenced: orngSOM.htm
# Classes: orngSOM.SOMLearner
import orngSOM
import orange
l=orngSOM.SOMLearner(xDim=5, yDim=10, parameters=[{"iterations":1000, "radius":5, "alpha":0.02},{"iterations":10000, "alpha":0.05}]) #radius in the second phase will be the same as in the first
c=l(orange.ExampleTable("iris.tab"))
for n in c.nodes:
print "node:", n.x,n.y
for e in n.examples:
print "\t",e
⌨️ 快捷键说明
复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?