Skip to content

[WIP] ENH Allow precomputed mask as input for MissingIndicator #13514

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

Conversation

jeremiedbb
Copy link
Member

Allows to avoid recomputing the mask when it's already been computed by another estimator. For example, to stack a MissingIndicator on a SimpleImputer as being developed in #12583.

I chose to add another possible value for the missing_values parameter, and interpret X as the mask in that case. It's like metric='precomputed' in some estimators.

I developed this PR on top of #13491 for convenience, so it contains unrelated changes for now. This is why I mark it as wip.

@jnothman
Copy link
Member

Should this be marked MRG?

@jeremiedbb
Copy link
Member Author

jeremiedbb commented Mar 27, 2019

Yes but it contains #13491 so it will be easier to review it when the previous PR is merged.

@amueller
Copy link
Member

amueller commented Aug 6, 2019

Any update on this? The other PR was split up and merged, right?

@jeremiedbb
Copy link
Member Author

This is more complicated than expected. For dense array, the mask has the right shape but for sparse matrices, the mask is the mask of the data array, which is not enough to reconstruct the array.

I'm closing it. I'll reopen later if I find a better way to do it. (the only use case it to avoid computing the mask twice in imputers with missing_indicator)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants