Re: [Scikit-learn-general] Linear Regression with multiple responses

2012-11-09 Thread Gael Varoquaux
On Fri, Nov 09, 2012 at 05:50:30PM +0100, federico vaggi wrote: > y : numpy array of shape [n_samples, n_responses] > Target values > Should probably be: > y : numpy array of shape [n_samples, n_targets] > Target values > Presuming targets is meant to be used instead of responses.  T

Re: [Scikit-learn-general] Linear Regression with multiple responses

2012-11-09 Thread federico vaggi
Looks good Gael - only thing: *y* : numpy array of shape [n_samples, n_responses] Target values Should probably be: *y* : numpy array of shape [n_samples, n_targets] Target values Presuming targets is meant to be used instead of responses. The same applies to the docstrings of elastic_net,

Re: [Scikit-learn-general] Linear Regression with multiple responses

2012-11-09 Thread Gael Varoquaux
On Fri, Nov 09, 2012 at 05:33:22PM +0100, federico vaggi wrote: > Which is n_responses, n_features (I confused samples and responses earlier).. Actually, I was wrong earlier, and the term that we usually use is 'n_targets'. > It makes sense - assuming it isn't redundant/confusing, I might try to

Re: [Scikit-learn-general] Linear Regression with multiple responses

2012-11-09 Thread federico vaggi
Just testing now: X = np.linspace(1,30,30).reshape(10,3) w = np.linspace(1, 60, 60).reshape(3, 20) y = dot(X,w) w2 = lr.fit(X, y) w2.shape Out[129]: (20L, 3L) Which is n_responses, n_features (I confused samples and responses earlier).. It makes sense - assuming it isn't redundant/confusing, I

Re: [Scikit-learn-general] Linear Regression with multiple responses

2012-11-09 Thread Gael Varoquaux
On Fri, Nov 09, 2012 at 05:16:21PM +0100, federico vaggi wrote: > In this case, the w that will be returned by in .coef will be of shape > (n_samples, n_features) if I follow the nomenclature correctly? (n_targets, n_features), I believe. > I guess the 'rule' is that n_features should always repr

Re: [Scikit-learn-general] Linear Regression with multiple responses

2012-11-09 Thread federico vaggi
In this case, the w that will be returned by in .coef will be of shape (n_samples, n_features) if I follow the nomenclature correctly? I guess the 'rule' is that n_features should always represent the number of columns? I only came across this because I was working with some square matrix, and I

Re: [Scikit-learn-general] Linear Regression with multiple responses

2012-11-09 Thread Gael Varoquaux
On Fri, Nov 09, 2012 at 04:32:35PM +0100, federico vaggi wrote: > Is there any reason why in the case of a matrix y, the coefficients returned > by > the linear regression seem to be a transpose of the actual coefficient matrix? >  I am sure this is just a case of syntax/convenience, but I was act