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] Data Frame Analytics: Fix feature importance cell value and decision path chart #82011

Merged
merged 7 commits into from
Oct 30, 2020

Conversation

walterra
Copy link
Contributor

Summary

Fixes a regression introduced in #81123. The regression caused data grid cells for feature importance to be empty and clicking on the button to show the decision path chart popover to render the whole page empty.

Checklist

Delete any items that are not applicable to this PR.

@walterra walterra added regression :ml v8.0.0 release_note:skip Skip the PR/issue when compiling release notes Feature:Data Frame Analytics ML data frame analytics features v7.10.0 v7.11.0 labels Oct 29, 2020
@walterra walterra requested a review from a team as a code owner October 29, 2020 14:09
@walterra walterra self-assigned this Oct 29, 2020
@elasticmachine
Copy link
Contributor

Pinging @elastic/ml-ui (:ml)

@peteharverson
Copy link
Contributor

peteharverson commented Oct 29, 2020

The results for this config causes the page to crash. I think it must be because there are no feature importance results (job has a low training percent). Uses the iris data set:

{
  "id": "iris_classification",
  "create_time": 1603981165099,
  "version": "8.0.0",
  "description": "10 percent training",
  "source": {
    "index": [
      "iris"
    ],
    "query": {
      "match_all": {}
    }
  },
  "dest": {
    "index": "iris_classification",
    "results_field": "ml"
  },
  "analysis": {
    "classification": {
      "dependent_variable": "class",
      "num_top_feature_importance_values": 4,
      "class_assignment_objective": "maximize_minimum_recall",
      "num_top_classes": -1,
      "prediction_field_name": "class_prediction",
      "training_percent": 10,
      "randomize_seed": -8472867106198368000
    }
  },
  "analyzed_fields": {
    "includes": [
      "class",
      "petal_length",
      "petal_width",
      "sepal_length",
      "sepal_width"
    ],
    "excludes": []
  },
  "model_memory_limit": "2mb",
  "allow_lazy_start": false,
  "max_num_threads": 1
}

Update - confirmed this is fixed by 96ccaef


return featureNames.map((fName, index) => {
const offset = featureNames.length * index;
const featureClassNames = classNames.slice(offset, offset + featureNames.length);
Copy link
Contributor

Choose a reason for hiding this comment

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

This is causing the page to crash with regression jobs:

image

Copy link
Member

Choose a reason for hiding this comment

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

I think this is because the expected shape coming from regression job is different compared to result from classification job here.
Screen Shot 2020-10-29 at 09 28 53

Copy link
Contributor

Choose a reason for hiding this comment

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

Confirmed this is fixed by 96ccaef

@qn895
Copy link
Member

qn895 commented Oct 29, 2020

Ran into an issue where if the class name is a boolean, the feature importance will not show up.
Screen Shot 2020-10-29 at 09 31 20

Copy link
Contributor

@alvarezmelissa87 alvarezmelissa87 left a comment

Choose a reason for hiding this comment

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

Gave this a test and LGTM (once the booelan issue is addressed) ⚡

@walterra
Copy link
Contributor Author

@qn895 I fixed the decision path chart for boolean type classification classes, please have another look.

@qn895
Copy link
Member

qn895 commented Oct 29, 2020

Tested and LGTM 🎉

@kibanamachine
Copy link
Contributor

💚 Build Succeeded

Metrics [docs]

async chunks size

id before after diff
ml 6.6MB 6.6MB +2.4KB

History

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

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 latest edits and LGTM

@walterra walterra added the bug Fixes for quality problems that affect the customer experience label Oct 30, 2020
@walterra walterra merged commit b0a223e into elastic:master Oct 30, 2020
@walterra walterra deleted the ml-fix-feature-importance-2 branch October 30, 2020 09:40
walterra added a commit to walterra/kibana that referenced this pull request Oct 30, 2020
…sion path chart (elastic#82011)

Fixes a regression that caused data grid cells for feature importance to be empty and clicking on the button to show the decision path chart popover to render the whole page empty.
walterra added a commit to walterra/kibana that referenced this pull request Oct 30, 2020
…sion path chart (elastic#82011)

Fixes a regression that caused data grid cells for feature importance to be empty and clicking on the button to show the decision path chart popover to render the whole page empty.
peteharverson pushed a commit that referenced this pull request Oct 30, 2020
…sion path chart (#82011) (#82107)

Fixes a regression that caused data grid cells for feature importance to be empty and clicking on the button to show the decision path chart popover to render the whole page empty.
peteharverson pushed a commit that referenced this pull request Oct 30, 2020
…sion path chart (#82011) (#82108)

Fixes a regression that caused data grid cells for feature importance to be empty and clicking on the button to show the decision path chart popover to render the whole page empty.
gmmorris added a commit to gmmorris/kibana that referenced this pull request Oct 30, 2020
* master: (71 commits)
  [Chrome] Extension to append an element to the last breadcrumb (elastic#82015)
  [Monitoring] Thread pool rejections alert (elastic#79433)
  [Actions] Fix actionType type on registerType function (elastic#82125)
  [Security Solution] Modal for saving timeline (elastic#81802)
  add tests for index pattern switching (elastic#81987)
  TS project references for share plugin (elastic#82051)
  [Graph] Fix problem with duplicate ids (elastic#82109)
  skip 'returns a single bucket if array has 1'.  related elastic#81460
  Add a link to documentation in the alerts and actions management UI (elastic#81909)
  [Fleet] fix duplicate ingest pipeline refs (elastic#82078)
  Context menu trigger for URL Drilldown (elastic#81158)
  SO management: fix legacy import index pattern selection being reset when switching page (elastic#81621)
  Fixed dead links (elastic#78696)
  [Search] Add "restore" to session service (elastic#81924)
  fix Lens heading structure (elastic#81752)
  [ML] Data Frame Analytics: Fix feature importance cell value and decision path chart (elastic#82011)
  Remove legacy app arch items from codeowners. (elastic#82084)
  [TSVB] Renamed 'positive rate' to 'counter rate' (elastic#80939)
  Expressions/migrations2 (elastic#81281)
  [Telemetry] [Schema] remove number type and support all es number types (elastic#81774)
  ...
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Fixes for quality problems that affect the customer experience Feature:Data Frame Analytics ML data frame analytics features :ml regression release_note:skip Skip the PR/issue when compiling release notes v7.10.0 v7.11.0 v8.0.0
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants