MlbendReport.cls_of: def of mlbend-report@0.1.0.0 Import: import mlbend-report@0.1.0.0/main.bend as MlbendReport Lines 147-154 of mlbend-report@0.1.0.0/main.bend: https://jend.leeeet.dev/read.txt?path=mlbend-report@0.1.0.0/main.bend&start_line=147&end_line=154 import Base import mlbend-metrics@0.1.0.0/main.bend as M # The report of one class: its precision, its recall, its F1 and its # support. def cls_of(+ys: List<&2, Nat>, +ps: List<&2, Nat>, +i: Nat) -> Cls: +hits = M.count_both(ys, ps, i) +support = M.count_true(ys, i) +p = M.ratio(hits, M.count_pred(ps, i)) +r = M.ratio(hits, support) Cls{p, r, M.f1_num(p, r), support} Uses (8): https://jend.leeeet.dev/definition.txt?path=Base/base.bend&name=List https://jend.leeeet.dev/definition.txt?path=Base/base.bend&name=Nat https://jend.leeeet.dev/definition.txt?path=mlbend-metrics@0.1.0.0/main.bend&name=count_both https://jend.leeeet.dev/definition.txt?path=mlbend-metrics@0.1.0.0/main.bend&name=count_pred https://jend.leeeet.dev/definition.txt?path=mlbend-metrics@0.1.0.0/main.bend&name=count_true https://jend.leeeet.dev/definition.txt?path=mlbend-metrics@0.1.0.0/main.bend&name=f1_num https://jend.leeeet.dev/definition.txt?path=mlbend-metrics@0.1.0.0/main.bend&name=ratio https://jend.leeeet.dev/definition.txt?path=mlbend-report@0.1.0.0/main.bend&name=Cls