-
Notifications
You must be signed in to change notification settings - Fork 62
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
[ML] Distinguish missing and empty categorical values #1034
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
It seems that the test of numeric missing field value is actually causing a fatal error that stops the test suite:
So that test needs to replace the fatal error handler. But I’m happy to merge as soon as the CI passes. |
…t I don't want to change this behaviour in this PR. Also, fix some formatting broken when we were first experimenting with auto formatting.
It turns out the |
Currently, it is impossible to distinguish missing categorical fields and fields whose values are the empty string (the exchange format between C++ and Java doesn't support optional strings). This can cause issues for inference, which does understand the difference. Also, since these could be semantically different we would ideally distinguish them from the standpoint of training.
This change introduces a custom string to denote a missing value. By default this is the
\0
character, but is configurable. This will also allow us to clean up the handling of the missing target category for test data passed to classification, but I've left TODOs until the Java has been updated or we'll break integration tests.I also found myself needing to introduce another parameter to
CDataFrameAnalysisSpecificationFactory
. I've taken the opportunity to introduce setters for the various parameters since the many optional parameters were becoming unsustainable.