aboutsummaryrefslogtreecommitdiff
path: root/frontend/src/app/_elements/metric-view/metric-view.component.ts
diff options
context:
space:
mode:
Diffstat (limited to 'frontend/src/app/_elements/metric-view/metric-view.component.ts')
-rw-r--r--frontend/src/app/_elements/metric-view/metric-view.component.ts20
1 files changed, 18 insertions, 2 deletions
diff --git a/frontend/src/app/_elements/metric-view/metric-view.component.ts b/frontend/src/app/_elements/metric-view/metric-view.component.ts
index 6fd2f320..fbca2edf 100644
--- a/frontend/src/app/_elements/metric-view/metric-view.component.ts
+++ b/frontend/src/app/_elements/metric-view/metric-view.component.ts
@@ -1,6 +1,5 @@
import { Component, Input, OnInit, ViewChild } from '@angular/core';
import { LineChartComponent } from '../_charts/line-chart/line-chart.component';
-
@Component({
selector: 'app-metric-view',
templateUrl: './metric-view.component.html',
@@ -9,6 +8,7 @@ import { LineChartComponent } from '../_charts/line-chart/line-chart.component';
export class MetricViewComponent implements OnInit {
@ViewChild(LineChartComponent) linechartComponent!: LineChartComponent;
+
constructor() { }
ngOnInit(): void {
@@ -21,6 +21,10 @@ export class MetricViewComponent implements OnInit {
const myMae: number[] = [];
const myMse: number[] = [];
const myLoss: number[] = [];
+ const myValLoss: number[] = [];
+ const myValAcc: number[] = [];
+ const myValMAE: number[] = [];
+ const myValMSE: number[] = [];
const myEpochs: number[] = [];
this.history = history;
@@ -41,9 +45,21 @@ export class MetricViewComponent implements OnInit {
else if (key === 'mse') {
myMse.push(parseFloat(value));
}
+ else if (key === 'val_acc') {
+ myValAcc.push(parseFloat(value));
+ }
+ else if (key === 'val_loss') {
+ myValLoss.push(parseFloat(value));
+ }
+ else if (key === 'val_mae') {
+ myValMAE.push(parseFloat(value));
+ }
+ else if (key === 'val_mse') {
+ myValMSE.push(parseFloat(value));
+ }
}
});
- this.linechartComponent.update(myEpochs, myAcc, myLoss, myMae, myMse);
+ this.linechartComponent.update(myEpochs, myAcc, myLoss, myMae, myMse, myValAcc,myValLoss,myValMAE,myValMSE);
}
} \ No newline at end of file