EugeneNdiaye / smoothed_concomitant_lasso

Joint estimation of location and scale parameters with l1 regularization.
http://iopscience.iop.org/article/10.1088/1742-6596/904/1/012006/meta
2 stars 4 forks source link

cvxpy break in example #7

Open mathurinm opened 6 years ago

mathurinm commented 6 years ago

Hi @EugeneNdiaye

I couldn't run the example because I think the sign parameter got deprecated in cvxpy.

In [4]: cvxpy.__version__
Out[4]: '1.0.8'
TypeError                                 Traceback (most recent call last)
<ipython-input-2-9df631d8c1f2> in <module>()
     32 
     33 # SBvG
---> 34 betas_SBvG, sigmas_SBvG = SBvG_path(X, y, [lambda_max / 1.5])
     35 
     36 

~/workspace/smoothed_concomitant_lasso/smoothconco/SBvG.py in SBvG_path(X, y, lambda_grid, solver)
     15     n_samples, n_featuresures = X.shape
     16 
---> 17     lambda_ = cvx.Parameter(sign="Positive")
     18     phi = cvx.Variable(n_featuresures)
     19     rho = cvx.Variable(1)

~/anaconda3/lib/python3.6/site-packages/cvxpy/expressions/constants/parameter.py in __init__(self, shape, name, value, **kwargs)
     39         # Initialize with value if provided.
     40         self._value = None
---> 41         super(Parameter, self).__init__(shape, value, **kwargs)
     42 
     43     def get_data(self):

TypeError: __init__() got an unexpected keyword argument 'sign'