Skip to content

Commit

Permalink
[ML] Fixes display of regression stop stats if one is NaN (#72412)
Browse files Browse the repository at this point in the history
  • Loading branch information
peteharverson authored Jul 20, 2020
1 parent e5c7e9a commit 66208fb
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -446,7 +446,7 @@ export function getValuesFromResponse(response: RegressionEvaluateResponse) {
if (response.regression.hasOwnProperty(statType)) {
let currentStatValue =
response.regression[statType as keyof RegressionEvaluateResponse['regression']]?.value;
if (currentStatValue) {
if (currentStatValue && !isNaN(currentStatValue)) {
currentStatValue = Number(currentStatValue.toPrecision(DEFAULT_SIG_FIGS));
}
results[statType as keyof RegressionEvaluateExtractedResponse] = currentStatValue;
Expand Down

0 comments on commit 66208fb

Please sign in to comment.