source: orange/Orange/testing/regression/tests_20/modules_som1.py @ 9952:986e9cd806f4

Revision 9952:986e9cd806f4, 412 bytes checked in by Miha Stajdohar <miha.stajdohar@…>, 2 years ago (diff)

Tests moved and renamed from orange 20.

Line 
1# Description: Self Organizing Maps on iris data set
2# Category:    modelling
3# Uses:        iris
4# Referenced:  orngSOM.htm
5# Classes:     orngSOM.SOMLearner
6
7import orngSOM
8import orange
9som = orngSOM.SOMLearner(map_shape=(10, 20), initialize=orngSOM.InitializeRandom)
10map = som(orange.ExampleTable("iris.tab"))
11for n in map:
12    print "node:", n.pos[0], n.pos[1]
13    for e in n.examples:
14        print "\t",e
Note: See TracBrowser for help on using the repository browser.