-
Notifications
You must be signed in to change notification settings - Fork 8.2k
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] Add decision path charts to exploration results table #73561
Conversation
I love where this is going! Some feedback:
Here's a mockup with the suggestions: (For this one I set the multiplier for the row height like this: |
The SHAP library calls this chart type a "Decision Plot", should we also go with this naming? In this case I'd rename the tab names in the popover to |
Will do!
That definitely looks much more neat and compact. Will try to make the tabs smaller. |
This is looking good! A few extra comments in addition to the suggestions from @walterra:
|
- Add grid lines - Adjust sorting for classification from biggest at the top to smallest at the bottom - Change chart to using cumulative values
# Please enter a commit message to explain why this merge is necessary, # especially if it merges an updated upstream into a topic branch. # # Lines starting with '#' will be ignored, and an empty message aborts # the commit.
@walterra I renamed the tab to Decision Plot, updated the height (small and compact if num features > 3). Unfortunately, I have confirmed with the Eui team that there's not a way right now for us to override the padding of that EuiContentPopover. Also there seems to be a bug with the overflow so I'm working with the Eui team to figure out the fix. Example: 3 features vs 8 features
As for this I'm not too sure. I wasn't able to create this by setting num_features to 0 since it should hide the column automatically. Might need to look at what job config gives you that result. |
@qn895 Thank you, I think that is pretty cool to do but I don't have any strong opinions on this changeset, as I am completely unfamiliar with Kibana. |
# Please enter a commit message to explain why this merge is necessary, # especially if it merges an updated upstream into a topic branch. # # Lines starting with '#' will be ignored, and an empty message aborts # the commit.
# Please enter a commit message to explain why this merge is necessary, # especially if it merges an updated upstream into a topic branch. # # Lines starting with '#' will be ignored, and an empty message aborts # the commit.
# Conflicts: # x-pack/plugins/ml/server/routes/data_frame_analytics.ts
This is looking good! Just wondered if it's possible to control the formatting on the x-axis and tooltip value depending on magnitude of the values, so for example, we'd display Update: Tested after edits in 5fd5ff4 and formatting looks good. |
@peteharverson - reviewed this today with you and after going through some examples it looks good. My only concern is that the docs (linked to from the popup) have a clear concrete example of the chart with explanation. An idea is that a specific prediction like AvgTicketPrice and show how the features are summed with the average to make the prediction + a similar concrete example for classification. |
...gins/ml/public/application/components/data_grid/feature_importance/decision_path_popover.tsx
Outdated
Show resolved
Hide resolved
Updated here 5fd5ff4
Thanks @walterra! I have moved this |
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.
Tested latest edits and LGTM!
Latest code LGTM! I noticed how the code is structured causes the ML page load bundle to grow in size because of the changes. My suspicion this is happening because part of the data grid code that's shared with the transforms plugin grew because of the decision plot code (even if the decision plot itself isn't used by the transform plugin). I think this is something worth investigating in a follow up so I created an issue for it here #77041 |
@elasticmachine merge upstream |
💚 Build SucceededBuild metrics@kbn/optimizer bundle module count
async chunks size
page load bundle size
distributable file count
History
To update your PR or re-run it, just comment with: |
…3561) Co-authored-by: Elastic Machine <elasticmachine@users.noreply.github.com>
) (#77082) Co-authored-by: Elastic Machine <elasticmachine@users.noreply.github.com> Co-authored-by: Elastic Machine <elasticmachine@users.noreply.github.com>
* master: (25 commits) [bugfix] Replace panel flyout opens 2 flyouts (elastic#76931) clean up test (elastic#76887) [Enterprise Search] Update shared API request handler (elastic#77112) [Maps] convert ESAggSource to TS (elastic#76999) Add plugin status API - take 2 (elastic#76732) Adds lens as a readable saved object for read-only dashboard users (elastic#77067) Skip checking for the reserved realm (elastic#76687) Reporting/diagnostics (elastic#74314) Reporting/Test: unskip non-screenshot tests (elastic#77088) Move metrics to setup and add cgroup metrics (elastic#76730) [Enterprise Search] Add Overview landing page/plugin (elastic#76734) First pass. Change TS type. Update OpenAPI (elastic#76434) [CI] Balance xpack ci groups a bit (elastic#77068) [Security_solution][Detections] Refactor signal ancestry to allow multiple parents (elastic#76531) [Maps] convert MetricsEditor to TS (elastic#76727) IndexMigrator: fix non blocking migration wrapper promise rejection (elastic#77018) [Enterprise Search] Update config data endpoint to v2 (elastic#76970) [ML] Add decision path charts to exploration results table (elastic#73561) Bump eventemitter3 from 4.0.0 to 4.0.7 (elastic#77016) [Ingest Pipelines] Add descriptions for ingest processors K-S (elastic#76981) ...
* master: (41 commits) [bugfix] Replace panel flyout opens 2 flyouts (elastic#76931) clean up test (elastic#76887) [Enterprise Search] Update shared API request handler (elastic#77112) [Maps] convert ESAggSource to TS (elastic#76999) Add plugin status API - take 2 (elastic#76732) Adds lens as a readable saved object for read-only dashboard users (elastic#77067) Skip checking for the reserved realm (elastic#76687) Reporting/diagnostics (elastic#74314) Reporting/Test: unskip non-screenshot tests (elastic#77088) Move metrics to setup and add cgroup metrics (elastic#76730) [Enterprise Search] Add Overview landing page/plugin (elastic#76734) First pass. Change TS type. Update OpenAPI (elastic#76434) [CI] Balance xpack ci groups a bit (elastic#77068) [Security_solution][Detections] Refactor signal ancestry to allow multiple parents (elastic#76531) [Maps] convert MetricsEditor to TS (elastic#76727) IndexMigrator: fix non blocking migration wrapper promise rejection (elastic#77018) [Enterprise Search] Update config data endpoint to v2 (elastic#76970) [ML] Add decision path charts to exploration results table (elastic#73561) Bump eventemitter3 from 4.0.0 to 4.0.7 (elastic#77016) [Ingest Pipelines] Add descriptions for ingest processors K-S (elastic#76981) ...
* master: (38 commits) Reporting/Test: unskip non-screenshot tests (elastic#77088) Move metrics to setup and add cgroup metrics (elastic#76730) [Enterprise Search] Add Overview landing page/plugin (elastic#76734) First pass. Change TS type. Update OpenAPI (elastic#76434) [CI] Balance xpack ci groups a bit (elastic#77068) [Security_solution][Detections] Refactor signal ancestry to allow multiple parents (elastic#76531) [Maps] convert MetricsEditor to TS (elastic#76727) IndexMigrator: fix non blocking migration wrapper promise rejection (elastic#77018) [Enterprise Search] Update config data endpoint to v2 (elastic#76970) [ML] Add decision path charts to exploration results table (elastic#73561) Bump eventemitter3 from 4.0.0 to 4.0.7 (elastic#77016) [Ingest Pipelines] Add descriptions for ingest processors K-S (elastic#76981) [Metrics UI] Replace Snapshot API with Metrics API (elastic#76253) legacy utils cleanup (elastic#76608) [ML] Account for "properties" layer in find_file_structure mappings (elastic#77035) fixed typo Upgrade to Kea 2.2 (elastic#77047) a11y tests on spaces home page including feature control (elastic#76515) [ML] Transforms list: persist pagination through refresh interval (elastic#76786) [ML] Replace all use of date_histogram interval with fixed_interval (elastic#76876) ...
Summary
This PR adds the decision path popover to the exploration table. Popover includes both the chart view and the JSON view.
Clicking on the
ml.feature_importance
cell will show both tabs.other
which is the residual feature importance for when number of features included is less than number of feature importance setFor binary classification jobs:
For multiclass classification jobs: (pending on backend)
Checklist
Delete any items that are not applicable to this PR.