source: orange/orange/doc/modules/bayes.py @ 2336:d6fb68fcee8e

Revision 2336:d6fb68fcee8e, 414 bytes checked in by janezd <janez.demsar@…>, 8 years ago (diff)

* empty log message *

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.