OneHot.jl
Documentation for OneHot.jl
OneHot.OneHotArray
— TypeOneHotArray
A type to hold a one-hot encoded array efficiently. Implements efficient matrix multiplication.
OneHot.argmax_
— Methodargmax_(A; dims)
Index of maximum elements of A
over given dims
, dropping the reduced dims
.
OneHot.decode
— Methoddecode(X)
Takes a binary array X
of size (q, ) and returns an integer array A
of size () such that OneHot.encode(A, 1:q) == X
.
OneHot.encode
— Functionencode(data, labels)
Returns a one-hot encoded version of data
, where classes are indexed according to labels
.