Skip to content

Commit

Permalink
[ML] Fix default selected fields.
Browse files Browse the repository at this point in the history
  • Loading branch information
walterra committed Mar 30, 2020
1 parent 4956c29 commit 4cc34ac
Showing 1 changed file with 5 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -286,9 +286,11 @@ export const getDefaultFieldsFromJobCaps = (
...featureImportanceFields,
].sort(({ name: a }, { name: b }) => sortRegressionResultsFields(a, b, jobConfig));

let selectedFields = allFields
.slice(0, DEFAULT_REGRESSION_COLUMNS * 2)
.filter((field: any) => field.name === predictedField || !field.name.includes('.keyword'));
let selectedFields = allFields.filter(
(field: any) =>
field.name === predictedField ||
(!field.name.includes('.keyword') && !field.name.includes('.feature_importance.'))
);

if (selectedFields.length > DEFAULT_REGRESSION_COLUMNS) {
selectedFields = selectedFields.slice(0, DEFAULT_REGRESSION_COLUMNS);
Expand Down

0 comments on commit 4cc34ac

Please sign in to comment.