Module Modelkit.Label_encoder

Reversible sorted encoding of integer classification targets.

Fitting records ascending distinct class labels. transform maps them to contiguous codes starting at zero; inverse_transform rejects invalid codes and restores the original labels. This target-specific utility is deliberately separate from the matrix transformer protocol.

type t
type fitted
val create : unit -> t
val classes : fitted -> int array