Frontend update

This commit is contained in:
marcin-szczepanski 2020-05-24 18:21:05 +02:00
parent 310a27f385
commit ad89f08846
2 changed files with 11 additions and 3 deletions

View File

@ -88,5 +88,9 @@
</tr> </tr>
</ng-template> </ng-template>
</p-table> </p-table>
<br />
<div>
<p>Procent trafionych predykcji: {{ ((TP / matches.length) * 100).toFixed(2) }}%</p>
</div>
</main> </main>
</div> </div>

View File

@ -52,6 +52,7 @@ export class AppComponent implements OnInit {
this.apiHelper.getJson(this.globalConfig.apiAdress + 'matches').subscribe( this.apiHelper.getJson(this.globalConfig.apiAdress + 'matches').subscribe(
data => { data => {
this.matches = data; this.matches = data;
this.countStatistics();
console.log(data); console.log(data);
this.loading = false; this.loading = false;
}, },
@ -92,6 +93,7 @@ export class AppComponent implements OnInit {
this.countFMeasure(); this.countFMeasure();
} }
countRMSE() { countRMSE() {
} }
@ -101,9 +103,11 @@ export class AppComponent implements OnInit {
} }
countTPFPFN() { countTPFPFN() {
/*this.matches.forEach(x => { this.matches.forEach(x => {
if if (x.predictedResult === x.result) {
});*/ this.TP += 1;
}
});
} }
countPrecision() { countPrecision() {