package modelkit

  1. Overview
  2. Docs
Portable classical machine learning workflows for OCaml

Install

dune-project
 Dependency

Authors

Maintainers

Sources

modelkit-0.4.1.tbz
sha256=7a7af032790248b5d1d5392bbf29f8c8163df2e7f50ab5801cdaed5fd2c543e1
sha512=185bc224afc9b141d54b89a564694438a268429ba9c58dd3a402da31cb29f3e1eefd3643a76766ce9170c5f6c927f307873d51e4e3ce08aece00884cebbe0e2a

doc/modelkit/Modelkit/Ordinal_encoder/index.html

Module Modelkit.Ordinal_encoder

Encoding of finite float64 categories as ordered integer-valued columns.

Each feature's categories are sorted ascending and encoded from zero. Unknown values either fail or map to a caller-selected finite value that must not collide with a learned integer code. Sample weights are rejected.

type unknown_category =
  1. | Reject
  2. | Use_encoded_value of float
type params = {
  1. unknown_category : unknown_category;
}
type t
type fitted
val create : ?unknown_category:unknown_category -> unit -> (t, Error.t) result
val categories : fitted -> Vector.t array
include TRANSFORMER with type t := t and type params := params and type target = unit and type fitted := fitted and type rng = Rng.t
include SPECIFICATION with type t := t with type params := params
val clone : t -> t
val params : t -> params
type target = unit
type rng = Rng.t
val fit : t -> ?sample_weight:Sample_weight.t -> rng:rng -> feature_schema:Feature_schema.t -> x:Matrix.t -> y:target option -> unit -> (fitted, Error.t) result
val transform : fitted -> feature_schema:Feature_schema.t -> x:Matrix.t -> (Matrix.t, Error.t) result
val fitted_params : fitted -> params
val input_schema : fitted -> Feature_schema.t
val output_schema : fitted -> Feature_schema.t