Changeset 7280:6e6f2a60dd8e in orange


Ignore:
Timestamp:
02/03/11 00:06:35 (3 years ago)
Author:
blaz <blaz.zupan@…>
Branch:
default
Convert:
4f8bf052a083d1df6d02d84ce217b86c8c9a8044
Message:

minor update

File:
1 edited

Legend:

Unmodified
Added
Removed
  • orange/doc/Orange/rst/code/som-mapping.py

    r7276 r7280  
    66 
    77import Orange 
    8 som = Orange.projection.som.SOMLearner(map_shape=(10, 20), initialize=Orange.projection.som.InitializeRandom) 
     8som = Orange.projection.som.SOMLearner(map_shape=(3, 3), initialize=Orange.projection.som.InitializeRandom) 
    99map = som(Orange.data.Table("iris.tab")) 
    10 for n in map: 
    11     print "node:", n.pos[0], n.pos[1] 
    12     for e in n.examples: 
    13         print "\t",e 
     10 
     11print "Node    Instances" 
     12print "\n".join(["%s  %d" % (str(n.pos), len(n.examples)) for n in map]) 
     13 
     14i, j = 1, 2 
     15print 
     16print "Data instances in cell (%d, %d):" % (i, j) 
     17for e in map[i, j].examples: 
     18    print e 
Note: See TracChangeset for help on using the changeset viewer.