Repository navigation
FIX SimpleImputer.inverse_transform column shift with empty features … - #34949
Open
abhisekkundu-DS wants to merge 5 commits into
Open
abhisekkundu-DS wants to merge 5 commits into
abhisekkundu-DS wants to merge 5 commits into
Conversation
|
Thank you for opening your first pull request to scikit-learn! 🎉 To help get your contribution reviewed, please make sure that:
|
This branch has not been deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Reference Issues/PRs
Fixes #27012.
What does this implement/fix? Explain your changes.
This PR fixes a column-shifting issue in
SimpleImputer.inverse_transformwhen the transformed data contains features that were empty during fitting.The existing implementation could incorrectly identify valid features during
inverse_transform, causing the reconstructed output columns to be shifted when empty features were present.This PR:
SimpleImputer.inverse_transform.inverse_transformwith empty features.missing_values.Introduce yourself
Hi, I'm Abhisek Kundu. I currently work as an AI Engineer and have experience working with Python, machine learning, deep learning, and computer vision.
I use Python and machine learning libraries such as scikit-learn in my development and experimentation work. I wanted to contribute to scikit-learn because it is an important open-source project in the machine-learning ecosystem, and I wanted to gain experience contributing to a large production-quality codebase.
This is my first contribution to the scikit-learn community, and I'm looking forward to learning from the maintainers and improving the implementation based on their feedback.
AI usage disclosure
I used AI assistance for:
I reviewed the generated suggestions, adapted them to the scikit-learn codebase, and tested the resulting changes.
Any other comments?
Thank you for reviewing this contribution. I am happy to make any changes or improvements requested during the review process.