Ignore:
Timestamp:
05/04/12 18:07:12 (2 years ago)
Author:
Lan Zagar <lan.zagar@…>
Branch:
default
Message:

Reimplemented lasso. Breaks compatibility.

It now uses a proximal gradient method for optimization instead of using scipy.optimize (see #1118).
The formulation is slightly different so there are new parameters (mainly lasso_lambda instead of t/s).
Improved some other things as well.

File:
1 edited

Legend:

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

    r10042 r10859  
    88 
    99housing = Orange.data.Table("housing") 
    10 learner = Orange.regression.lasso.LassoRegressionLearner() 
     10learner = Orange.regression.lasso.LassoRegressionLearner( 
     11    lasso_lambda=1, n_boot=100, n_perm=100) 
    1112classifier = learner(housing) 
    1213 
    13 # prediction for five data instances and comparison to actual values 
     14# prediction for five data instances 
    1415for ins in housing[:5]: 
    15     print "Actual: %3.2f, predicted: %3.2f " % (ins.get_class(), classifier(ins)) 
     16    print "Actual: %3.2f, predicted: %3.2f" % ( 
     17        ins.get_class(), classifier(ins)) 
    1618 
    1719print classifier 
    18  
Note: See TracChangeset for help on using the changeset viewer.