source: orange/Orange/doc/reference/linear-learner.py @ 9671:a7b056375472

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

Moved orange to Orange (part 2)

Line 
1import orange
2
3data = orange.ExampleTable("iris")
4classifier = orange.LinearLearner(data)
5
6for i, cls_name in enumerate(data.domain.classVar.values):
7    print "Attribute weights for %s vs. rest classification:\n\t" % cls_name,
8    for attr, w in  zip(data.domain.attributes, classifier.weights[i]):
9        print "%s: %.3f " % (attr.name, w),
10    print
Note: See TracBrowser for help on using the repository browser.