You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
A minimal implementation would pass through NaNs from the input to the output of transform and make sure the presence of NaN does not affect the categories identified in fit.
A missing_values parameter might allow the user to configure what object is a placeholder for missingness (e.g. NaN, None, etc.).
I'm currently working on this issue-- but I think the best way to start is to review the contributing guidlines. And when you see an issue no one is working on, ask the member who submitted the issue if you can get started. (I'm fairly new to this project myself).
A suggestion: assign 0 only for missing values, and starting encoding from 1 (and not from 0 as it is done now), even when there are no missing values in the data set. Such a normalization could help identifying the preceding missing values more easier (in order to handle them).
By adding the option add_indicator in the imputer, we also make things difficult right now.
Indeed, one will have to define a pipeline imputer+encoder. If add_indicator=True, we will get some extra-columns which you don't want to encode.
The workaround is to make a column transform with a MissingIndicator and set add_indicator=False for the imputer.
A reasonable use case would be to first encode ignoring the missing values and then apply the imputer.
I might pick up this and make some reviews on the different PRs
EDIT: Since we will encode the missing values as a caregories, we will not need add_indicator=True in practise.
Activity
maxcopeland commentedon Sep 4, 2018
Hi @jnothman-- do you mind if I work on this?
jnothman commentedon Sep 4, 2018
Go for it
jnothman commentedon Sep 4, 2018
I suppose we might also consider a
handle_missingparam that would allow NaN to be encoded as the smallest/largest number...?jashrathod commentedon Sep 8, 2018
Hi.
I'm new so open source contributions. So can someone help me get started?
maxcopeland commentedon Sep 8, 2018
I'm currently working on this issue-- but I think the best way to start is to review the contributing guidlines. And when you see an issue no one is working on, ask the member who submitted the issue if you can get started. (I'm fairly new to this project myself).
CatChenal commentedon Sep 29, 2018
I wish the help wanted tag would disappear once a contributor adopts an issue...
shashvat-kedia commentedon Apr 1, 2019
@jnothman I am new to this project and would like to contribute. Can I start by working on this issue?
jnothman commentedon Apr 1, 2019
Catadanna commentedon Sep 17, 2019
A suggestion: assign 0 only for missing values, and starting encoding from 1 (and not from 0 as it is done now), even when there are no missing values in the data set. Such a normalization could help identifying the preceding missing values more easier (in order to handle them).
glemaitre commentedon Nov 13, 2019
By adding the optionadd_indicatorin the imputer, we also make things difficult right now.Indeed, one will have to define a pipeline imputer+encoder. If
add_indicator=True, we will get some extra-columns which you don't want to encode.The workaround is to make a column transform with a MissingIndicator and setadd_indicator=Falsefor the imputer.A reasonable use case would be to first encode ignoring the missing values and then apply the imputer.I might pick up this and make some reviews on the different PRsEDIT: Since we will encode the missing values as a caregories, we will not need
add_indicator=Truein practise.thomasjpfan commentedon Feb 23, 2023
I am closing this PR because this feature was added in #21988, which added
encoded_missing_valueto choose the encoding for missing values.