aboutsummaryrefslogtreecommitdiff
path: root/frontend/src/app/_elements/form-model/form-model.component.html
blob: 186cb22eef469c42fee97e10fb420b242d6b5453 (plain) (blame)
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
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
<div id="container">
    <div class="ns-row">

        <div class="ns-col">
            <mat-form-field class="example-full-width" appearance="fill" class="mat-fix">
                <mat-label>Naziv</mat-label>
                <input type="text" matInput [(ngModel)]="newModel.name">
            </mat-form-field>
        </div>
        <div class="ns-col">
            <mat-form-field appearance="fill" class="mat-fix">
                <mat-label>Tip problema</mat-label>
                <mat-select [(ngModel)]="newModel.type">
                    <mat-option *ngFor="let option of Object.keys(ProblemType); let optionName of Object.values(ProblemType)" [value]="option">
                        {{ optionName }}
                    </mat-option>
                </mat-select>
            </mat-form-field>
        </div>

        <div class="break-1"></div>

        <div class="ns-col">
            <mat-form-field appearance="fill" class="mat-fix">
                <mat-label>Optimizacija</mat-label>
                <mat-select [(ngModel)]="newModel.optimizer">
                    <mat-option *ngFor="let option of Object.keys(Optimizer); let optionName of Object.values(Optimizer)" [value]="option">
                        {{ optionName }}
                    </mat-option>
                </mat-select>

            </mat-form-field>
        </div>
        <div class="ns-col">
            <mat-form-field appearance="fill" class="mat-fix">
                <mat-label>Funkcija troška</mat-label>
                <mat-select [(ngModel)]="newModel.lossFunction">
                    <mat-option *ngFor="let option of Object.keys(LossFunction); let optionName of Object.values(LossFunction)" [value]="option">
                        {{ optionName }}
                    </mat-option>
                </mat-select>
            </mat-form-field>
        </div>

        <div class="break-2"></div>

        <div class="ns-col">
            <mat-form-field appearance="fill" class="mat-fix">
                <mat-label>Funkcija aktivacije izlaznog sloja</mat-label>
                <mat-select name="outputLayerActivationFunction" [(ngModel)]="newModel.outputLayerActivationFunction">
                    <mat-option *ngFor="let option of Object.keys(ActivationFunction); let optionName of Object.values(ActivationFunction)" [value]="option">
                        {{ optionName }}
                    </mat-option>
                </mat-select>
            </mat-form-field>
        </div>
        <div class="ns-col">
            <mat-form-field appearance="fill" class="mat-fix">
                <mat-label>Stopa učenja</mat-label>
                <mat-select [(ngModel)]="newModel.learningRate">
                    <mat-option *ngFor="let option of Object.keys(LearningRate); let optionName of Object.values(LearningRate)" [value]="option">
                        {{ optionName }}
                    </mat-option>
                </mat-select>
            </mat-form-field>
        </div>

        <div class="break-1"></div>

        <div class="ns-col">
            <mat-form-field appearance="fill" class="mat-fix">
                <mat-label>Broj epoha</mat-label>
                <input type="number" matInput [(ngModel)]="newModel.epochs" min="1" max="1000">
            </mat-form-field>
        </div>
        <div class="ns-col">
            <mat-form-field appearance="fill" class="mat-fix">
                <mat-label>Broj uzoraka po iteraciji</mat-label>

                <mat-select matNativeControl required [(value)]="newModel.batchSize">
                    <mat-option *ngFor="let option of Object.keys(BatchSize); let optionName of Object.values(BatchSize)" [value]="option">{{option}}</mat-option>
                </mat-select>
            </mat-form-field>
        </div>

    </div>
</div>

<!--kraj unosa parametara-->
<div class="m-2">
    <div class="row">
        <div class="col-sm-3 rounded" style="border:1px solid var(--ns-primary);margin-top: 10px;">
            <div class="row slider rounded mb-3" style="margin-left: 10px;">
    
                <div class="text-center pt-3 pb-0 mb-0"><b>{{testSetDistribution}}%</b> : <b>{{100-testSetDistribution}}%</b></div>
                <div class="text-center pt-0 mt-0">Trening
                    <mat-slider min="10" max="90" step="10" [(ngModel)]="testSetDistribution" (input)="updateTestSet($event)"></mat-slider>
                    Test</div>
            
            </div>
            <div class="row slider rounded text-offwhite justify-content-center align-items-center" style="margin-left: 10px;">
                        <mat-checkbox class="pt-4 mb-3" color="accent">Nasumični redosled podataka</mat-checkbox>
            </div>
            
    
        </div>

        <div class="col-sm-9">
            <app-graph [model]="newModel" [inputColumns]="forExperiment?.inputColumns"></app-graph>
        </div>


    </div>
    
    


