1 | sclass ErrorScorer {
|
2 | double score, total; |
3 | |
4 | void add(double error) {
|
5 | ++total; |
6 | score += error; |
7 | } |
8 | |
9 | toString {
|
10 | ret formatDouble_significant2(ratio(score/total), 3), "relative error score (n=" + total + ")"; |
11 | } |
12 | } |
Began life as a copy of #1012214
download show line numbers debug dex old transpilations
Travelled to 13 computer(s): aoiabmzegqzx, bhatertpkbcr, cbybwowwnfue, cfunsshuasjs, gwrvuhgaqvyk, irmadwmeruwu, ishqpsrjomds, lpdgvwnxivlt, mqqgnosmbjvj, pyentgdyhuwx, pzhvpgtvlbxg, tvejysmllsmz, vouqrxazstgt
No comments. add comment
| Snippet ID: | #1018791 |
| Snippet name: | ErrorScorer - keeps score & total |
| Eternal ID of this version: | #1018791/1 |
| Text MD5: | 92714f20d7d43f44acc1908753894c87 |
| Author: | stefan |
| Category: | javax |
| Type: | JavaX fragment (include) |
| Public (visible to everyone): | Yes |
| Archived (hidden from active list): | No |
| Created/modified: | 2018-10-13 18:48:24 |
| Source code size: | 243 bytes / 12 lines |
| Pitched / IR pitched: | No / No |
| Views / Downloads: | 581 / 1132 |
| Referenced in: | [show references] |