Re: [Scikit-learn-general] Shape of coef_path_.shape returned by Lars

2012-09-17 Thread Gael Varoquaux
Hey Alejandro, On Mon, Sep 17, 2012 at 05:22:08PM -0600, Alejandro Weinstein wrote: > It seems that the shape of the coef_path_ attribute returned by Lars > is larger than it should. Indeed, you are right. I had a look at the code, and the reason why this happens is to support multiple output (i

[Scikit-learn-general] Shape of coef_path_.shape returned by Lars

2012-09-17 Thread Alejandro Weinstein
Hi: It seems that the shape of the coef_path_ attribute returned by Lars is larger than it should. For instance: ## import numpy as np from sklearn import linear_model from sklearn import datasets diabetes = datasets.load_diabetes() X = diabetes.data y = diabete

[Scikit-learn-general] Default value of `normalize` argument in Laso vs Lars

2012-09-17 Thread Alejandro Weinstein
Hi: I just notice that the default values of the `normalize` argument for Lars and Lasso are different. For Lars it is set to True, while for Lasso is set to False. lasso_path also set the default value of `normalize` to False. Since Lars and Lasso are "close cousins", I would expect them to have

[Scikit-learn-general] Fwd: Build failed in Jenkins: python-2.6-numpy-1.3.0-scipy-0.7.2 #1030

2012-09-17 Thread Lars Buitinck
I'm not sure what to make of this. Looks like a heuristic performance test in joblib is randomly breaking. Cannot reproduce. -- Forwarded message -- From: Date: 2012/9/17 Subject: Build failed in Jenkins: python-2.6-numpy-1.3.0-scipy-0.7.2 #1030 See

Re: [Scikit-learn-general] Understanding ElasticNet

2012-09-17 Thread Ariel Rokem
Oh, On Mon, Sep 17, 2012 at 2:35 PM, Andreas Mueller wrote: > > > Yeah - looks good for ElasticNet. What's the story of line 1004 in > > that same file (the docstring for the MultiTaskElasticNet) should that > > really be "L1/L2"? > > > Yeah, that is correct. It is a matrix penalty with L1 on the

Re: [Scikit-learn-general] Understanding ElasticNet

2012-09-17 Thread Andreas Mueller
> Yeah - looks good for ElasticNet. What's the story of line 1004 in > that same file (the docstring for the MultiTaskElasticNet) should that > really be "L1/L2"? > Yeah, that is correct. It is a matrix penalty with L1 on the columns and L2 on the rows (err or the other way around)? The idea is

Re: [Scikit-learn-general] Understanding ElasticNet

2012-09-17 Thread Ariel Rokem
On Mon, Sep 17, 2012 at 1:37 PM, Andreas Mueller wrote: > Hi Ariel. > > > > Thanks for your response and for pointing me to that commit - I didn't > even know this was being actively discussed! I was looking exactly at that > part of the doc-string you refer to in that commit. Now (in Alex's comm

Re: [Scikit-learn-general] Understanding ElasticNet

2012-09-17 Thread Andreas Mueller
Hi Ariel. Thanks for your response and for pointing me to that commit - I didn't even know this was being actively discussed! I was looking exactly at that part of the doc-string you refer to in that commit. Now (in Alex's commit) the docstring is very strange: it looks as though rho doesn't

Re: [Scikit-learn-general] Understanding ElasticNet

2012-09-17 Thread Ariel Rokem
Hi Andy, On Mon, Sep 17, 2012 at 10:30 AM, Andreas Mueller wrote: > Hi Ariel. > > I think there is some confusion about what rho means, see > here: https://github.com/scikit-learn/scikit-learn/issues/1139 > and here: > https://github.com/scikit-learn/scikit-learn/commit/9987b61cf87aa8eeecd9c8e2f

Re: [Scikit-learn-general] Docstring of Lasso.fit method says is fitting an Elastic Net model

