static Pair<Double, Map<S, Triple<S>>> scoreTripelizer(O guesser, Map<S, Triple<S>> examples) { int ok = 0, total = 0; Map<S, Triple<S>> errors = litorderedmap(); for (S key, Triple<S> value : examples) { total++; Triple<S> t = cast pcallF(guesser, key); if (tripleEqic(value, t)) ok++; else errors.put(key, t); } ret pair(total == 0 ? 1 : ok/(double) total, errors); }
Began life as a copy of #1011034
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: | #1011088 |
Snippet name: | scoreTripelizer |
Eternal ID of this version: | #1011088/1 |
Text MD5: | b8be53702784c21cf9b9d380487c2c49 |
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-12 03:00:26 |
Source code size: | 411 bytes / 12 lines |
Pitched / IR pitched: | No / No |
Views / Downloads: | 395 / 441 |
Referenced in: | [show references] |