You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
From an organization standpoint, I think it probably would belong alongside other creation functions like eye.
Alternatively, one-hot could be generalized to a broadcastable unit-impulse, which is already in scipy. Whereas one-hot chooses one element in a vector to be on, unit-impulse chooses one element in an array to be on.
One-hot is a generalization of the standard (elementary) basis vector that is sometimes requested—a generalization because it supports broadcasting.
The text was updated successfully, but these errors were encountered:
Thanks, @NeilGirdhar, for opening this issue. This might be another candidate for a "deep learning" extension (ref: #158). Both PyTorch and Jax, which have similar APIs, place it in their nn namespace. While one-hot creation is certainly common, we'd probably need to see a bit more ecosystem uptake and alignment (e.g., CuPy, Dask, NumPy) before consideration.
One-hot is a very common array creation function in machine learning. It might be worth considering its addition.
Various implementations have different semantics:
From an organization standpoint, I think it probably would belong alongside other creation functions like
eye
.Alternatively, one-hot could be generalized to a broadcastable unit-impulse, which is already in scipy. Whereas one-hot chooses one element in a vector to be on, unit-impulse chooses one element in an array to be on.
One-hot is a generalization of the standard (elementary) basis vector that is sometimes requested—a generalization because it supports broadcasting.
The text was updated successfully, but these errors were encountered: