Ignore:
Timestamp:
01/30/12 15:56:42 (2 years ago)
Author:
Lan Zagar <lan.zagar@…>
Branch:
default
rebase_source:
617477fff7508c5dfbbaf584e3c6a0554963a672
Message:

Added a multitarget data set and expanded documentation.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • docs/reference/rst/code/multitarget.py

    r9534 r9604  
    11import Orange 
    2 data = Orange.data.Table('test-pls') 
    3 print 'Actual classes:\n', data[0].get_classes() 
     2data = Orange.data.Table('multitarget-synthetic') 
     3print 'Features:', data.domain.features 
     4print 'Classes:', data.domain.class_vars 
     5print 'First instance:', data[0] 
     6print 'Actual classes:', data[0].get_classes() 
    47 
    58majority = Orange.classification.majority.MajorityLearner() 
    69mt_majority = Orange.multitarget.MultitargetLearner(majority) 
    7 c_mtm = mt_majority(data) 
    8 print 'Majority predictions:\n', c_mtm(data[0]) 
     10c_majority = mt_majority(data) 
     11print 'Majority predictions:\n', c_majority(data[0]) 
     12 
     13pls = Orange.multitarget.pls.PLSRegressionLearner() 
     14c_pls = pls(data) 
     15print 'PLS predictions:\n', c_pls(data[0]) 
    916 
    1017mt_tree = Orange.multitarget.tree.MultiTreeLearner(max_depth=3) 
    11 c_mtt = mt_tree(data) 
    12 print 'Multi-target Tree predictions:\n', c_mtt(data[0]) 
     18c_tree = mt_tree(data) 
     19print 'Multi-target Tree predictions:\n', c_tree(data[0]) 
Note: See TracChangeset for help on using the changeset viewer.