From ad89f08846c5074c9a003d92f1547a5b2327e826 Mon Sep 17 00:00:00 2001 From: marcin-szczepanski Date: Sun, 24 May 2020 18:21:05 +0200 Subject: [PATCH] Frontend update --- Front/src/app/app.component.html | 4 ++++ Front/src/app/app.component.ts | 10 +++++++--- 2 files changed, 11 insertions(+), 3 deletions(-) diff --git a/Front/src/app/app.component.html b/Front/src/app/app.component.html index a8e2f24..2635a98 100644 --- a/Front/src/app/app.component.html +++ b/Front/src/app/app.component.html @@ -88,5 +88,9 @@ +
+
+

Procent trafionych predykcji: {{ ((TP / matches.length) * 100).toFixed(2) }}%

+
diff --git a/Front/src/app/app.component.ts b/Front/src/app/app.component.ts index c2fe485..421fb15 100644 --- a/Front/src/app/app.component.ts +++ b/Front/src/app/app.component.ts @@ -52,6 +52,7 @@ export class AppComponent implements OnInit { this.apiHelper.getJson(this.globalConfig.apiAdress + 'matches').subscribe( data => { this.matches = data; + this.countStatistics(); console.log(data); this.loading = false; }, @@ -92,6 +93,7 @@ export class AppComponent implements OnInit { this.countFMeasure(); } + countRMSE() { } @@ -101,9 +103,11 @@ export class AppComponent implements OnInit { } countTPFPFN() { - /*this.matches.forEach(x => { - if - });*/ + this.matches.forEach(x => { + if (x.predictedResult === x.result) { + this.TP += 1; + } + }); } countPrecision() {