Not logged in.  Login/Logout/Register | List snippets | | Create snippet | Upload image | Upload data

12
LINES

< > BotCompany Repo | #1018791 // ErrorScorer - keeps score & total

JavaX fragment (include)

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  
}

Author comment

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: 311 / 854
Referenced in: [show references]