static double scoreGuesserIC_1(O guesser, SS examples) { int ok = 0, total = 0; for (S key, value : examples) { total++; if (eqic(value, unnullStr(pcallF(guesser, key)))) ok++; } ret total == 0 ? 1 : ok/(double) total; }
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: | #1011022 |
Snippet name: | scoreGuesserIC_1 - score a guess function for strings (ignore case); returns 0 to 1 |
Eternal ID of this version: | #1011022/6 |
Text MD5: | bf572ad4623dc0a1d9d734ef7e03f734 |
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 19:44:28 |
Source code size: | 243 bytes / 8 lines |
Pitched / IR pitched: | No / No |
Views / Downloads: | 395 / 435 |
Version history: | 5 change(s) |
Referenced in: | [show references] |