diff options
author | Nevena Bojovic <nenabojov@gmail.com> | 2022-05-10 23:19:30 +0200 |
---|---|---|
committer | Nevena Bojovic <nenabojov@gmail.com> | 2022-05-10 23:19:30 +0200 |
commit | 620288faaae5cbdd70c50bd07672ede1fdf2394e (patch) | |
tree | 58c789f65bae6750fec004abd6002e5d6ac1c845 /frontend/src/app/_elements/form-model/form-model.component.ts | |
parent | c02a7f0793a7b290029ec81859cdea5724a3f7dc (diff) | |
parent | 1690c70e86e5f79fa5708ea12ed034bf605cf259 (diff) |
Merge branch 'redesign' of http://gitlab.pmf.kg.ac.rs/igrannonica/neuronstellar into redesign
Diffstat (limited to 'frontend/src/app/_elements/form-model/form-model.component.ts')
-rw-r--r-- | frontend/src/app/_elements/form-model/form-model.component.ts | 19 |
1 files changed, 17 insertions, 2 deletions
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 b9976b84..a98ceaec 100644 --- a/frontend/src/app/_elements/form-model/form-model.component.ts +++ b/frontend/src/app/_elements/form-model/form-model.component.ts @@ -136,7 +136,22 @@ export class FormModelComponent implements AfterViewInit { this.testSetDistribution = event.value!; } - getInputColumns() { + 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; + } + +} +getInputColumns() { return this.forExperiment.inputColumns.filter(x => x != this.forExperiment.outputColumn); - } +} } |