Skip to content

NicolasOury/encoding

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

7 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

A small set of macro and library to generate one-hot encoding for any types.

The library consist of one trait, Encoding, containing 4 functions:

  • encoding_size giving the size of the encoding for the type
  • encode_into takes a mutable slice and encode a value into it
  • encode is similar but create a new vector, its default implementation is probably always good
  • likelihood, takes an encoding and give the naive likelihood of the value (naive in the sense of not expertly written not with a precise naive Bayes-like meaning)

This can be seen in the encoding library.

We build a set of macros to derive this for any finite types (see derive_encoding directory).

We provide a sketch of an example in example.

About

One-Hot encoding macros

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages