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

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

Tutorial documentation structure.

Line 
1# Description: Test of naive bayesian classifier with entropy-based discretization (as defined in nbdisc.py)
2# Category:    modelling
3# Uses:        iris.tab
4# Classes:     orngTest.crossValidation, orngStat.CA
5# Referenced:  c_nb_disc.htm
6
7import orange, orngTest, orngStat, nbdisc
8data = orange.ExampleTable("iris")
9results = orngTest.crossValidation([nbdisc.Learner()], data, folds=10)
10print "Accuracy = %5.3f" % orngStat.CA(results)[0]
Note: See TracBrowser for help on using the repository browser.