aboutsummaryrefslogtreecommitdiff
path: root/frontend/src/app/_elements/form-model/form-model.component.ts
diff options
context:
space:
mode:
authorSonja Galovic <galovicsonja@gmail.com>2022-04-28 14:23:12 +0200
committerSonja Galovic <galovicsonja@gmail.com>2022-04-28 14:23:12 +0200
commit0d3739e71f969f429cb1e036d0b57ad1b52658e1 (patch)
tree38867731e5671c2ab3e8cfefdf5115c6adf58904 /frontend/src/app/_elements/form-model/form-model.component.ts
parentadbd70386b4fa13c940eed643cd1b252b5243051 (diff)
parent6eb541aa0cf268c41bf8638b73bf764d717be80b (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.ts39
1 files changed, 37 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 c29fd0bb..062c380e 100644
--- a/frontend/src/app/_elements/form-model/form-model.component.ts
+++ b/frontend/src/app/_elements/form-model/form-model.component.ts
@@ -4,8 +4,7 @@ import Shared from 'src/app/Shared';
import Experiment from 'src/app/_data/Experiment';
import Model, { Layer, ActivationFunction, LossFunction, LearningRate, LossFunctionBinaryClassification, LossFunctionMultiClassification, LossFunctionRegression, Metrics, MetricsBinaryClassification, MetricsMultiClassification, MetricsRegression, NullValueOptions, Optimizer, ProblemType, Regularisation, RegularisationRate, BatchSize } from 'src/app/_data/Model';
import { GraphComponent } from '../graph/graph.component';
-import { FormGroupDirective, NgForm } from '@angular/forms';
-import { ErrorStateMatcher } from '@angular/material/core';
+
@Component({
selector: 'app-form-model',
@@ -104,4 +103,40 @@ export class FormModelComponent implements AfterViewInit {
this.updateGraph();
}
}
+ selectedActivation: ActivationFunction = ActivationFunction.Sigmoid;
+ selectedRegularisationRate: RegularisationRate = RegularisationRate.RR1;
+ selectedRegularisation: Regularisation = Regularisation.L1;
+ selectedNumberOfNeurons:number=1;
+
+ changeAllActivation(){
+ for(let i=0;i<this.newModel.layers.length;i++)
+ {
+ this.newModel.layers[i].activationFunction=this.selectedActivation;
+
+ }
+
+ }
+ changeAllRegularisation(){
+ for(let i=0;i<this.newModel.layers.length;i++)
+ {
+ this.newModel.layers[i].regularisation=this.selectedRegularisation;
+ }
+ }
+ changeAllRegularisationRate(){
+
+ for(let i=0;i<this.newModel.layers.length;i++)
+ {
+ this.newModel.layers[i].regularisationRate=this.selectedRegularisationRate;
+ }
+ }
+ changeAllNumberOfNeurons(){
+ for(let i=0;i<this.newModel.layers.length;i++)
+ {
+ this.newModel.layers[i].neurons=this.selectedNumberOfNeurons;
+ this.updateGraph();
+ }
+ }
+
+
+
}