-
Notifications
You must be signed in to change notification settings - Fork 28.4k
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
[SPARK-8468][ML] Take the negative of some metrics in RegressionEvaluator to get correct cross validation #6905
Conversation
Test build #35266 has finished for PR 6905 at commit
|
You would at least have to change the docs in I don't see that you changed There's more of a problem with that though. 3 of the 4 metrics in Another possibility is to invert the result of RMSE, MSE, MAE. For eval purposes, their relative ranking is all that matters so returning 1/x as the evaluation criteria is fine, for example. That would let you fully fix this without any API change. |
Thanks. I didn't notice there is R^2 that is needed to maximize. The simplest solution should be to invert the result of RMSE, MSE, MAE. |
Test build #35278 has finished for PR 6905 at commit
|
@mengxr agreed. Updated. |
LGTM pending Jenkins. Thanks for the quick fix and @chelseaz for reporting the bug! |
Thanks for the fix @viirya! |
Arguing with myself: I see the value of the eval is used in some log statements including its mean. This may be a little less than useful when it is some inverse RMSE but still probably a decent solution |
Test build #35285 has finished for PR 6905 at commit
|
test this please |
Test build #35311 has finished for PR 6905 at commit
|
@viirya Could you fix the python unit tests?
|
@viirya Could you also please document the meaning of the various metrics in RegressionEvaluator? Users will be surprised that those values are negated. The doc can go in the "metricName" Param Scala/Python doc. Thanks! |
Test build #35351 has finished for PR 6905 at commit
|
LGTM merging into branch-1.4 and master |
…uator to get correct cross validation JIRA: https://issues.apache.org/jira/browse/SPARK-8468 Author: Liang-Chi Hsieh <[email protected]> Closes #6905 from viirya/cv_min and squashes the following commits: 930d3db [Liang-Chi Hsieh] Fix python unit test and add document. d632135 [Liang-Chi Hsieh] Merge remote-tracking branch 'upstream/master' into cv_min 16e3b2c [Liang-Chi Hsieh] Take the negative instead of reciprocal. c3dd8d9 [Liang-Chi Hsieh] For comments. b5f52c1 [Liang-Chi Hsieh] Add param to CrossValidator for choosing whether to maximize evaulation value. (cherry picked from commit 0b89951) Signed-off-by: Joseph K. Bradley <[email protected]>
…lidatorSuite Ref. #6905 ping yhuai Author: Liang-Chi Hsieh <[email protected]> Closes #6929 from viirya/hot_fix_cv_test and squashes the following commits: b1aec53 [Liang-Chi Hsieh] Hotfix branch-1.4 by removing avgMetrics in CrossValidatorSuite.
…uator to get correct cross validation JIRA: https://issues.apache.org/jira/browse/SPARK-8468 Author: Liang-Chi Hsieh <[email protected]> Closes apache#6905 from viirya/cv_min and squashes the following commits: 930d3db [Liang-Chi Hsieh] Fix python unit test and add document. d632135 [Liang-Chi Hsieh] Merge remote-tracking branch 'upstream/master' into cv_min 16e3b2c [Liang-Chi Hsieh] Take the negative instead of reciprocal. c3dd8d9 [Liang-Chi Hsieh] For comments. b5f52c1 [Liang-Chi Hsieh] Add param to CrossValidator for choosing whether to maximize evaulation value. (cherry picked from commit 0b89951) Signed-off-by: Joseph K. Bradley <[email protected]>
…lidatorSuite Ref. apache#6905 ping yhuai Author: Liang-Chi Hsieh <[email protected]> Closes apache#6929 from viirya/hot_fix_cv_test and squashes the following commits: b1aec53 [Liang-Chi Hsieh] Hotfix branch-1.4 by removing avgMetrics in CrossValidatorSuite.
JIRA: https://issues.apache.org/jira/browse/SPARK-8468