source: orange/docs/reference/rst/code/svm-easy.py @ 9823:7f9c3f3c6474

Revision 9823:7f9c3f3c6474, 511 bytes checked in by lanumek, 2 years ago (diff)

Changed names of data sets (table replaced with data or name of the data set).

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.cross_validation(learners, vehicle, folds=5)
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.