source: orange/docs/reference/rst/code/svm-easy.py @ 10435:b4a8e52336bb

Revision 10435:b4a8e52336bb, 510 bytes checked in by anzeh <anze.staric@…>, 2 years ago (diff)

Changed documentation example with a faster one.

Line 
1from Orange import data
2from Orange.classification import svm
3
4vehicle = data.Table("vehicle.tab")
5
6svm_easy = svm.SVMLearnerEasy(name="svm easy", folds=3)
7svm_normal = svm.SVMLearner(name="svm")
8learners = [svm_easy, svm_normal]
9
10from Orange.evaluation import testing, scoring
11
12results = testing.proportion_test(learners, vehicle, times=1)
13print "Name     CA        AUC"
14for learner,CA,AUC in zip(learners, scoring.CA(results), scoring.AUC(results)):
15    print "%-8s %.2f      %.2f" % (learner.name, CA, AUC)
Note: See TracBrowser for help on using the repository browser.