Skip to content

Commit

Permalink
update reg evaluate property names (#70604)
Browse files Browse the repository at this point in the history
  • Loading branch information
alvarezmelissa87 authored Jul 2, 2020
1 parent 12460b4 commit 67067ec
Showing 1 changed file with 3 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -128,7 +128,7 @@ export interface Eval {

export interface RegressionEvaluateResponse {
regression: {
mean_squared_error: {
mse: {
value: number;
};
r_squared: {
Expand Down Expand Up @@ -311,7 +311,7 @@ export const isRegressionEvaluateResponse = (arg: any): arg is RegressionEvaluat
return (
keys.length === 1 &&
keys[0] === ANALYSIS_CONFIG_TYPE.REGRESSION &&
arg?.regression?.mean_squared_error !== undefined &&
arg?.regression?.mse !== undefined &&
arg?.regression?.r_squared !== undefined
);
};
Expand Down Expand Up @@ -410,7 +410,7 @@ export const useRefreshAnalyticsList = (
const DEFAULT_SIG_FIGS = 3;

export function getValuesFromResponse(response: RegressionEvaluateResponse) {
let meanSquaredError = response?.regression?.mean_squared_error?.value;
let meanSquaredError = response?.regression?.mse?.value;

if (meanSquaredError) {
meanSquaredError = Number(meanSquaredError.toPrecision(DEFAULT_SIG_FIGS));
Expand Down

0 comments on commit 67067ec

Please sign in to comment.