source: orange/docs/reference/rst/code/som-classifier.py @ 9372:aef193695ea9

Revision 9372:aef193695ea9, 464 bytes checked in by mitar, 2 years ago (diff)

Moved documentation to the separate directory.

Line 
1# Description: Self Organizing Maps on iris data set
2# Category:    projection
3# Uses:        iris
4# Referenced:  Orange.projection.som
5# Classes:     Orange.projection.som.SOMLearner
6
7import Orange
8import random
9learner = Orange.projection.som.SOMSupervisedLearner(map_shape=(4, 4))
10data = Orange.data.Table("iris.tab")
11classifier = learner(data)
12random.seed(50)
13for d in random.sample(data, 5):
14    print "%-15s originally %-15s" % (classifier(d), d.getclass())
Note: See TracBrowser for help on using the repository browser.