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

macro onehot-derive

Automatic derivation for the OneHot trait

1 unstable release

0.1.0 Oct 11, 2020

#499 in #machine-learning

29 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
~34K SLoC