2012-09-17 Thread Alexandre Gramfort
fixed Alex On Mon, Sep 17, 2012 at 9:30 PM, Alejandro Weinstein wrote: > On Mon, Sep 17, 2012 at 1:19 PM, Alexandre Gramfort > wrote: >> Option one is to duplicate the doc of Lasso.fit or option 2 remove the >> work "ElasticNet" from the docstring. I am +1 for 2. > > Option 2 sounds good to me.

Re: [Scikit-learn-general] Docstring of Lasso.fit method says is fitting an Elastic Net model

2012-09-17 Thread Alejandro Weinstein
On Mon, Sep 17, 2012 at 1:19 PM, Alexandre Gramfort wrote: > Option one is to duplicate the doc of Lasso.fit or option 2 remove the > work "ElasticNet" from the docstring. I am +1 for 2. Option 2 sounds good to me. Thanks, Alejandro --

Re: [Scikit-learn-general] Docstring of Lasso.fit method says is fitting an Elastic Net model

2012-09-17 Thread Alexandre Gramfort
hi Alejandro, > I guess it is because the Lasso class inherits from the ElasticNet class: > > class Lasso(ElasticNet): > ... no fully. It's because Lasso is an ElasticNet with rho=1.0 and for this reason we use the ElasticNet.fit method for the Lasso after setting rho to 1. Option one is to dupl

[Scikit-learn-general] Docstring of Lasso.fit method says is fitting an Elastic Net model

2012-09-17 Thread Alejandro Weinstein
Hi: The docstring of the fit method of the Lasso class says it's fitting an Elastic Net Model: ### from sklearn.linear_model import Lasso rgr = Lasso() help(rgr.fit) >>> Help on method fit in module sklearn.linear_model.coordinate_descent: fit(self, X, y, Xy=Non

Re: [Scikit-learn-general] Problem with recursive feature selection with cross-validation

2012-09-17 Thread Lars Buitinck
2012/9/17 Andreas Mueller : > Shouldn't we do asarray on it? Done. -- Lars Buitinck Scientific programmer, ILPS University of Amsterdam -- Live Security Virtual Conference Exclusive live event will cover all the ways to

Re: [Scikit-learn-general] Understanding ElasticNet

2012-09-17 Thread Andreas Mueller
Hi Ariel. I think there is some confusion about what rho means, see here: https://github.com/scikit-learn/scikit-learn/issues/1139 and here: https://github.com/scikit-learn/scikit-learn/commit/9987b61cf87aa8eeecd9c8e2fae6c29599892613 Atm, rho=1 is L1, and rho=0 is L2 in ElasticNet but the othe

[Scikit-learn-general] Understanding ElasticNet

2012-09-17 Thread Ariel Rokem
Hi everyone, I am using the sklearn.linear_model.ElasticNet class to fit some data. The structure of the data is y = Xw, and I am trying to solve for w where y.shape is (150,) and X.shape is (150,150), with a non-negativity constraint. Both y and each column of X is mean-removed. Some of the colum

Re: [Scikit-learn-general] Pycon 2013 tutorial

2012-09-17 Thread Andreas Mueller
On 09/17/2012 05:41 PM, Gael Varoquaux wrote: > On Mon, Sep 17, 2012 at 09:05:20AM -0700, Jacob VanderPlas wrote: >> Submissions are due by the end of next week, so we'll be working on them >> soon. Please let us know if you have any feedback or suggestions. Thanks! > I have feedback: you guys ro

Re: [Scikit-learn-general] Problem with recursive feature selection with cross-validation

