-
Notifications
You must be signed in to change notification settings - Fork 396
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
Allow function to be passed as handle missing argument that user can define which group to default to #344
Comments
Hi @Fish-Soup |
Hey thanks for the response, happy to extend to missing. |
I guess you couldn't just return np.nan if you're function is supposed to handle NaN values it should not return NaN. Then you'd need a second order NaN handling strategy. You'd also need to make sure the output is always numeric (but this could be enforced easily). |
Sorry for late response was on holiday. The reason I'd rather do this in inside the encoder is ot allows us to also consider the values of the encoding. For example you could return the median encoded value. My intention was giving the user maximum flexibility in their choices. |
This is interesting. Your examples sound like you mean From the examples, I assume |
Feature Enhancement
For encoders that have the handle_missing argument, allow a function to be passed here that takes the value of the missing value and computes an encoding for it. This allows the user to choose which encoding value is the best match for a given missing label.
Example
We have categories at train of
Nokia 2.1, Nokia 2.2, Samsung A52, Samsung S10
.At predict we also have
Nokia 2.3, Samsung A52s
The text was updated successfully, but these errors were encountered: