#machine-learning #proc-macro #onehot #onehot-encoding #hot-encoding

macro onehot-derive

Automatic derivation for the OneHot trait

1 unstable release

0.1.0 Oct 11, 2020

#560 in #machine-learning

21 downloads per month
Used in onehot

MIT license

11KB
345 lines

onehot & onehot-derive

Rust crates for one-hot encoding structs and enums. Provides a trait and a proc macro for auto deriving.

Cargo Documentation

Features

  • Generic trait for encoding arbitrary (including composite) types.
  • Proc macro for auto deriving.
  • Optional bitmatrix support, including vertical and horizontal encoding.
  • No unsafe code.

Licence

onehot is licenced under the MIT Licence.


lib.rs:

This crate provides a custom auto derive macro for onehot.

Dependencies

~1.5MB
~37K SLoC