source: orange/Orange/testing/regression/tests_20/modules_bayes.py @ 9952:986e9cd806f4

Revision 9952:986e9cd806f4, 414 bytes checked in by Miha Stajdohar <miha.stajdohar@…>, 2 years ago (diff)

Tests moved and renamed from orange 20.

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.