source: orange/docs/tutorial/rst/code/classifier.py @ 9374:59bac7ddd8a2

Revision 9374:59bac7ddd8a2, 374 bytes checked in by mitar, 2 years ago (diff)

Tutorial documentation structure.

Line 
1# Description: Read data, build naive Bayesian classifier and classify first few instances
2# Category:    modelling
3# Uses:        voting.tab
4# Referenced:  c_basics.htm
5
6import orange
7data = orange.ExampleTable("voting")
8classifier = orange.BayesLearner(data)
9for i in range(5):
10    c = classifier(data[i])
11    print "%d: %s (originally %s)" % (i+1, c, data[i].getclass())
Note: See TracBrowser for help on using the repository browser.