plot_lasso_coordinate_descent_path.py complains too many values to unpack #3457

Closed
thomasj02 opened this Issue Jul 20, 2014 · 4 comments

Comments

Projects
None yet
3 participants

I pulled the latest sources from git and tried to run the plot_lass_coordinate_descent_path.py example. The example gives this error:

$ python ./examples/linear_model/plot_lasso_coordinate_descent_path.py

Lasso and Elastic Net

Lasso and elastic net (L1 and L2 penalisation) implemented using a
coordinate descent.

The coefficients can be forced to be positive.

Computing regularization path using the lasso...
Traceback (most recent call last):
File "./examples/linear_model/plot_lasso_coordinate_descent_path.py", line 33, in
alphas_lasso, coefs_lasso, _ = lasso_path(X, y, eps, fit_intercept=False)
File "/usr/local/lib/python2.7/dist-packages/sklearn/linear_model/coordinate_descent.py", line 262, in lasso_path
return_models=return_models, **params)
File "/usr/local/lib/python2.7/dist-packages/sklearn/linear_model/coordinate_descent.py", line 483, in enet_path
coef_, dual_gap_, eps_ = model
ValueError: too many values to unpack

Owner

agramfort commented Jul 21, 2014

@MechCoder can you have a look?

Owner

MechCoder commented Jul 21, 2014

this is strange, it works fine for me in master. @agramfort can you verify?

Owner

MechCoder commented Jul 21, 2014

@thomasj02 from the error output. I'm guessing you might need to build again.

can you please run?

sudo python setup.py build_ext --inplace

Thanks, you're right, it was an installation issue. There were some files from a previous pip install of sklearn that were being used incorrectly

@thomasj02 thomasj02 closed this Jul 21, 2014

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment