1 | static Pair<Double, Map<S, Triple<S>>> scoreTripelizer(O guesser, Map<S, Triple<S>> examples) { |
2 | int ok = 0, total = 0; |
3 | Map<S, Triple<S>> errors = litorderedmap(); |
4 | for (S key, Triple<S> value : examples) { |
5 | total++; |
6 | Triple<S> t = cast pcallF(guesser, key); |
7 | if (tripleEqic(value, t)) ok++; |
8 | else errors.put(key, t); |
9 | |
10 | } |
11 | ret pair(total == 0 ? 1 : ok/(double) total, errors); |
12 | } |
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: | 396 / 442 |
Referenced in: | [show references] |