Do not copy mapping from dependent variable to prediction field in regression analysis#51227
Conversation
|
Pinging @elastic/ml-core (:ml) |
a7fe7f6 to
12a80bf
Compare
benwtrent
left a comment
There was a problem hiding this comment.
Looks good to me :D.
I wonder if we should force the mapping for regression to always be double instead of it being float? I am not sure if the precision loss is a concern or not.
|
It's a good point about using |
This change required bigger changes in the logic that calculates mappings as now Regression imposes constant mapping while Classification copies the mapping from dependent variable. |
benwtrent
left a comment
There was a problem hiding this comment.
I think this looks good.
There are a bunch of failing tests due to the change :).
There was a problem hiding this comment.
| * @return {@link List} containing fields for which the mappings should be handled explicitly | |
| * @return {@link Map} containing fields for which the mappings should be handled explicitly |
b35b069 to
d92811a
Compare
…gression analysis
…ce.field" field in the results
d92811a to
90b3986
Compare
…gression analysis (elastic#51227)
Currently, in case of regression analysis, the mapping is copied from dependent variable to prediction field.
When the dependent variable is of a discrete type (i.e. integer, long, etc.) the prediction field is indexed as a discrete type as well, increasing total prediction error (MSE, R^2).
This PR addresses that by making prediction field mapped dynamically (as float).
Closes https://github.com/elastic/machine-learning-qa/issues/661