Skip to content

Commit

Permalink
temp typescript fix for evaluatePanel not being used yet
Browse files Browse the repository at this point in the history
  • Loading branch information
alvarezmelissa87 committed Oct 18, 2019
1 parent 147c392 commit 4a788f2
Showing 1 changed file with 18 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -39,8 +39,15 @@ export const EvaluatePanel: FC<Props> = ({ jobId, index, dependentVariable }) =>
const loadData = async () => {
setIsLoadingGeneralization(true);
setIsLoadingTraining(true);

const genErrorEval = await loadEvalData({ isTraining: false, index, dependentVariable });
// TODO: resultsField and predictionFieldName will need to be properly passed to this function
// once the results view is in use.
const genErrorEval = await loadEvalData({
isTraining: false,
index,
dependentVariable,
resultsField: 'ml',
predictionFieldName: undefined,
});

if (genErrorEval.success === true && genErrorEval.eval) {
const { meanSquaredError, rSquared } = getValuesFromResponse(genErrorEval.eval);
Expand All @@ -58,8 +65,15 @@ export const EvaluatePanel: FC<Props> = ({ jobId, index, dependentVariable }) =>
error: genErrorEval.error,
});
}

const trainingErrorEval = await loadEvalData({ isTraining: true, index, dependentVariable });
// TODO: resultsField and predictionFieldName will need to be properly passed to this function
// once the results view is in use.
const trainingErrorEval = await loadEvalData({
isTraining: true,
index,
dependentVariable,
resultsField: 'ml',
predictionFieldName: undefined,
});

if (trainingErrorEval.success === true && trainingErrorEval.eval) {
const { meanSquaredError, rSquared } = getValuesFromResponse(trainingErrorEval.eval);
Expand Down

0 comments on commit 4a788f2

Please sign in to comment.