source: orange/docs/reference/rst/code/multitarget.py @ 9534:2fb4bdb46798

Revision 9534:2fb4bdb46798, 441 bytes checked in by lanz <lan.zagar@…>, 2 years ago (diff)

Documentation for Orange.multitarget.tree.

Line 
1import Orange
2data = Orange.data.Table('test-pls')
3print 'Actual classes:\n', data[0].get_classes()
4
5majority = Orange.classification.majority.MajorityLearner()
6mt_majority = Orange.multitarget.MultitargetLearner(majority)
7c_mtm = mt_majority(data)
8print 'Majority predictions:\n', c_mtm(data[0])
9
10mt_tree = Orange.multitarget.tree.MultiTreeLearner(max_depth=3)
11c_mtt = mt_tree(data)
12print 'Multi-target Tree predictions:\n', c_mtt(data[0])
Note: See TracBrowser for help on using the repository browser.