Join GitHub today
GitHub is home to over 28 million developers working together to host and review code, manage projects, and build software together.Sign up
API for autocompletable attributes on pipeline #8481
Many people use jupyter for data analysis. I like us to be as responsive and interactive in this environment as possible. I also like API to be discoverable by pressing .
Unfortunately it's not possible to access attributes on pipelines without writing out full names.
coef = pipeline.steps.coef_ coef = pipeline.named_steps['logisticregression'].coef_
I usually prefer the second one because I like names better than counting and it's more explicit for anyone reading the code.
I think it would be awesome if I could get to
I'm not sure that's very easy to do, though.
That requires some magic and it would not work for the names that contain numbers in them. I would be fine if we don't support names with
We could also overload
So we could replace
Ipython should provide dict key completion for named_steps assist. also note that there is a setting in ipython that generically enables completion across complicated expressions. My Pipeline.pop proposal also makes it easier to access last estimator attributes, and if that's our focus, Pipeline.last_estimator_ property is also an option…
On 2 Mar 2017 2:56 am, "RAKOTOARISON Herilalaina" ***@***.***> wrote: I would like to work on this issue — You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub <#8481 (comment)>, or mute the thread <https://github.com/notifications/unsubscribe-auth/AAEz67yxHFHx6ubtPNueI7VAqF6ssaRPks5rhZURgaJpZM4MPyiG> .
On 4 Mar 2017 8:38 am, "Andreas Mueller" ***@***.***> wrote: can you link to your pipeline.pop proposal? I don't think the last estimator is necessarily any more important than the other ones. — You are receiving this because you commented. Reply to this email directly, view it on GitHub <#8481 (comment)>, or mute the thread <https://github.com/notifications/unsubscribe-auth/AAEz63C4OZNA6Fub66g8--QMMb0WNw3tks5riIg3gaJpZM4MPyiG> .
fair enough. +1 for a bunch-like behaviour…
On 7 Mar 2017 4:19 am, "Andreas Mueller" ***@***.***> wrote: Oh also: the keys are auto-completed but nothing that comes after is. So I can auto-complete 'logisticregression' in the example above, but not coef_. — You are receiving this because you commented. Reply to this email directly, view it on GitHub <#8481 (comment)>, or mute the thread <https://github.com/notifications/unsubscribe-auth/AAEz64rxX44drcmZ1CoFlNG0pz0cnnaSks5rjEAvgaJpZM4MPyiG> .