New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
FIX return proper instance class in displays classmethod #27675
FIX return proper instance class in displays classmethod #27675
Conversation
Yep it makes a lot of sense. I think that we can considered it as a bug.
I think that we need an entry in the changelog as a FIX. |
Hi - I still plan to do this |
Cool. Thanks @johncant I am assigning the issue to you. |
Ups, this is actually already a pull-request :). I will be notified when you are going to make changes, so all good. |
#Classes to fix (from
I'll update this comment as I go |
@glemaitre - this is what I've done:
PR is now ready! |
Thanks. I'm going to review it. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM. If we make it before the release, I think we can include it in 1.4.0. Otherwise we will have to move it for 1.4.1.
sklearn/inspection/_plot/tests/test_boundary_decision_display.py
Outdated
Show resolved
Hide resolved
Co-authored-by: Guillaume Lemaitre <g.lemaitre58@gmail.com>
Co-authored-by: Guillaume Lemaitre <g.lemaitre58@gmail.com>
Co-authored-by: Guillaume Lemaitre <g.lemaitre58@gmail.com>
Co-authored-by: Guillaume Lemaitre <g.lemaitre58@gmail.com>
Co-authored-by: Guillaume Lemaitre <g.lemaitre58@gmail.com>
Co-authored-by: Guillaume Lemaitre <g.lemaitre58@gmail.com>
I might have introduce a linter issue. You can run black as specified by the bot to solve it. |
Hi @glemaitre - I've accepted all your suggestions and fixed the linter. LGTM! |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM. I'm +1 to include it in 1.4.0. @glemaitre you want to take another look ?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Fine on my side as well.
…n#27675) Co-authored-by: Guillaume Lemaitre <g.lemaitre58@gmail.com> Co-authored-by: Jérémie du Boisberranger <34657725+jeremiedbb@users.noreply.github.com>
Co-authored-by: Guillaume Lemaitre <g.lemaitre58@gmail.com> Co-authored-by: Jérémie du Boisberranger <34657725+jeremiedbb@users.noreply.github.com>
…n#27675) Co-authored-by: Guillaume Lemaitre <g.lemaitre58@gmail.com> Co-authored-by: Jérémie du Boisberranger <34657725+jeremiedbb@users.noreply.github.com>
At the moment, if you try this:
You would get
RocCurveDisplay
. If users want to reuse/override functionality, like I do, and invoke by calling these named constructors, this needs to returnSubclass
.Easily fixed by instantiating
cls
in the named constructor methods instead of i.e. RocCurveDisplay.