1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
|
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';
import {FormGroupDirective, NgForm} from '@angular/forms';
import {ErrorStateMatcher} from '@angular/material/core';
@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 {
}
selectFormControl = new FormControl('', Validators.required);
nameFormControl = new FormControl('', [Validators.required, Validators.email]);
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();
}
}
|