Skip to content

Commit

Permalink
update mse to access value property (#70438)
Browse files Browse the repository at this point in the history
  • Loading branch information
alvarezmelissa87 authored Jul 1, 2020
1 parent ee621d0 commit edad017
Showing 1 changed file with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -129,7 +129,7 @@ export interface Eval {
export interface RegressionEvaluateResponse {
regression: {
mean_squared_error: {
error: number;
value: number;
};
r_squared: {
value: number;
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?.error;
let meanSquaredError = response?.regression?.mean_squared_error?.value;

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

0 comments on commit edad017

Please sign in to comment.