Skip to content
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] DFAnalytics results: ensure ml result fields are shown in data grid #68305

Merged

Conversation

alvarezmelissa87
Copy link
Contributor

Summary

This PR fixes the issue of seeing blank ml subfield columns. ml.feature_importance and ml.top_classes are arrays of objects. The fields API used to create the columns incorrectly returns a path like ml.top_classes.class_name referencing the class_name property in the object in the array. This leads to blank column values as dot paths can only be in nested objects.

This PR fixes the issue by adding a ml.top_classes column and correctly displaying the array of objects as the values. It also hides the blank path columns by default.

This PR also ensures ml.feature_importance column shows up correctly.

ml.top_classes

image

ml.feature_importance

image

Checklist

Delete any items that are not applicable to this PR.

@elasticmachine
Copy link
Contributor

Pinging @elastic/ml-ui (:ml)

@@ -110,7 +111,10 @@ export const getDataGridSchemasFromFieldTypes = (fieldTypes: FieldTypes, results
schema = 'numeric';
}

if (field.includes(`${resultsField}.${FEATURE_IMPORTANCE}`)) {
if (
Copy link
Contributor

Choose a reason for hiding this comment

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

Is it possible to remove the ml.top_classes and ml.feature_importance leaf node fields from the data grid column picker modal e.g. ml.top_classes.class_name? Ideally we shouldn't let the user select the leaf nodes for display in the table as those columns will be blank:

image

@alvarezmelissa87
Copy link
Contributor Author

alvarezmelissa87 commented Jun 5, 2020

The PR that removed the ml.feature_importance column went into 7.8 (https://github.com/elastic/kibana/pull/63447/files#diff-316267b1bf7d7615f8ead6265c17cedaL276) so this may need to go into 7.8.

The removal of the ml.top_classes and ml.feature_importance leaf node fields will be done in a follow up.

cc @peteharverson, @walterra

@alvarezmelissa87 alvarezmelissa87 requested review from walterra and removed request for qn895 June 5, 2020 19:19
Copy link
Contributor

@peteharverson peteharverson left a comment

Choose a reason for hiding this comment

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

Tested and LGTM.

Happy for the removal of the ml.top_classes and ml.feature_importance leaf node fields from the column picker to be done in a follow-up.

@peteharverson peteharverson added release_note:skip Skip the PR/issue when compiling release notes and removed release_note:enhancement labels Jun 8, 2020
Copy link
Contributor

@walterra walterra left a comment

Choose a reason for hiding this comment

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

Code LGTM

Copy link
Member

@jgowdyelastic jgowdyelastic left a comment

Choose a reason for hiding this comment

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

Code LGTM

@kibanamachine
Copy link
Contributor

💚 Build Succeeded

History

To update your PR or re-run it, just comment with:
@elasticmachine merge upstream

@alvarezmelissa87 alvarezmelissa87 merged commit e2f11e9 into elastic:master Jun 8, 2020
alvarezmelissa87 added a commit to alvarezmelissa87/kibana that referenced this pull request Jun 8, 2020
…rid (elastic#68305)

* wip: ensure top classes and influencer result col show up correctly

* ensure ml subFields columns are populated
alvarezmelissa87 added a commit to alvarezmelissa87/kibana that referenced this pull request Jun 8, 2020
…rid (elastic#68305)

* wip: ensure top classes and influencer result col show up correctly

* ensure ml subFields columns are populated
@alvarezmelissa87 alvarezmelissa87 deleted the ml-dfanalytics-blank-ml-cols branch June 8, 2020 15:25
gmmorris added a commit to gmmorris/kibana that referenced this pull request Jun 8, 2020
* master:
  [ML] DFAnalytics results: ensure ml result fields are shown in data grid (elastic#68305)
  [security_solution] enable react-hooks/exhaustive-deps (elastic#68470)
  Closes elastic#66867 by adding missing, requried API params (elastic#68465)
  [Telemetry] collect number of visualization saved in the past 7, 30 and 90 days (elastic#67865)
  [Logs UI] View in context tweaks (elastic#67777)
  Kibana developer examples landing page (elastic#67049)
  Bump decompress package version (elastic#68386)
  fix elastic#66185 (elastic#66186)
  Bump pdfmake package version (elastic#68395)
  Unskip embeddables/adding_children suite (elastic#68111)
  Add embed mode options in the Share UI (elastic#58435)
  Adding key to avoid react warning (elastic#68491)
alvarezmelissa87 added a commit that referenced this pull request Jun 8, 2020
…rid (#68305) (#68528)

* wip: ensure top classes and influencer result col show up correctly

* ensure ml subFields columns are populated
alvarezmelissa87 added a commit that referenced this pull request Jun 8, 2020
…rid (#68305) (#68529)

* wip: ensure top classes and influencer result col show up correctly

* ensure ml subFields columns are populated
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Feature:Data Frame Analytics ML data frame analytics features :ml release_note:skip Skip the PR/issue when compiling release notes v7.8.0 v7.9.0
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

6 participants