aboutsummaryrefslogtreecommitdiff
path: root/frontend/src/app/_elements/metric-view
diff options
context:
space:
mode:
authorTAMARA JERINIC <tamara.jerinic@gmail.com>2022-05-20 00:06:49 +0200
committerTAMARA JERINIC <tamara.jerinic@gmail.com>2022-05-20 00:06:49 +0200
commit638f410ad569c632c8dab6cdf66d6b5fd90d5b0c (patch)
treea8f0bbffbdb397a0e7a151feb374b0cc05da1983 /frontend/src/app/_elements/metric-view
parent78c346b1296d2820e943e2918e4d3e9e57093e8f (diff)
parent863881a77f00810f3298aaf6fc451edfe733d121 (diff)
Merge branch 'redesign' of http://gitlab.pmf.kg.ac.rs/igrannonica/neuronstellar into redesign
Diffstat (limited to 'frontend/src/app/_elements/metric-view')
-rw-r--r--frontend/src/app/_elements/metric-view/metric-view.component.ts12
1 files changed, 10 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 fbca2edf..65b1ef9b 100644
--- a/frontend/src/app/_elements/metric-view/metric-view.component.ts
+++ b/frontend/src/app/_elements/metric-view/metric-view.component.ts
@@ -16,7 +16,7 @@ export class MetricViewComponent implements OnInit {
history: any[] = [];
- update(history: any[]) {
+ update(history: any[],totalEpochs:number) {
const myAcc: number[] = [];
const myMae: number[] = [];
const myMse: number[] = [];
@@ -29,7 +29,15 @@ export class MetricViewComponent implements OnInit {
const myEpochs: number[] = [];
this.history = history;
this.history.forEach((metrics, epoch) => {
- myEpochs.push(epoch + 1);
+ if(totalEpochs>100)
+ {
+ let epochEstimate=epoch*Math.round(Math.sqrt(totalEpochs))
+ if(epochEstimate>totalEpochs)
+ epochEstimate=totalEpochs;
+ myEpochs.push(epochEstimate);
+ }
+ else
+ myEpochs.push(epoch + 1);
for (let key in metrics) {
let value = metrics[key];
//console.log(key, ':::', value, epoch);