source: orange/Orange/doc/modules/bayes.py @ 9671:a7b056375472

Revision 9671:a7b056375472, 414 bytes checked in by anze <anze.staric@…>, 2 years ago (diff)

Moved orange to Orange (part 2)

Line 
1import orange, orngBayes, orngTest, orngStat
2
3data = orange.ExampleTable("lung-cancer")
4
5bayes = orngBayes.BayesLearner()
6bayes_m = orngBayes.BayesLearner(m=2)
7
8res = orngTest.crossValidation([bayes, bayes_m], data)
9CAs = orngStat.CA(res)
10print
11print "Without m: %5.3f" % CAs[0]
12print "With m=2: %5.3f" % CAs[1]
13
14data = orange.ExampleTable("voting")
15model = orngBayes.BayesLearner(data)
16orngBayes.printModel(model)
Note: See TracBrowser for help on using the repository browser.