-
Notifications
You must be signed in to change notification settings - Fork 8.3k
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] Fixes incorrect feature importance visualization for Data Frame Analytics classification #150816
Conversation
Pinging @elastic/ml-ui (:ml) |
@@ -42,12 +43,20 @@ export const ClassificationDecisionPath: FC<ClassificationDecisionPathProps> = ( | |||
const [currentClass, setCurrentClass] = useState<string>( | |||
getStringBasedClassName(topClasses[0].class_name) | |||
); | |||
const selectedClass = topClasses.find( |
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.
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.
AFAICS, the fix makes total sense here: for the second row, the model predicts the class "no" with the probability of 0.986. This means that the prediction probability of "yes" is 0.014. This is precisely what the screenshot above shows now 🚀
The screenshot before this fix shows that the decision graph briefly exceeds 1.0 in for prediction probability, which is nonsense.
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.
Thanks for catching that. Looks like this was a regression that was introduced in #125023. I've added a fix as well as functional tests to check that the popover shows up correctly after table pagination is updated. |
@elasticmachine merge upstream |
@elasticmachine merge upstream |
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 ⚡
@elasticmachine merge upstream |
💚 Build Succeeded
Metrics [docs]Async chunks
History
To update your PR or re-run it, just comment with: cc @qn895 |
…Analytics classification (elastic#150816) Co-authored-by: Kibana Machine <[email protected]> (cherry picked from commit c2476d2)
💚 All backports created successfully
Note: Successful backport PRs will be merged automatically after passing CI. Questions ?Please refer to the Backport tool documentation |
…Frame Analytics classification (#150816) (#151094) # Backport This will backport the following commits from `main` to `8.7`: - [[ML] Fixes incorrect feature importance visualization for Data Frame Analytics classification (#150816)](#150816) <!--- Backport version: 8.9.7 --> ### Questions ? Please refer to the [Backport tool documentation](https://github.com/sqren/backport) <!--BACKPORT [{"author":{"name":"Quynh Nguyen (Quinn)","email":"[email protected]"},"sourceCommit":{"committedDate":"2023-02-14T02:43:46Z","message":"[ML] Fixes incorrect feature importance visualization for Data Frame Analytics classification (#150816)\n\nCo-authored-by: Kibana Machine <[email protected]>","sha":"c2476d240e5a5a979af215057bb7f2bd40b9f6fe","branchLabelMapping":{"^v8.8.0$":"main","^v(\\d+).(\\d+).\\d+$":"$1.$2"}},"sourcePullRequest":{"labels":["release_note:fix",":ml","Feature:Data Frame Analytics","v8.7.0","v8.8.0"],"number":150816,"url":"https://github.com/elastic/kibana/pull/150816","mergeCommit":{"message":"[ML] Fixes incorrect feature importance visualization for Data Frame Analytics classification (#150816)\n\nCo-authored-by: Kibana Machine <[email protected]>","sha":"c2476d240e5a5a979af215057bb7f2bd40b9f6fe"}},"sourceBranch":"main","suggestedTargetBranches":["8.7"],"targetPullRequestStates":[{"branch":"8.7","label":"v8.7.0","labelRegex":"^v(\\d+).(\\d+).\\d+$","isSourceBranch":false,"state":"NOT_CREATED"},{"branch":"main","label":"v8.8.0","labelRegex":"^v8.8.0$","isSourceBranch":true,"state":"MERGED","url":"https://github.com/elastic/kibana/pull/150816","number":150816,"mergeCommit":{"message":"[ML] Fixes incorrect feature importance visualization for Data Frame Analytics classification (#150816)\n\nCo-authored-by: Kibana Machine <[email protected]>","sha":"c2476d240e5a5a979af215057bb7f2bd40b9f6fe"}}]}] BACKPORT--> Co-authored-by: Quynh Nguyen (Quinn) <[email protected]>
Summary
This PR fixes #146122 where the decision graph could briefly exceed 1.0 in for prediction probability. The issue was with the 'true' or 'false' string values not matching correctly with title-cased 'True'/'False'.
Before:
After:
Checklist