Ignore:
Timestamp:
02/06/12 17:39:53 (2 years ago)
Author:
lanumek
Branch:
default
rebase_source:
aeea356a746ae91cb578766fe56376f160e20257
Message:

documentation for regression: lasso, linear, pls

File:
1 edited

Legend:

Unmodified
Added
Removed
  • docs/reference/rst/code/linear-example.py

    r9638 r9776  
    1111classifier = learner(housing) 
    1212 
     13# prediction for five data instances and comparison to actual values 
    1314for ins in housing[:5]: 
    14     print classifier(ins) 
     15    print "Actual: %3.2f, predicted: %3.2f " % (ins.get_class(), classifier(ins)) 
    1516 
    16 print classifier     
     17print classifier 
     18 
     19# stepwise regression 
     20learner2 = Orange.regression.linear.LinearRegressionLearner(stepwise=True, 
     21                                                           add_sig=0.05, 
     22                                                           remove_sig=0.2) 
     23classifier = learner2(housing) 
     24 
     25print classifier 
     26 
Note: See TracChangeset for help on using the changeset viewer.