diff git a/Orange/regression/lasso.py b/Orange/regression/lasso.py
a

b


66  66  """ 
67  67  
68  68  def __init__(self, name='lasso regression', t=1, s=None, tol=0.001, \ 
69   n_boot=100, n_perm=100, imputer=None, continuizer=None): 
 69  n_boot=0, n_perm=0, imputer=None, continuizer=None): 
70  70  """ 
71  71  :param name: name of the linear model, default 'lasso regression' 
72  72  :type name: string 
… 
… 

139  139  import scipy.optimize 
140  140  
141  141  # objective function to be minimized 
142   objective = lambda beta: numpy.linalg.norm(y  numpy.dot(X, beta)) 
 142  objective = lambda beta: (numpy.sum((y  numpy.dot(X, beta)) ** 2) + 
 143  t * numpy.linalg.norm(beta, 1)) 
143  144  # initial guess for the regression parameters 
144   beta_init = numpy.random.random(m) 
145   # constraints for the regression coefficients 
146   cnstr = lambda beta: t  numpy.sum(numpy.abs(beta)) 
 145  beta_init = numpy.zeros(m) 
147  146  # optimal solution 
148   coefficients = scipy.optimize.fmin_cobyla(objective, beta_init, cnstr, iprint=0) 
149   
 147  coefficients, val, _ = scipy.optimize.fmin_l_bfgs_b(objective, 
 148  beta_init, approx_grad=1, disp=0) 
150  149  # set small coefficients to 0 
151  150  def set_2_0(c): return c if abs(c) > self.tol else 0 
152  151  coefficients = numpy.array(map(set_2_0, coefficients)) 