Handbook
Glossary
one-hot ( indices features -- array )
Vocabulary
machine-learning
.
one-hot
Inputs
indices
an
object
features
an
object
Outputs
array
an
object
Definition
USING:
arrays
kernel
math.statistics
math.vectors
sequences
sequences.extras
;
IN:
machine-learning.one-hot
:
one-hot
( indices features -- array )
[
1
]
2dip
[
length
]
map
[
cum-sum0
v+
]
[
nip
sum
0
<array>
]
2bi
[
set-nths
]
keep
;