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 might try to do a
PR and add a small explanation on the website?
On Fri, Nov 9, 2012 at 5:18 PM, Gael Varoquaux <
[email protected]> wrote:
> 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 represent the
> > number of columns? I only came across this because I was working with
> > some square matrix, and I kept getting stupid results until I actually
> > did some checking on what the orientation of w was.
>
> Never work with square matrices :).
>
> G
>
>
> ------------------------------------------------------------------------------
> Everyone hates slow websites. So do we.
> Make your web apps faster with AppDynamics
> Download AppDynamics Lite for free today:
> http://p.sf.net/sfu/appdyn_d2d_nov
> _______________________________________________
> Scikit-learn-general mailing list
> [email protected]
> https://lists.sourceforge.net/lists/listinfo/scikit-learn-general
>
------------------------------------------------------------------------------
Everyone hates slow websites. So do we.
Make your web apps faster with AppDynamics
Download AppDynamics Lite for free today:
http://p.sf.net/sfu/appdyn_d2d_nov
_______________________________________________
Scikit-learn-general mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/scikit-learn-general