From 1bbc4ed9e3783b2363c71048c415b84803c26b6b Mon Sep 17 00:00:00 2001 From: TAMARA JERINIC Date: Tue, 10 May 2022 21:19:31 +0200 Subject: Filtriran izbor funkcija gubitka. --- .../src/app/_elements/form-model/form-model.component.ts | 15 +++++++++++++++ 1 file changed, 15 insertions(+) (limited to 'frontend/src/app/_elements/form-model/form-model.component.ts') diff --git a/frontend/src/app/_elements/form-model/form-model.component.ts b/frontend/src/app/_elements/form-model/form-model.component.ts index 71b374b0..82fa0e95 100644 --- a/frontend/src/app/_elements/form-model/form-model.component.ts +++ b/frontend/src/app/_elements/form-model/form-model.component.ts @@ -135,4 +135,19 @@ export class FormModelComponent implements AfterViewInit { updateTestSet(event: MatSliderChange) { this.testSetDistribution = event.value!; } + + filterLossFunction() { + if(this.newModel.type==ProblemType.Regression){ + this.lossFunction = LossFunctionRegression; + this.newModel.lossFunction=LossFunction.MeanSquaredError; + } + else if(this.newModel.type==ProblemType.BinaryClassification){ + this.lossFunction= LossFunctionBinaryClassification; + this.newModel.lossFunction=LossFunction.BinaryCrossEntropy; + } + else if(this.newModel.type==ProblemType.MultiClassification){ + this.lossFunction = LossFunctionMultiClassification; + this.newModel.lossFunction=LossFunction.SparseCategoricalCrossEntropy; + } + } } -- cgit v1.2.3