aboutsummaryrefslogtreecommitdiff
path: root/frontend/src/app/_elements/form-model/form-model.component.ts
diff options
context:
space:
mode:
authorTAMARA JERINIC <tamara.jerinic@gmail.com>2022-04-23 20:46:13 +0200
committerTAMARA JERINIC <tamara.jerinic@gmail.com>2022-04-23 20:46:13 +0200
commit7f4315cc4accda4e7c038a58f6e8a2623c986eca (patch)
tree3e496c9989a932c3cd10d9116f64e6a6628f105f /frontend/src/app/_elements/form-model/form-model.component.ts
parenta5e467a078f6d1306c2cb4aecfd650182c7d64c1 (diff)
Dodate stavke u material.module i form-model
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.ts45
1 files changed, 42 insertions, 3 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 2ff8c605..6f795161 100644
--- a/frontend/src/app/_elements/form-model/form-model.component.ts
+++ b/frontend/src/app/_elements/form-model/form-model.component.ts
@@ -1,15 +1,54 @@
-import { Component, OnInit } from '@angular/core';
-
+import { Component, OnInit ,Input, ViewChild, Output, EventEmitter} from '@angular/core';
+import {FormControl, Validators} from '@angular/forms';
+import Shared from 'src/app/Shared';
+import Experiment from 'src/app/_data/Experiment';
+import Model, { ActivationFunction, LossFunction, LossFunctionBinaryClassification, LossFunctionMultiClassification, LossFunctionRegression, Metrics, MetricsBinaryClassification, MetricsMultiClassification, MetricsRegression, NullValueOptions, Optimizer, ProblemType } from 'src/app/_data/Model';
+import { GraphComponent } from '../graph/graph.component';
@Component({
selector: 'app-form-model',
templateUrl: './form-model.component.html',
styleUrls: ['./form-model.component.css']
})
export class FormModelComponent implements OnInit {
+ @ViewChild(GraphComponent) graph!: GraphComponent;
+ @Input() forExperiment?: Experiment;
+ @Output() selectedModelChangeEvent = new EventEmitter<Model>();
constructor() { }
-
+
ngOnInit(): void {
}
+ animalControl = new FormControl('', Validators.required);
+ selectFormControl = new FormControl('', Validators.required);
+ /*animals: Animal[] = [
+ {name: 'Dog', sound: 'Woof!'},
+ {name: 'Cat', sound: 'Meow!'},
+ {name: 'Cow', sound: 'Moo!'},
+ {name: 'Fox', sound: 'Wa-pa-pa-pa-pa-pa-pow!'},
+ ];
+ */
+ newModel: Model = new Model();
+ myModels?: Model[];
+ selectedModel?: Model;
+
+ ProblemType = ProblemType;
+ ActivationFunction = ActivationFunction;
+ metrics: any = Metrics;
+ LossFunction = LossFunction;
+ Optimizer = Optimizer;
+ Object = Object;
+ document = document;
+ shared = Shared;
+
+ term: string = "";
+ selectedMetrics = [];
+ lossFunction: any = LossFunction;
+ showMyModels: boolean = true;
+
+ batchSizePower: number = 2;
+
+ updateGraph() {
+ this.graph.update();
+ }
}