MlbendPreprocess.one_hot_row: def of mlbend-preprocess@0.1.0.0 Import: import mlbend-preprocess@0.1.0.0/main.bend as MlbendPreprocess Lines 255-257 of mlbend-preprocess@0.1.0.0/main.bend: https://jend.leeeet.dev/read.txt?path=mlbend-preprocess@0.1.0.0/main.bend&start_line=255&end_line=257 import Base # One row of a one-hot matrix: a zero in every column but the label's. def one_hot_row(+label: Nat, k: Nat) -> List<&2, F32>: replace_at(List.replicate(F32, k, 0.0), label, 1.0) Uses (5): https://jend.leeeet.dev/definition.txt?path=Base/base.bend&name=F32 https://jend.leeeet.dev/definition.txt?path=Base/base.bend&name=List https://jend.leeeet.dev/definition.txt?path=Base/base.bend&name=List.replicate https://jend.leeeet.dev/definition.txt?path=Base/base.bend&name=Nat https://jend.leeeet.dev/definition.txt?path=mlbend-preprocess@0.1.0.0/main.bend&name=replace_at