Skip to content

Commit

Permalink
[ML] Change to DEFAULT_RESULTS_FIELD
Browse files Browse the repository at this point in the history
  • Loading branch information
qn895 committed Sep 8, 2020
1 parent 76488b6 commit a93e740
Showing 1 changed file with 2 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,7 @@ import { euiDataGridStyle, euiDataGridToolbarSettings } from './common';
import { UseIndexDataReturnType } from './types';
import { DecisionPathPopover } from './feature_importance/decision_path_popover';
import { TopClasses } from '../../../../common/types/feature_importance';
import { DEFAULT_RESULTS_FIELD } from '../../data_frame_analytics/common/constants';

// TODO Fix row hovering + bar highlighting
// import { hoveredRow$ } from './column_chart';
Expand Down Expand Up @@ -106,7 +107,7 @@ export const DataGrid: FC<Props> = memo(
const row = data[rowIndex];
if (!row) return <div />;
// if resultsField for some reason is not available then use ml
const mlResultsField = resultsField ?? 'ml';
const mlResultsField = resultsField ?? DEFAULT_RESULTS_FIELD;
const parsedFIArray = row[mlResultsField].feature_importance;
let predictedValue: string | number | undefined;
let topClasses: TopClasses = [];
Expand Down

0 comments on commit a93e740

Please sign in to comment.