2012-09-17 Thread Andreas Mueller
On 09/17/2012 04:49 PM, Gael Varoquaux wrote: > On Sun, Sep 16, 2012 at 07:44:05PM -0300, Fernando Alva Manchego wrote: >> >> "/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/sklearn/feature_selection/rfe.py", >> line 298, in fit >> ranking_ = rfe.fit(

Re: [Scikit-learn-general] Pycon 2013 tutorial

2012-09-17 Thread Gael Varoquaux
On Mon, Sep 17, 2012 at 09:05:20AM -0700, Jacob VanderPlas wrote: > Submissions are due by the end of next week, so we'll be working on them > soon. Please let us know if you have any feedback or suggestions. Thanks! I have feedback: you guys rock. G --

Re: [Scikit-learn-general] Problem with recursive feature selection with cross-validation

2012-09-17 Thread Fernando Alva Manchego
Hello Gael! Yes, that was actually part of the problem. "y" was a list and not a numpy array. Thanks! []s, Fernando On 17 September 2012 12:49, Gael Varoquaux wrote: > On Sun, Sep 16, 2012 at 07:44:05PM -0300, Fernando Alva Manchego wrote: > > > > "/Library/Frameworks/Python.framework/Version

[Scikit-learn-general] Pycon 2013 tutorial

2012-09-17 Thread Jacob VanderPlas
Hello all, Olivier and I have been discussing submitting scikit-learn tutorials for PyCon 2013 next March. He would like to cover some more advanced topics such as categorical feature extraction for text, multicore parallelism, model selection via parallel grid search, etc. Based on feedback f

Re: [Scikit-learn-general] ValueError: numpy.dtype does not appear to be the correct type object

2012-09-17 Thread Gael Varoquaux
On Tue, Sep 18, 2012 at 12:05:14AM +0800, David Montgomery wrote: > I built numpy then scipy then scikits but using pip --upgrade for sckits > >> from scipy.spatial import distance > >> File "/usr/lib/python2.6/dist-packages/scipy/spatial/__init__.py", > >> line 7, in > >> from ckdtree

Re: [Scikit-learn-general] ValueError: numpy.dtype does not appear to be the correct type object

2012-09-17 Thread David Montgomery
I built numpy then scipy then scikits but using pip --upgrade for sckits On Mon, Sep 17, 2012 at 11:39 PM, Virgile Fritsch wrote: > Hi David, > > One simple suggestion: Did you build numpy, then scipy, and then > scikit-learn using their respective make/setup.py? > > Virgile > > On Mon, Sep 17, 2

Re: [Scikit-learn-general] Problem with recursive feature selection with cross-validation

2012-09-17 Thread Gael Varoquaux
On Sun, Sep 16, 2012 at 07:44:05PM -0300, Fernando Alva Manchego wrote: > > "/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/sklearn/feature_selection/rfe.py", >line 298, in fit >    ranking_ = rfe.fit(X[train], y[train]).ranking_ >TypeError: only integ

Re: [Scikit-learn-general] ValueError: numpy.dtype does not appear to be the correct type object

2012-09-17 Thread Virgile Fritsch
Gael-luke... "answer faster than its shadow" ;) On Mon, Sep 17, 2012 at 5:39 PM, Virgile Fritsch wrote: > Hi David, > > One simple suggestion: Did you build numpy, then scipy, and then > scikit-learn using their respective make/setup.py? > > Virgile > > > On Mon, Sep 17, 2012 at 5:31 PM, David Mo

Re: [Scikit-learn-general] ValueError: numpy.dtype does not appear to be the correct type object

2012-09-17 Thread Virgile Fritsch
Hi David, One simple suggestion: Did you build numpy, then scipy, and then scikit-learn using their respective make/setup.py? Virgile On Mon, Sep 17, 2012 at 5:31 PM, David Montgomery wrote: > Hi, > > I upgraded numpy to 1.6 and sci to .12 and now I get the below. I am > on ubuntu 10.04 How

Re: [Scikit-learn-general] ValueError: numpy.dtype does not appear to be the correct type object

2012-09-17 Thread Gael Varoquaux
On Mon, Sep 17, 2012 at 11:31:41PM +0800, David Montgomery wrote: > I upgraded numpy to 1.6 and sci to .12 and now I get the below. I am > on ubuntu 10.04 How do I resolve? I believe that you need to rebuild from source scikit-learn. HTH, Gaël -

[Scikit-learn-general] ValueError: numpy.dtype does not appear to be the correct type object

2012-09-17 Thread David Montgomery
Hi, I upgraded numpy to 1.6 and sci to .12 and now I get the below. I am on ubuntu 10.04 How do I resolve? Thanks '' from sklearn import linear_model Traceback (most recent call last): File "", line 1, in File "/usr/local/lib/python2.6/dist-packages/sklearn/__init__.py", line 32, in