</div>
<div class="ns-row">

    <div class="ns-col" id="layers-control">
        <div>Broj Skrivenih Slojeva</div>
        <button class="btn-clear btn-icon bubble" (click)="addLayer()">
            <mat-icon>add</mat-icon>
        </button>
        <div>{{newModel.hiddenLayers}}</div>
        <button class="btn-clear btn-icon bubble" (click)="removeLayer()">
            <mat-icon>remove</mat-icon>
        </button>

    </div>
    <div class="break-1"></div>
    <div class="ns-col">
        <mat-form-field appearance="fill" class="mat-fix">
            <mat-label>Aktivaciona funkcija svih slojeva</mat-label>

            <mat-select [(ngModel)]="selectedActivation" (selectionChange)="changeAllActivation()">
                <mat-option *ngFor="let option of Object.keys(ActivationFunction); let optionName of Object.values(ActivationFunction)" [value]="option">
                    {{ optionName }}
                </mat-option>
            </mat-select>
        </mat-form-field>
    </div>

    <div class="ns-col">
        <mat-form-field appearance="fill" class="mat-fix">
            <mat-label>Broj neurona svih slojeva</mat-label>
            <input matInput type="number" min="1" max="18" [(ngModel)]="selectedNumberOfNeurons" (change)="changeAllNumberOfNeurons()">
        </mat-form-field>
    </div>
    <div class="break-2"></div>
    <div class="ns-col">
        <mat-form-field appearance="fill" class="mat-fix">
            <mat-label>Regularizacija svih slojeva</mat-label>
            <mat-select [(ngModel)]="selectedRegularisation" (selectionChange)="changeAllRegularisation()">
                <mat-option *ngFor="let option of Object.keys(Regularisation); let optionName of Object.values(Regularisation)" [value]="option">
                    {{ optionName }}
                </mat-option>
            </mat-select>
        </mat-form-field>
    </div>

    <div class="ns-col">
        <mat-form-field appearance="fill" class="mat-fix">
            <mat-label>Stopa regularizacije svih slojeva</mat-label>
            <mat-select [(ngModel)]="selectedRegularisationRate" (selectionChange)="changeAllRegularisationRate()">
                <mat-option *ngFor="let option of Object.keys(RegularisationRate); let optionName of Object.values(RegularisationRate)" [value]="option">
                    {{ optionName }}
                </mat-option>
            </mat-select>
        </mat-form-field>
    </div>


</div>

<!--kraj selectall**********************************************************************************-->
<div id="layers">

    <div class="layer" *ngFor="let item of newModel.layers; let i=index">


        <mat-form-field appearance="fill" class="mat-fix">
            <mat-label>Aktivacija</mat-label>
            <button matPrefix class="btn-clear center-center text-offwhite">        
                <div>
                    #{{i+1}}
                </div>
            </button>
            <mat-select [(ngModel)]="newModel.layers[i].activationFunction">
                <mat-option *ngFor="let option of Object.keys(ActivationFunction); let optionName of Object.values(ActivationFunction)" [value]="option">
                    {{ optionName }}
                </mat-option>
            </mat-select>
        </mat-form-field>

        <div class="d-flex flex-row align-items-center justify-content-center tm">
            <div class="col-6" style="font-size: 13px;">Broj čvorova</div>
            <button class="btn-clear btn-icon bubble" (click)="addNeuron(i)">
                <mat-icon>add</mat-icon>
            </button>
            <div class="col-2 text-center">{{newModel.layers[i].neurons}}</div>
            <button class="btn-clear btn-icon bubble" (click)="removeNeuron(i)">
                <mat-icon>remove</mat-icon>
            </button>
        </div>

        <mat-form-field appearance="fill" class="mat-fix">
            <mat-label>Regularizacija</mat-label>
            <mat-select [(ngModel)]="newModel.layers[i].regularisation">
                <mat-option *ngFor="let option of Object.keys(Regularisation); let optionName of Object.values(Regularisation)" [value]="option">
                    {{ optionName }}
                </mat-option>
            </mat-select>
        </mat-form-field>

        <mat-form-field appearance="fill" class="mat-fix">
            <mat-label>Stopa regularizacije</mat-label>
            <mat-select [(ngModel)]="newModel.layers[i].regularisationRate">
                <mat-option *ngFor="let option of Object.keys(RegularisationRate); let optionName of Object.values(RegularisationRate)" [value]="option">
                    {{ optionName }}
                </mat-option>
            </mat-select>
        </mat-form-field>
    </div>
</div>