MlbendReport.report.go: def of mlbend-report@0.1.0.0 Import: import mlbend-report@0.1.0.0/main.bend as MlbendReport Lines 237-250 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=237&end_line=250 import Base import mlbend-metrics@0.1.0.0/main.bend as M # The whole report, or why there is none: the labels and the # predictions must agree in length, and there must be at least one # sample. def report.go(r: Result<&1, &1, M.Bad, Nat>, +ys: List<&2, Nat>, +ps: List<&2, Nat>, +k: Nat) -> Result<&1, &1, M.Bad, Report>: match r: case Done{+n}: +classes = classes_of(ys, ps, k) Done{Report{classes, macro_of(classes, k), weighted_of(classes, n), M.ratio(M.count_right(ys, ps), n)}} case Fail{M.Mismatch{expected, got}}: Fail{M.Mismatch{expected, got}} case Fail{M.Empty{}}: Fail{M.Empty{}} Uses (10): 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=Base/base.bend&name=Result https://jend.leeeet.dev/definition.txt?path=mlbend-metrics@0.1.0.0/main.bend&name=Bad https://jend.leeeet.dev/definition.txt?path=mlbend-metrics@0.1.0.0/main.bend&name=count_right 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=Report https://jend.leeeet.dev/definition.txt?path=mlbend-report@0.1.0.0/main.bend&name=classes_of https://jend.leeeet.dev/definition.txt?path=mlbend-report@0.1.0.0/main.bend&name=macro_of https://jend.leeeet.dev/definition.txt?path=mlbend-report@0.1.0.0/main.bend&name=weighted_of