Re: [scikit-learn] LogisticRegression coef_ greater than n_features?

2019-01-07 Thread Sebastian Raschka
Maybe check 

a) if the actual labels of the training examples don't start at 0
b) if you have gaps, e.g,. if your unique training labels are 0, 1, 4, ..., 23

Best,
Sebastian

> On Jan 7, 2019, at 10:50 PM, pisymbol  wrote:
> 
> According to the doc (0.20.2) the coef_ variables are suppose to be shape (1, 
> n_features) for binary classification. Well I created a Pipeline and 
> performed a GridSearchCV to create a LogisticRegresion model that does fairly 
> well. However, when I want to rank feature importance I noticed that my 
> coefs_ for my best_estimator_ has 24 entries while my training data has 22.
> 
> What am I missing? How could coef_ > n_features?
> 
> -aps
> ___
> scikit-learn mailing list
> scikit-learn@python.org
> https://mail.python.org/mailman/listinfo/scikit-learn

___
scikit-learn mailing list
scikit-learn@python.org
https://mail.python.org/mailman/listinfo/scikit-learn


Re: [scikit-learn] LogisticRegression coef_ greater than n_features?

2019-01-07 Thread pisymbol
On Mon, Jan 7, 2019 at 11:50 PM pisymbol  wrote:

> According to the doc (0.20.2) the coef_ variables are suppose to be shape
> (1, n_features) for binary classification. Well I created a Pipeline and
> performed a GridSearchCV to create a LogisticRegresion model that does
> fairly well. However, when I want to rank feature importance I noticed that
> my coefs_ for my best_estimator_ has 24 entries while my training data has
> 22.
>
> What am I missing? How could coef_ > n_features?
>
>
Just a follow-up, I am using a OneHotEncoder to encode two categoricals as
part of my pipeline (I am also using an imputer/standard scaler too but I
don't see how that could add features).

Could my pipeline actually add two more features during fitting?

-aps
___
scikit-learn mailing list
scikit-learn@python.org
https://mail.python.org/mailman/listinfo/scikit-learn


Re: [scikit-learn] Next Sprint

2019-01-07 Thread Gael Varoquaux
Hi everybody and happy new year,

We let this thread about the sprint die. I hope that this didn't change
people's plans.

So, it seems that the week of Feb 25th is a good week. I'll assume that
it's good for most and start planning from there (if it's not the case,
let me know).

I've started our classic sprint-planing wiki page:
https://github.com/scikit-learn/scikit-learn/wiki/Upcoming-events 
It's not rocket science, but it's better than an email thread to keep
information together.

It would be great if people could add their name, and if they need
funding. We need to evaluate if we need to find funding.

Also, it's quite soon, so maybe it would be good to start planning
accommodation and travel :$.

Cheers,

Gaël

On Sat, Dec 22, 2018 at 05:27:39PM +0100, Guillaume Lemaître wrote:
> Works for me as well. 

> Sent from my phone - sorry to be brief and potential misspell.


>   Original Message  
> From: scikit-learn@python.org
> Sent: 22 December 2018 17:17
> To: scikit-learn@python.org
> Reply to: rth.yurc...@pm.me; scikit-learn@python.org
> Cc: rth.yurc...@pm.me
> Subject: Re: [scikit-learn] Next Sprint

> That works for me as well.

> On 21/12/2018 16:00, Olivier Grisel wrote:
> > Ok for me. The last 3 weeks of February are fine for me.

> > Le jeu. 20 déc. 2018 à 21:21, Alexandre Gramfort 
> > mailto:alexandre.gramf...@inria.fr>> a écrit :

> > ok for me

> > Alex

> > On Thu, Dec 20, 2018 at 8:35 PM Adrin  > > wrote:
> >  >
> >  > It'll be the least favourable week of February for me, but I can
> > make do.
> >  >
> >  > On Thu, 20 Dec 2018 at 18:45 Andreas Mueller  > > wrote:
> >  >>
> >  >> Works for me!
> >  >>
> >  >> On 12/19/18 5:33 PM, Gael Varoquaux wrote:
> >  >> > I would propose  the week of Feb 25th, as I heard people say
> > that they
> >  >> > might be available at this time. It is good for many people,
> > or should we
> >  >> > organize a doodle?
> >  >> >
> >  >> > G
> >  >> >
> >  >> > On Wed, Dec 19, 2018 at 05:27:21PM -0500, Andreas Mueller wrote:
> >  >> >> Can we please nail down dates for a sprint?
> >  >> >> On 11/20/18 2:25 PM, Gael Varoquaux wrote:
> >  >> >>> On Tue, Nov 20, 2018 at 08:15:07PM +0100, Olivier Grisel wrote:
> >  >>  We can also do Paris in April / May or June if that's ok
> > with Joel and better
> >  >>  for Andreas.
> >  >> >>> Absolutely.
> >  >> >>> My thoughts here are that I want to minimize transportation,
> > partly
> >  >> >>> because flying has a large carbon footprint. Also, for
> > personal reasons,
> >  >> >>> I am not sure that I will be able to make it to Austin in
> > July, but I
> >  >> >>> realize that this is a pretty bad argument.
> >  >> >>> We're happy to try to host in Paris whenever it's most
> > convenient and to
> >  >> >>> try to help with travel for those not in Paris.
> >  >> >>> Gaël
> >  >> >>> ___
> >  >> >>> scikit-learn mailing list
> >  >> >>> scikit-learn@python.org 
> >  >> >>> https://mail.python.org/mailman/listinfo/scikit-learn
> >  >> >> ___
> >  >> >> scikit-learn mailing list
> >  >> >> scikit-learn@python.org 
> >  >> >> https://mail.python.org/mailman/listinfo/scikit-learn
> >  >>
> >  >> ___
> >  >> scikit-learn mailing list
> >  >> scikit-learn@python.org 
> >  >> https://mail.python.org/mailman/listinfo/scikit-learn
> >  >
> >  > ___
> >  > scikit-learn mailing list
> >  > scikit-learn@python.org 
> >  > https://mail.python.org/mailman/listinfo/scikit-learn
> > ___
> > scikit-learn mailing list
> > scikit-learn@python.org 
> > https://mail.python.org/mailman/listinfo/scikit-learn


> ___
> scikit-learn mailing list
> scikit-learn@python.org
> https://mail.python.org/mailman/listinfo/scikit-learn
> ___
> scikit-learn mailing list
> scikit-learn@python.org
> https://mail.python.org/mailman/listinfo/scikit-learn

-- 
Gael Varoquaux
Senior Researcher, INRIA Parietal
NeuroSpin/CEA Saclay , Bat 145, 91191 Gif-sur-Yvette France
Phone:  ++ 33-1-69-08-79-68
http://gael-varoquaux.infohttp://twitter.com/GaelVaroquaux
___
scikit-learn mailing list
scikit-learn@python.org
https://mail.python.org/mailman/listinfo/scikit-learn