source: orange/docs/reference/rst/code/pls-example.py @ 9612:4a74a19879a1

Revision 9612:4a74a19879a1, 477 bytes checked in by Lan Zagar <lan.zagar@…>, 2 years ago (diff)

PLS documentation updated.

Line 
1import Orange
2
3data = Orange.data.Table("multitarget-synthetic.tab")
4print "Input variables:    ", data.domain.features
5print "Response variables: ", data.domain.class_vars
6   
7learner = Orange.multitarget.pls.PLSRegressionLearner()
8classifier = learner(data)
9
10print "Prediction for the first 2 data instances: \n" 
11for d in data[:2]:
12    print "Actual    ", d.get_classes()
13    print "Predicted ", classifier(d)
14    print 
15
16print 'Regression coefficients:\n', classifier   
Note: See TracBrowser for help on using the repository browser.