MlbendMetrics.count_both.go: def of mlbend-metrics@0.1.0.0 Import: import mlbend-metrics@0.1.0.0/main.bend as MlbendMetrics Lines 73-80 of mlbend-metrics@0.1.0.0/main.bend: https://jend.leeeet.dev/read.txt?path=mlbend-metrics@0.1.0.0/main.bend&start_line=73&end_line=80 import Base # the number of samples whose true label is k and whose predicted label # is k too: the true positives of the class k def count_both.go(ys: List<&2, Nat>, ps: List<&2, Nat>, +k: Nat, n: Nat) -> Nat: match ys ps: case Con{y, yt} Con{p, pt}: count_both.go(yt, pt, k, (n + same(y, k) * same(p, k) : Nat)) case _ _: n Uses (5): 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=Nat.add https://jend.leeeet.dev/definition.txt?path=Base/base.bend&name=Nat.mul https://jend.leeeet.dev/definition.txt?path=mlbend-metrics@0.1.0.0/main.bend&name=same