static Pair<Double, SS> scoreGuesserIC_1_returnErrors(O guesser, SS examples) { int ok = 0, total = 0; SS errors = litorderedmap(); for (S key, value : examples) { total++; S s = unnullStr(pcallF(guesser, key)); if (eqic(value, s)) ok++; else errors.put(key, s); } ret pair(total == 0 ? 1 : ok/(double) total, errors); }
Began life as a copy of #1011022
download show line numbers debug dex old transpilations
Travelled to 13 computer(s): aoiabmzegqzx, bhatertpkbcr, cbybwowwnfue, cfunsshuasjs, gwrvuhgaqvyk, ishqpsrjomds, lpdgvwnxivlt, mqqgnosmbjvj, pyentgdyhuwx, pzhvpgtvlbxg, tslmcundralx, tvejysmllsmz, vouqrxazstgt
No comments. add comment
Snippet ID: | #1011034 |
Snippet name: | scoreGuesserIC_1_returnErrors - score a guess function for strings (ignore case); returns 0 to 1 and errors |
Eternal ID of this version: | #1011034/4 |
Text MD5: | c90dbc5da9695e551fe1ad3f6b7fe316 |
Author: | stefan |
Category: | javax / a.i. |
Type: | JavaX fragment (include) |
Public (visible to everyone): | Yes |
Archived (hidden from active list): | No |
Created/modified: | 2017-10-11 21:33:45 |
Source code size: | 362 bytes / 12 lines |
Pitched / IR pitched: | No / No |
Views / Downloads: | 405 / 464 |
Version history: | 3 change(s) |
Referenced in: | [show references] |