aboutsummaryrefslogtreecommitdiff
path: root/frontend/src/app/_elements/form-model/form-model.component.ts
diff options
context:
space:
mode:
authorOgnjen Cirkovic <ciraboxkg@gmail.com>2022-05-19 22:15:55 +0200
committerOgnjen Cirkovic <ciraboxkg@gmail.com>2022-05-19 22:15:55 +0200
commitfc4d61340181a6249733b4f34f6252d24334af64 (patch)
tree0bb0f5a4e1fc04a8fd468105b27e5f0055d1afe1 /frontend/src/app/_elements/form-model/form-model.component.ts
parentf51b5e2de9e29a0a3ab998f335c110131cb40ce7 (diff)
parent67bd7451128193517edcbdb61182d0f3800a46dc (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.ts13
1 files changed, 12 insertions, 1 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 9e6082c4..196d575b 100644
--- a/frontend/src/app/_elements/form-model/form-model.component.ts
+++ b/frontend/src/app/_elements/form-model/form-model.component.ts
@@ -24,6 +24,8 @@ export class FormModelComponent implements AfterViewInit {
this.forProblemType = ProblemType.BinaryClassification;
}
+ @Output() editEvent = new EventEmitter();
+
ngAfterViewInit(): void { }
selectFormControl = new FormControl('', Validators.required);
@@ -80,6 +82,7 @@ export class FormModelComponent implements AfterViewInit {
this.newModel.layers.splice(this.newModel.layers.length - 1, 1);
this.newModel.hiddenLayers -= 1;
this.updateGraph();
+ this.editEvent.emit();
}
}
@@ -89,6 +92,7 @@ export class FormModelComponent implements AfterViewInit {
this.newModel.hiddenLayers += 1;
this.updateGraph();
+ this.editEvent.emit();
}
}
@@ -100,6 +104,7 @@ export class FormModelComponent implements AfterViewInit {
if (this.newModel.layers[index].neurons > 1) {
this.newModel.layers[index].neurons -= 1;
this.updateGraph();
+ this.editEvent.emit();
}
}
@@ -107,6 +112,7 @@ export class FormModelComponent implements AfterViewInit {
if (this.newModel.layers[index].neurons < 18) {
this.newModel.layers[index].neurons += 1;
this.updateGraph();
+ this.editEvent.emit();
}
}
@@ -119,22 +125,26 @@ export class FormModelComponent implements AfterViewInit {
for (let i = 0; i < this.newModel.layers.length; i++) {
this.newModel.layers[i].activationFunction = this.selectedActivation;
}
+ this.editEvent.emit();
}
changeAllRegularisation() {
for (let i = 0; i < this.newModel.layers.length; i++) {
this.newModel.layers[i].regularisation = this.selectedRegularisation;
}
+ this.editEvent.emit();
}
changeAllRegularisationRate() {
for (let i = 0; i < this.newModel.layers.length; i++) {
this.newModel.layers[i].regularisationRate = this.selectedRegularisationRate;
}
+ this.editEvent.emit();
}
changeAllNumberOfNeurons() {
for (let i = 0; i < this.newModel.layers.length; i++) {
this.newModel.layers[i].neurons = this.selectedNumberOfNeurons;
- this.updateGraph();
}
+ this.updateGraph();
+ this.editEvent.emit();
}
updateTestSet(event: MatSliderChange) {
this.testSetDistribution = event.value!;
@@ -149,5 +159,6 @@ export class FormModelComponent implements AfterViewInit {
updateValidation(event: MatSliderChange) {
this.validationSize = event.value!;
+ this.editEvent.emit();
}
}