API for autocompletable attributes on pipeline #8481
Closed
Labels
Comments
I would like to work on this issue |
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>
.
|
can you link to your pipeline.pop proposal? I don't think the last estimator is necessarily any more important than the other ones. |
… 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>
.
|
Oh also: the keys are auto-completed but nothing that comes after is. |
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>
.
|
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
afaik there's two ways to access attributes:
I usually prefer the second one because I like names better than counting and it's more explicit for anyone reading the code.
But that requires me to know two things that I can't get via tab-completion: the names of the steps and the name of the attribute.
I think it would be awesome if I could get to
coef_
using a tab-completable, which would make the whole thing much more discoverable.I'm not sure that's very easy to do, though.
One option would be to either overload
Pipeline
s__getattr__
and__dir__
so that you could doThat 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
-1
and-2
in them for now.But more magic in the pipeline is not great.
We could also overload
__getattr__
and__dir__
on ```pipeline.named_steps. That would limit the magic to
named_steps`` which is just for convenience and not used internally anywhere afaik. And we already have an implementation of this: the bunch object.So we could replace
named_steps
with aBunch
object and get an API that is way more discoverable (and easier on my fingertips ;)The text was updated successfully, but these errors were encountered: