Skip to content

[ML] Fix r_squared eval when variance is 0#49439

Merged
benwtrent merged 1 commit intoelastic:masterfrom
benwtrent:feature/ml-analytics-fix-r_squared-eval
Nov 21, 2019
Merged

[ML] Fix r_squared eval when variance is 0#49439
benwtrent merged 1 commit intoelastic:masterfrom
benwtrent:feature/ml-analytics-fix-r_squared-eval

Conversation

@benwtrent
Copy link
Copy Markdown
Member

If the doc count is 1, this indicates that the variance between the docs is 0. We should return 0 for r_squared instead of dividing by 0.

@elasticmachine
Copy link
Copy Markdown
Collaborator

Pinging @elastic/ml-core (:ml)

Copy link
Copy Markdown

@przemekwitek przemekwitek left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants