Skip to content

Conversation

thomasjpfan
Copy link
Member

This PR fixes a bug in FunctionTransformer where inverse_transform stores n_features_in_ based on the input to inverse_transform.

@glemaitre
Copy link
Member

We also need to add in the documentation, the fitted attribute. However, it is only set if validate=True.
Following the discussion in #20874, do we want to set n_features_in_ to None when validate=False?

@glemaitre
Copy link
Member

Oh no, I see that actually, we don't want it to exist then. So we only need to add it to the documentation.

Copy link
Member

@ogrisel ogrisel left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM! Thanks for the fix.

@ogrisel ogrisel added this to the 1.0 milestone Sep 7, 2021
@ogrisel ogrisel added the To backport PR merged in master that need a backport to a release branch defined based on the milestone. label Sep 7, 2021
@ogrisel
Copy link
Member

ogrisel commented Sep 7, 2021

@glemaitre merge?

@thomasjpfan
Copy link
Member Author

Tagging for #20965 if it gets in.

If it does not get it, I think this PR can also be considered a 1.0.1 bug fix

@glemaitre glemaitre merged commit ba58f3a into scikit-learn:main Sep 8, 2021
@glemaitre
Copy link
Member

Looks good.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
module:preprocessing To backport PR merged in master that need a backport to a release branch defined based on the milestone.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants